Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
List of trigger
 

Overview

One or more trigger actions can be set for a named event in the workflow.

When the workflow trigger event occurs the trigger will check that any required conditions are met, and if met the "send-email" action sends an email to one or more specified recipients.

"send-email"

"triggers:" [
  • ) as values in any of the following parameters

    • "subject"

    • "title"

    • "body"

❗️Mandatory parameters

  • at least one value for "recipients" must be specified

  • the "notification" holder must include at least one of "subject", "title", or "body"

Excerpt

The trigger action "send-email" sends  sends a custom email to one or more specified recipients. 

  • action (send-email)

  • recipients (array) ❗️Recipients to send the email to (at least one recipient value must be added).
    A comma separated list of one or more recipients

    or Confluence groups

    is added using:

    • one or more Email addresses

    • one or more user objects by specifying the Atlassian userIDs

    • one or more group objects by specifying Atlassian groupIDs or the Atlassian groupName

      Email address

      s‡‡

    • one or more user type parameters (see workflow parameter references)

    • one or more group type parameters (see workflow parameter references)

    • One or more of the following value references can also be added as a value for the send-email action recipients

      @watcher  (info) Note that @watcher

      the "send-email" action "recipients"

      • @watchers

      • @lastUpdatedBy

      • @creator

Info

@watchers refers to the watchers set at a document level, not including the watchers of the space.

  • @lastUpdatedBy

  • @creator

    • workflow parameter references (user and group types) are also supported as recipients
    • notification (object) ❗️

       Notification

       Notification holder.

      Can include the following


      You must include at least an email "subject" and "body" as a comma-separated list within curly brackets

      :
      • the email subject
      • title
      • body
      emailContext (object) Email context object

      . The "title" is optional.
      You can embed any of the following as part of the notification text: ${content.title} | ${content.link} | ${content.space}

       
      • These can be used in the subject, title and body parameter values. You must include an email subject value and body value.
    ❗️Mandatory parameters - thefollowing parametersare required:
    Code Block
    Panel
    bgColor#EAE6FF

    Each Confluence user must be specified individually using {"user":"userID"}. Add multiple Confluence users in a comma-separated list {"user":"userID_One"},{"user":"userID_Two"}, ...

    ‡  & ‡‡ Each Confluence group must be specified individually using {"group":"groupID"} and/or {"group":"groupName"}. Add multiple Confluence groups in a comma-separated list {"group":"groupID_One"},{"group":"groupID_Two"},{"group":"groupName_Users1"},{"group":"groupName_Users2"}, ...

    Code Block
    "triggers":
    [
      {"event": "on-change-state",
      	  "conditions":
        	[
    		
          {"state": "Review"}
    	    ],
     	   "actions":
       	[
    		 [
          {"action": "send-email",
    			
            "recipients":
    			[
    				
            [
              "@creator",
    				"@watcher",
    				"@lastUpdatedBy",
    				"@document_user_reviewers@",
    				"@document_group_reviewers@"
    			],
    			"notification":
              "@watchers",
              "@lastUpdatedBy",
              "@user_type_parameter_1@",
              "@user_type_parameter_2@",
              "@group_type_parameter_1@",
              "@group_type_parameter_2@",
              "email_1@email.com",
              "email_2@email.com",
              {"user": "user_ID_1"},
              {"user": "user_ID_2"},
              {"group": "group_ID_1"},
              {"group": "group_ID_2"},
              {"group": "group_Name_1"},
              {"group": "group_Name_2"}
            ],
            "notification":
            {"subject": "${content.title} is In Review State",
    				
              "title": "${content.title} is In Review State",
    				          "body": "Hello, ${content.link} in the ${content.space} space is in approvalreview state."
        and needs to be reviewed"}}
    	]}
          }
        ]
      }
    ]

    (info)  if If adding the JSON trigger using using workflow builder there  there is no need to include the opening "triggers":" JSON  JSON markup notation, since It it will be added by workflow builder.

    Tip

    On-screen notification messages can be created using

    the 

    the "set-message" trigger action.

    Related Pages

    Workflow trigger-generated email 'failure to send' errors are included in the Confluence log.

    Trigger actions

    Child pages (Children Display)
    pageJSON Trigger actions