Who is this workflow for? This workflow template enables you to handle external triggers alongside an ongoing workflow execution. By integrating primary and secondary triggers, you can seamlessly combine external input with your current processes, ensuring a smooth and continuous workflow..

What does this workflow do?

Primary Workflow Trigger/Execution

  • Initiate Primary Trigger: The workflow starts with a primary trigger that kicks off an external, independent process.
  • Provide Context: Along with initiating the external process, the workflow passes context information, including the resumeUrl from $execution.resumeUrl.
  • Wait Node Configuration: The workflow reaches a Wait node configured to Resume - On Webhook Call, pausing the execution until the resumeUrl is called.

External, Independent Process

  • Trigger External Process: The external process, such as a Telegram conversation or web service, is initiated by the primary workflow.
  • Single Execution Constraint: Ensure that the external process results in only one execution of the secondary workflow trigger.
  • Pass resumeUrl: The external process must pass the resumeUrl associated with the primary workflow execution back to the workflow system.

Secondary Workflow Trigger/Execution

  • Initiate Secondary Trigger: The secondary workflow starts with any suitable trigger, ensuring that part of its input includes the resumeUrl.
  • Combine Inputs: The secondary workflow uses the received input and sends it to the resumeUrl endpoint on the primary workflow’s Wait node.
  • Resume Primary Workflow: Upon receiving the call, the primary workflow resumes, integrating both its original context and the new input from the secondary trigger.

Important Notes

  • Workflow IDs: Update the workflow IDs in the Set nodes marked Update Me to match your system’s workflow IDs for the demo to function correctly.
  • Webhook Configuration: The Resume Other Workflow Execution node uses $env.WEBHOOK_URL for converting to an internal “localhost” call in a Docker environment, which can be adjusted as needed.
  • Single Callback Limitation: This pattern is not suitable for workflows that handle multiple items simultaneously, as it only awaits one callback.
  • Secondary Workflow Purpose: The secondary workflow demonstrates how the external process should operate to interact with the primary workflow.

🤖 Why Use This Automation Workflow?

  • Enhanced Flexibility: Combine inputs from multiple sources without interrupting the main workflow.
  • Improved Efficiency: Automate the handling of external triggers, reducing manual intervention.
  • Context Preservation: Maintain the context of the primary workflow while incorporating additional data from secondary triggers.

👨‍💻 Who is This Workflow For?

This workflow is ideal for businesses and professionals who need to integrate external processes or callbacks into their existing automated workflows. It is particularly useful for those who manage complex workflows that require inputs from various independent systems.

🎯 Use Cases

  1. Customer Support Automation: Automatically resume a support ticket workflow when a customer responds via an external chat service.
  2. Order Processing: Combine order details from an e-commerce platform with inventory updates from a separate inventory management system.
  3. Project Management: Integrate updates from external project tracking tools into your main project workflow for real-time status updates.

TL;DR

This workflow template efficiently manages external triggers by combining inputs from a primary and a secondary source, allowing your automated processes to continue seamlessly. By integrating independent external processes with your main workflow, you enhance flexibility and maintain the integrity of your workflow execution.

Help us find the best n8n templates

About

A curated directory of the best n8n templates for workflow automations.