Workflow trigger
The Workflow trigger node gets triggered when a workflow is updated or activated.
!!! note "Keep in mind" If you want to use the Workflow trigger node for a workflow, add the node to the workflow. You don't have to create a separate workflow.
The Workflow trigger node gets triggered for the workflow that it gets added to. The Workflow trigger node can be used to trigger a workflow to notify the state of the workflow.
Node Reference
- Events
- Active Workflow Updated: triggers when this workflow is updated
- Workflow Activated: triggers when this workflow is activated
Example Usage
This workflow allows you to receive a message on Mattermost when a workflow is updated. You can also find the workflow on Robbot Automation. This example usage workflow uses the following nodes.
- [Mattermost](/integrations/builtin/app-nodes/Robbot Automation-nodes-base.mattermost/)
1. Workflow trigger node
Open the workflow where you want to add the Workflow trigger workflow. Add the Workflow trigger node to the workflow.
The Workflow trigger node will trigger the workflow when the workflow gets updated.
- Select 'Active Workflow Updated' from the Events dropdown list.
2. Mattermost node (post: message)
This node will send a message in the workflow
channel on Mattermost.
First of all, you'll have to enter credentials for the Mattermost node. You can find out how to enter credentials for this node here.
Select a channel from the Channel ID dropdown list.
Click on the gears icon next to the Message field click on Add Expression.
Enter the following message in the Expression field:
The workflow {{$workflow.name}}, was updated.
.$workflow.name
returns the name of the workflow.Click on Save to run the workflow.