"change-state"
The trigger action action (change-state) state❗️ destination workflow state for the action state must be a state in the workflow state names are case-sensitive state parameter state parameter must be included with a valid value for the destination state When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening The example trigger listens for the workflow's change of state to the final state and immediately moves the workflow to the Archive state. The destination state must be included in the Another use of the trigger action is to move from the workflow Review state, which contains an approval, immediately on a reviewer rejection, to the Editing state. This can be used to fast-track a single rejected decision, for example, when multiple reviewers are assigned to an approval."change-state"
causes a change of the state to the specified state if the provided parameters are valid.❗️ Mandatory parameter
Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"final":true}
],
"actions":
[
{"action": "change-state",
"state": "Archive"}
]}
]
"triggers":
JSON markup notation; it is added automatically by the workflow builder."change-state"
action."triggers":
[
{"event": "on-reject",
"conditions":
[
{"state":"Review"}
],
"actions":
[
{"action": "change-state",
"state": "Editing"}
]}
]
"publish-page"
When added to a workflow trigger, publishes a single page on a workflow event to a different space using Comala Publishing for Cloud app. action (publish-page) This trigger action is only available when Comala Publishing Cloud is installed, and the current space has been enabled as a source space for publishing to the target space. For the workflow shown below: Adding the following trigger publishes the page on the state change to the First Published state. If adding the JSON trigger using workflow builder, there is no need to include the opening The The Comala Publishing breadcrumb is updated on the draft page header and on the target space page. The target space for publishing the page is configured in the Comala Publishing space settings. Publishing can also occur based on the configuration of the Comala Publishing app, such as a space publishing action or a single-page publishing. Adding a publish-page trigger does not prevent the page from being published on a transition to the final state."triggers":
[
{"event": "on-change-state",
"conditions":
[
{"state":"First Publish"}
],
"actions":
[
{"action": "publish-page"}
]}
]
"triggers":
JSON markup notation; it is added automatically by workflow builder.publish-page
action macro publishes the content in the target space on the state change event.
"approve"
The trigger action " action (approve) approval Name of the Approval to be approved. If not specified, the default approval† is used user❗️ Atlassian user The trigger action must define a value for the user parameter for the approve action to take place. If no approval name is specified in the trigger action, the default approval is the approval in the state named in the trigger event condition. If the state has multiple approvals, the default approval is the first approval listed in the state's JSON markup. If adding the JSON trigger using workflow builder visual editor, there is no need to include the opening The Atlassian user Identification Number ( oapprove"
sets an approved decision for a named approval if the provided parameters are valid.userID
of the approver❗️ Mandatory parameter
† Default approval
Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"final":true}
],
"actions":
[
{"action": "approve",
"approval": "Sign-off",
"user":"5d52a37ef0f22a0da2d6f070"}
]}
]
"triggers":
JSON markup notation; it is added automatically by workflow builder.userId
) is visible in the URL when viewing the User Profile.
"reject"
The trigger action action (reject) approval Name of the approval to be rejected. If not specified, default approval† is used user ❗️ Atlassian user The trigger action must define a value for the user parameter for the reject action to take place. If the trigger action does not specify a named approval, the action uses the default approval in the workflow. The default approval is the approval in the state named in the trigger event condition. If there are multiple approvals in the state, the default approval is the first approval listed in the JSON markup. If adding the JSON trigger using workflow builder visual editor, there is no need to include the opening The Atlassian user Identification Number ( o"reject"
sets a rejected decision for a named approval if the provided parameters are valid.userID
of the rejector❗️ Mandatory parameter
†Default approval
Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"final":true}
],
"actions":
[
{"action": "reject",
"approval": "Sign-off",
"user":"5d52a37ef0f22a0da2d6f070"}
]}
]
"triggers":
JSON markup notation; it is added automatically by workflow builder.userId
) is visible in the URL when viewing the User Profile.
"assign" and "unassign"
The trigger action action (assign) approval - the name of the approval to assign. If not specified, the default approval† is used assigner - Atlassian user ❗️ Atlassian group❗️ Atlassian comment - comment for the assignation operation Only one user and one group can be assigned in a single user and group parameters for assignees At least one value must be added for an assignee (using either user or group). The user parameter value must be specified unless a group is specified using the group parameter instead. If no approval name is specified in the trigger action, the default approval is the approval in the state named in the trigger event condition. If the state has multiple approvals, the default approval is the first approval listed in the state's JSON markup. When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening When assigning a reviewer, the user parameter only accepts one userID value. The Atlassian User Identification Number (userId) is visible in the URL when viewing the User Profile. To assign multiple users as reviewers, you must use a Confluence group for the reviewers instead of a single user by using the group parameter, for example: where The group parameter value can be either the groupID or the Confluence groupName. The trigger action "assign"
assigns a user to a named approval.userID
for the assigner (if no value is added the app add-on user is the assigner for the action)userID
for the assignee (accepts one value only)groupID
or groupName
for assignees (accepts one value only)"assign"
action. You cannot add multiple values for the user or group parameters.❗️ Mandatory parameters
† Default approval
Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"state":"Review"}
],
"actions":
[
{"action": "assign",
"approval": "Triagereview",
"user": "5d52a37ef0f22a0da2d6f070",
"group": "qa_reviewers"}
]}
]
"triggers":
JSON markup notation; it is added automatically by the workflow builder.Notes
"group":"qa_reviewers"
"qa_reviewers"
is a Confluence group name."unassign"
removes a user or members of a Confluence group from a named approval.
"set-expiration"
" action (set-expiration) dueDate❗️ Due date period in ISO 8601 format or specific date (in Confluence preferred user format for the site) dueDate A value must be added for the due date. If adding the JSON trigger using workflow builder there is no need to include the opening The An existing expiration period can be removed using the set-expiration
" sets an expiry period for a state.❗️ Mandatory parameter
Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"final":true}
],
"actions":
[
{"action": "set-expiration",
"dueDate": "P6M"}
]}
]
"triggers":
JSON markup notation, it is added automatically by workflow builder."dueDate"
period is set using ISO 8601 format. For example, "P6M3W5D" will be 6 months, 3 weeks, and 5 days from the date of transition into the state. This overrides any existing expiration periods."clear-expiration"
action.
"clear-expiration"
The action (clear-expiration ) If adding the JSON trigger using workflow builder there is no need to include the opening A new expiration date can be added using the "clear-expiration"
action removes an existing workflow state expiration period."triggers":
[
{"event": "on-change-state",
"conditions":
[
{"final":true}
],
"actions":
[
{"action": "clear-expiration"}
]}
]
"triggers":
JSON markup notation, it is added automatically by workflow builder."set-expiration"
trigger action.
"set-message"
The trigger action It can be set as info, warning, or error and set to auto-close after a specified period or require user acknowledgment. action (set-message) type ❗️ Indicator of the level of the message info warning error title For adding a title to the message body❗️ For adding the content for the body of the message type The body The When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening The above If the If the All messages can be removed using the Custom email notifications can be sent using the "set-message"
creates a message notification and can include a message title and a body.❗️ Mandatory parameters
"type"
parameter value must be included."body"
parameter value must be included.Trigger example
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"state":"Expired"}
],
"actions":
[
{"action": "set-message",
"type": "info",
"title": "Stale content",
"body": "Content may be out of date"}
]}
]
"triggers":
JSON markup notation; it is added automatically by the workflow builder.trigger
listens for a state change event to the Expired state and displays an on-screen message notification on the change of state."set-messsage
action parameter is "type":"warning
, the displayed notification is:"set-messsage
action parameter is "type":"error
, the displayed notification is:"clean-messages"
trigger action."send-email"
trigger action.
"clean-messages"
The action (clean-messages) When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening A message can be set using the "clean-messages"
action removes all messages (set by a “set-message"
trigger action) on the content.Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"final":true}
],
"actions":
[
{"action": "clean-messages"}
]}
]
"triggers":
JSON markup notation; it is added automatically by the workflow builder."set-message"
trigger action.
"remove-restrictions"
The trigger action action (remove-restrictions) contentId - the content id of the page to remove page-level restrictions if no content id is included, the current page contentId is used A typical use of this trigger action is to remove all view and edit restrictions from the final state in a workflow. When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening In the document management dashboard, a space administrator can configure the space to remove all page-level restrictions on transitioning to the active workflow’s final state. Only 'Confluence Cloud Standard, Premium, and Enterprise Plans enable Atlassian Confluence users to edit permissions, including global, space, and page permissions."remove-restrictions"
removes content view and edit restrictions for all users and groups.Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"final":true}
],
"actions":
[
{"action": "remove-restrictions"}
]}
]
"triggers":
JSON markup notation; it is added automatically by the workflow builder.
"send-email"
The trigger action 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 is added using a combination of: one or more one or more users using one or more user groups one or more user type workflow parameters using one or more group type workflow parameters using One or more of the following Confluence † Each Confluence user must be specified individually using ‡ Each Confluence group must be specified individually using notification (object) ❗️ Notification holder. This includes the following parameters as a comma-separated list within curly brackets: You can embed any of the following as part of the text value in the recipients At least one value for recipients must be included notification The "notification" holder is required. This must include both "subject" "body" When adding the JSON trigger using the workflow builder visual editor, there is no need to include the opening On-screen notification messages can be created using the Workflow trigger-generated email 'failure to send' errors are included in the Confluence log."send-email"
sends a custom email to one or more specified recipients. email
addresses{"user"="userID"}
specifying the Atlassian userID
.†{"group":"groupID"}
specifying Atlassian groupID
‡ or the Atlassian groupName
‡@userTypeParameterName@
(see workflow parameter references)@groupTypeParameterName@
(see workflow parameter references)value references
@watchers
(set at document level only)@lastUpdatedBy
@creator
{"user":"userID"}
. Add multiple Confluence users in a comma-separated list {"user":"userID_One"},{"user":"userID_Two"}, ...
{"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"}, ...
"title"
(optional)"subject"
❗️"body"
❗️"title"
, "subject"
, and "body"
parameters${content.title}
- inserts the name of the page or blog post${content.link}
- inserts the link of the page or blog post${content.space}
- inserts the name of the space❗️Mandatory parameters
Example trigger code
"triggers":
[
{"event": "on-change-state",
"conditions":
[
{"state": "Review"}
],
"actions":
[
{"action": "send-email",
"recipients":
[
"@creator",
"@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 review state."
}
}
]
}
]
"triggers":
JSON markup notation; it is added automatically by the workflow builder."set-message"
trigger action.
Related Pages