JSON trigger to sending an email on on-expire
event
Code Block |
---|
"triggers":
[
{
"event":"on-expire",
"actions":[
{
"action":"send-email",
"recipients":[
"@watchers",
"@creator",
"@lastUpdatedBy"
],
"notification":{
"subject":"${content.title} has expired",
"title":"${content.title} has expired",
"body":"Hello, ${content.link} in the ${content.space} space has expired and needs to be reviewed"
}
},
{
"action":"set-message",
"type":"info",
"title":"Expired",
"body":"The page has expired",
"tags":"state",
"mode":"autoClose"
}
]
}
] |
If adding the JSON trigger using workflow builder there is no need to include the opening "triggers":
JSON markup notation, since It will be added by workflow builder.
event | on-expire |
|
---|---|---|
action | send-email |
|
action | set-message |
|
For the trigger to occur a state must have an expiration date added that expires.
0
...
title | JSON format to add to workflow builder |
---|
Code Block |
---|
[{"event":"on-expire","actions":[{"action":"send-email","recipients":["@watchers","@creator", "@lastUpdatedBy"],"notification":{"subject":"${content.title} has expired","title":"${content.title} has expired","body":"Hello, ${content.link} in the ${content.space} space has expired and needs to be reviewed"}},{"action":"set-message","type":"info","title":"Expired","body":"The page has expired","tags":"state","mode":"autoClose"}]}] |
It is mandatory in the
send-email
trigger action to add at least one recipient and includenotification
withsubject
andbody
valuesset-message
trigger action to add the messagetype
andbody
values
A range of JSON trigger actions is available including the clean-message
action to remove all on-screen notifications.
List of trigger actions
...