Versions Compared

Key

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

...

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"
         }
      ]
   }
]

...

Info

...

If adding the JSON trigger using workflow builder, there is no need to include the opening "triggers": JSON markup notation, as

...

workflow builder will

...

automatically add it.

event

"on-expire"

 added, trigger will listen
  • is added

    • trigger listens for every state expiry event

action

"send-email"

  • email sent to

    • content watchers (@watchers)

    • author (@creator)

    • last user who updated the content (@lastUpdatedBy)

action

"set-message"

  • the message type can be"info", “warning", or "error"

  • message

set to autoClose after viewing
  • must include a value for the “body" parameter

For the trigger to occur, a state must have an expiration date added that expires.

...