Workflow PubSub Trigger
Overview
The Workflow PubSub Trigger node listens for events published by a "Workflow PubSub" node in other workflows. When an event with a matching name is published, this trigger activates and starts the workflow execution. This node is useful for creating event-driven workflows that respond dynamically to custom events emitted elsewhere in your automation environment.
Common scenarios:
- Triggering a workflow when a specific event occurs in another workflow, such as completion of a data processing task.
- Reacting to multiple related events using regex pattern matching on event names.
- Coordinating complex automation sequences across different workflows by passing custom event signals.
Example:
If you have a workflow that publishes an event named order.completed, you can use this trigger node configured with the event name order.completed to start another workflow that handles post-order processing like sending notifications or updating records.
Properties
| Name | Meaning |
|---|---|
| When a ‘Workflow PubSub’ node publishes an event with name matching this subscribtion, the execution starts here. | Informational notice describing the trigger's purpose. |
| Event Name | The event name that triggers the workflow. Can be a literal string or a regular expression (e.g., /^order\./) to match multiple event names. |
Output
The node outputs JSON data representing the event payload received from the publishing workflow. This data typically contains any information sent along with the event, allowing downstream nodes to process it accordingly.
No binary data output is produced by this node.
Dependencies
- Requires the presence of a "Workflow PubSub" node in one or more workflows that publish events.
- No external API keys or services are needed.
- Relies on internal event subscription management provided by the n8n environment.
Troubleshooting
Issue: Workflow does not trigger despite publishing an event.
- Cause: Event name mismatch or incorrect regex pattern.
- Resolution: Verify the exact event name used in the publishing node matches the trigger’s event name property. If using regex, ensure correct syntax and flags.
Issue: Multiple workflows triggered unexpectedly.
- Cause: Overly broad regex pattern matching unintended events.
- Resolution: Refine the regex pattern to be more specific.
Error: Missing required event name parameter.
- Resolution: Ensure the "Event Name" property is set before activating the workflow.