Use attachment events in workflow triggers
Overview
Triggering events when attachments are created, updated, or removed.
In the following examples, we show how to trigger a state transition when users add, update, or remove attachments to a page or blog post in a specific workflow state.
Attachment created
If the workflow is in the Approved state, adding an attachment triggers a transition to the In Progress state.
{workflow:name=Attachment added}
{state:In Progress}
{state}
{state:Approved}
{state}
{trigger:attachmentadded|state=Approved}
{set-state:In Progress}
{trigger}
{workflow}
Attachment updated
If the workflow is in the Approved state, updating an attachment (uploading a new version of an existing attachment) triggers a transition to the In Progress state.
{workflow:name=Attachment updated}
{state:In Progress}
{state}
{state:Approved}
{state}
{trigger:attachmentupdated|state=Approved}
{set-state:In Progress}
{trigger}
{workflow}
Attachment removed
If the workflow is in the Approved state, deleting an attachment triggers a transition to the In Progress state.
{workflow:name=Attachment added}
{state:In Progress}
{state}
{state:Approved}
{state}
{trigger:attachmentremoved|state=Approved}
{set-state:In Progress}
{trigger}
{workflow}
Attachment version removed
If the workflow is in the Approved state, deleting an attachment version triggers a transition to the In Progress state.
{workflow:name=Attachment added}
{state:In Progress}
{state}
{state:Approved}
{state}
{trigger:attachmentversionremoved|state=Approved}
{set-state:In Progress}
{trigger}
{workflow}
All of the above
If you want to transition on any of the events listed above, you can use the attachmentschanged
(note the 's') event, like so:
{workflow:name=Any attachment event}
{state:In Progress}
{state}
{state:Approved}
{state}
{trigger:attachmentschanged|state=Approved} {set-message:duration=PT1M}
Attachment added, edited or deleted:
|| File | @filename@ |
|| Size | @size@ bytes |
|| Comment | @comment@ |
{set-message}
{set-state:In Progress}
{trigger}
{workflow}
We've included a message to provide some details about the attachment; the details are derived from event references, which are available at all attachment-related events. Here's an example output:
Need support? Create a request with our support team.
Copyright © 2005 - 2025 Appfire | All rights reserved.