Overview
Actions are macros which can be put in Event Triggers. When the event is detected, the trigger performs the actions.
They are extremely useful because they enable the workflow to automate common tasks - from adding labels, to sending emails and even synchronising content with another server.
Example
In this example, the trigger listens for the pagecreated
event (only available in Space Mode) and then performs the set-message action.
{workflow:name=Action macros} {state:Test} {state} {trigger:pagecreated} {set-message}This is a new page created by @creator@{set-message} {trigger} {workflow}
Value references
Most actions support Value References, such as @creator@
in the example above.
These are named placeholders for information stored somewhere else, and they allow your actions to respond dynamically to current workflow and content state.
Notifications
Certain actions will trigger notifications. For mode details, see the macro documentation below.
Macros
Action macros must be placed inside the macro body of a trigger macro.
-
add-comment macro — Comment on a page or blog post
-
add-restriction macro — Add content view/edit permissions
-
approve-children macro — Approve approvals on child pages
-
approve-page macro — Approve an approval
-
complete-task macro — Mark a task as complete
-
increment-metadata macro — Increment a metadata value to support custom versions (available from v6.11+)
-
pdf-export macro — export content as a pdf
-
publish-page macro — Publish content to a different space
-
reject-children macro — Reject approvals on child pages
-
reject-page macro — Reject an approval
-
remotepublish-page macro — Publish a page to a remote Confluence instance
-
remoteremove-page macro — Unpublish (remove) a page from a remote Confluence instance
-
remove-label macro — Remove a label from the content
-
remove-restriction macro — Remove content view/edit permissions
-
send-email macro — Send an email
-
set-label macro — Add a label to the content
-
set-message macro — Add/remove a page message
-
set-metadata macro — Define metadata properties
-
set-restrictions macro — Reset content view/edit restrictions
-
set-state macro — Immediately transition to a state
-
set-state-expiry macro — Set state expiry duration
-
snapshot-page macro — Create a static versioned snapshot of a document
Events
Certain actions will generate additional events. For more details, see the macro documentation above.
App configuration
Certain macros will be affected by application settings. For more details, see the macro documentation above.
Examples
-
-
Adding page activity to email — Include page activity report, or a link to it, in custom email notifications
-
-
-
Attachment events — Triggering events when attachments are created, updated or removed.
-
Blog Post Events — Workflow events associated with blog posts
-
Dynamic page header using a metadata value and triggers — Use a trigger to display a different page header for each state in the workflow. Page header content is set as a metadata value.
-
Fast-tracked Rejections and Approvals — How to require everyone to Approve, but only need one person to Reject
-
Message notification styles — Test the
style
parameter of the{set-message}
macro -
Require Parameters on a state transition — Require workflow parameter values to be set before moving into a workflow state.
-
-
-
-
State expiry dates — Using state expiry dates, defining them with metadata, and making them editable
-
-
Using set-message and metadata to display different information for the draft and published content — Using the
view
parameter of the{set-message}
macro to display a different metadata when users view the draft or published versions