Pattern for multiple triggers combined to continue workflow
Ready for 3.0What this workflow does
This workflow has 13 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). It uses only n8n's built-in nodes. It also calls v2.jokeapi.dev over HTTP.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Set Primary Execution Context (Edit Fields (Set)): sets 2 fields: someContextItem, simulatedExternalProcessWorkflowId
- HTTP Request: calls an HTTP API (POST)
- Respond to Webhook: sends the response back to the webhook caller
- HTTP Request: calls an HTTP API (POST)
- Demo "Trigger" Callback Setup (Edit Fields (Set)): sets 1 field: triggerTargetWorkflowId
- Wait: pauses until webhook
- HTTP Request: calls v2.jokeapi.dev
- This Node Can Access Primary and Secondary (Edit Fields (Set)): sets 2 fields: somethingFromPrimaryExecution, somethingFromSecondaryExecution
- Simulate some Consumed Service Time (Wait): waits 2 seconds
- Simulate Event that Hits the 2nd Trigger/Flow (HTTP Request): calls an HTTP API (POST)
HTTP calls to: v2.jokeapi.dev
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (6)
- Manual Trigger
n8n-nodes-base.manualTrigger - Wait
n8n-nodes-base.wait - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Overview This template describes a possible approach to handle a pseudo-callback/trigger from an independent, external process (initiated from a workflow) and combine the received input with the workflow execution that is already in progress. This requires…