---
title: "Examples for AddNotification Action"
canonical: "https://support.appfire.com/space/SUPPORT/89136169/Examples%20for%20AddNotification%20Action"
format: markdown
---
> Macro (div)
> 
> ### On this page
> 
> > Macro (toc)


# Examples With Different Event Types and Recipient Types

- We use aliases for event type and recipient type, but you can use the actual keys as well. Example is: **com.atlassian.bamboo.plugin.system.notifications:chainCompleted.failedChains**
- If you have add-ons that have additional customized types, you will need to use their key values. The most obvious way is by using browser Inspect on the UI field.
- Another alternative is to configure a simple plan with the notifications you are interested in automating. Export the plan using the **exportPlan** action to give you the normal fields. You may need some additional fields unique to the custom notification type.


```
-a addNotification       --plan @plan@  --event "Change of Responsibilities" \
                                                --recipientType "users who are responsible for the current failure" \
                                                --recipient "Responsible"

-a addNotification       --plan @plan@  --event "All Jobs Completed" \
                                                --recipientType "users who are responsible for the current failure" \
                                                --recipient "Responsible"

-a addNotification       --plan @plan@  --event "Change of Job Status" \
                                                --recipientType "group" \
                                                --recipient "bamboo-admin"

-a addNotification       --plan @plan@  --event "Failed Jobs And First Successful" \
                                                --recipientType "im address" \
                                                --recipient "me@chat.com"

-a addNotification       --plan @plan@  --event "Failed Jobs And First Successful" \
                                                --recipientType "Hipchat room" \
                                                --recipient "Test room for Bob" \
                                                --field apiToken=***

-a addNotification       --plan @plan@  --event "First Failed Job For Plan" \
                                                --recipientType "user" \
                                                --recipient "automation"

-a addNotification       --plan @plan@  --event "Notify On All Build Errors" \
                                                --recipientType "users who are responsible for the current failure" \
                                                --recipient "Responsible"

-a addNotification       --plan @plan@  --event "Job Hung" \
                                                --recipientType "users who are responsible for the current failure" \
                                                --recipient "Responsible"

-a addNotification       --plan @plan@  --event "Job Queued Without Capable Agents" \
                                                --recipientType "users who are responsible for the current failure" \
                                                --recipient "Responsible"

-a addNotification       --plan @plan@  --event "Job Queue Timeout" \
                                                --recipientType "users who are responsible for the current failure" \
                                                --recipient "Responsible"

-a addNotification       --plan @plan@  --event "Notify After 2 Consecutive Failures" \
                                                --recipientType "users who have marked this build as their favourite" \
                                                --recipient "Watchers" \
                                                --field numFailedTimes=2

-a addNotification       --plan @plan@  --event "All Builds Completed" \
                                                --recipientType "email address" \
                                                --recipient "bob2@examplegear.com"

-a addNotification       --plan @plan@  --event "All Builds Completed" \
                                                --recipientType "email address" \
                                                --recipient "bob@examplegear.com"

-a addNotification       --plan @plan@  --event "Change of Build Status" \
                                                --recipientType "users who have committed to the build" \
                                                --recipient "Committers"

-a addNotification       --plan @plan@  --event "Failed Builds And First Successful" \
                                                --recipientType "Hipchat room" \
                                                --recipient "Test room for Bob" \
                                                --field apiToken=***
```