Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sending an email to @document_user_reviewers@ when the page reaches the named state Published

o

In this example, the trigger listens for the change of state event to the state named Published.

...

Code Block
[
  {
    "event":"on-expire",
    "actions":[
      {
        "action":"send-email",
        "recipients":[
          "@watchers",
          "@creator",
          "@lastUpdatedBy",
		  "@document_user_reviewers@"
        ],
        "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"
      }
    ]
  }
]


eventon-change-state
  • condition added - trigger will only listen for change of workflow state to named state
conditionstate:Published
  • state condition for the trigger event
actionsend-email
  • email sent to users who are added as values for the workflow parameter @wdocument@document_user_reviewers@
actionset-message
  • on-screen info type message notification when viewing the content stating content has expired that will auto close after 10s

0

...

titleJSON 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.

(info) It is mandatory in the

A range of JSON trigger actions is available including the clean-message action to remove all on-screen notifications.

List of trigger actions

...