Sending an email to @document_user_reviewers@
when the page reaches the named state Published
...
In this example, the trigger listens for the change of state event to the state named Published.
The action sends an email to each of the following
watchers for the page
“@watchers"
user who last updated the page
"@lastUpdatedBy"
author of the
...
document
"@creator"
...
“@document_user_reviewers@
...
"
Code Block |
---|
"triggers": [ { "event":"on-expire",-change-state", "conditions": [ { "state": "Published" } ], "actions": [ { "action":"send-email", "recipients": [ "@watchers", "@creator", "@lastUpdatedBy", "@document_user_reviewers@" ], "notification": { "subject":"${content.title} has been expiredpublished", "title":"${content.title} hasis expiredpublished", "body":"Hello, ${content.link} in the ${content.space} space has expiredapproved and is now needsin tothe bePUBLISHED reviewedstate" } }, { "action":"set-message", "type":"info", "title":"ExpiredPublished", "body":"The page has expired been approved and published", "tags":"state", "mode":"autoClose" } ] } ] |
Info |
---|
If adding the JSON trigger using workflow builder there is no need to include the opening |
|
|
| ||
|
| |
|
|
| ||
|
|
|
0
...
title | JSON format to add to workflow builder |
---|
Code Block |
---|
[{"event":"on-change-state","conditions":[{"state":"Published"}],"actions":[{"action":"send-email","recipients":["@document_user_reviewers@"],"notification":{"subject":"${content.title} is Published State","title":"${content.title} is Published State","body":"Hello, ${content.link} in the ${content.space} the page is Published"}}]}] |
An alternative is to use the final:true
condition for the on-change-state
event if you have the Published state configured as the workflow final state.
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
Child pages (Children Display)