Sending an email on
...
“on-approve"
event if one of the assignees approves the page
A JSON trigger can be configured to send an email when a user undertakes an approval decision. The trigger consists of
...
the
"on-approve
event"
eventthe
"state
condition "
condition to specify the approval statethe
"send-email
action
The on-reject
event is used for a separate event if an action is required on a user rejection decision.
"
action
Code Block | ||
---|---|---|
| ||
"triggers": [ { "event":"on-approve", "conditions": [ { "state":"Review" } ], "actions":[ [ { {"action":"send-email", "recipients": [ "@creator" ], "notification": { "subject":"${content.title} has been approved", "title":"${content.title} has been approved", "body":"Hello, ${content.link} in the ${content.space} has been approved by one approver" } } ] }, ] |
If adding the JSON trigger using workflow builder there is no need to include the opening "triggers":
JSON markup notation, as it will be added automatically by workflow builder.
...
|
|
| ||
|
| |
|
|
@creator
). An
|
...
title | JSON format to add to workflow builder |
---|
...
on-approve
...
To include an email for a user rejecting the content a second separate event must be added using the on-reject
event.
...
and on-reject multiple event trigger
Code Block | ||
---|---|---|
| ||
"triggers": [ { "event":"on-approve", "conditions":[ { "state":"Review" } ], "actions":[ { "action":"send-email", "recipients": [ "@creator" ], "notification":{ "subject":"${content.title} has been approved", "title":"${content.title} has been approved", "body":"Hello, ${content.link} in the ${content.space} has been approved by one approver" } } ] }, { "event":"on-reject", "conditions":[ { "state":"Review" } ], "actions": [ { "action":"send-email", "recipients":[ "@creator" ], "notification": { "subject":"${content.title} has been rejected", "title":"${content.title} has been rejected", "body":"Hello, ${content.link} in the ${content.space} has been rejected by one approver" } } ] } ] JSON format to add to workflow builder
|
It is mandatory in the send-email
trigger action to add at least one recipient and include notification
with subject
and body
values
A range of JSON trigger actions is available including the set-message
action.
List of trigger actions
Child pages (Children Display)
"triggers":
JSON markup notation, since It will be added by workflow builder.