{
  "name": "Pattern for multiple triggers combined to continue workflow",
  "nodes": [
    {
      "id": "ba9d786a-0698-4306-adba-40c928c1a340",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        1100
      ],
      "parameters": {
        "width": 718.7339166606896,
        "height": 141.09832891056485,
        "content": "## Independent \"Async\" Process\nThis could be anything that eventually triggers another workflow and passes through something (e.g. resumeUrl) that identifies the original workflow execution that needs"
      }
    },
    {
      "id": "d90e6fa4-2f88-4446-8522-e3ae7b1334d2",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        400,
        400
      ]
    },
    {
      "id": "a76364e9-ef28-4ad8-88a3-68ac23fed0c1",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1100,
        400
      ]
    },
    {
      "id": "fa83bc05-ee83-4150-ac5e-68e6b14e37d2",
      "name": "HTTP Request - Initiate Independent Process",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        860,
        400
      ]
    },
    {
      "id": "a2aad4e1-e305-43cb-9e59-21c92ae351b1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        780,
        280
      ],
      "parameters": {
        "width": 593,
        "height": 107,
        "content": "## Only One Item Will Work\nIf the previous steps could result in multiple initiations via the `Secondary Trigger` below, **only the first one** will resume the workflow.  Others will be rejected."
      }
    },
    {
      "id": "4065389a-8af6-440d-94d6-1a2261e75818",
      "name": "HTTP Request - Resume Other Workflow Execution",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1100,
        780
      ]
    },
    {
      "id": "d0ef28a5-7a4f-4c60-8070-1da0016f9bb6",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        600
      ],
      "parameters": {
        "width": 590,
        "height": 179,
        "content": "## Secondary Trigger From Independent Process\nWhen something runs the workflow through this trigger, it is a completely separate execution.  By passing through the resumeUrl from the **Primary Executi"
      }
    },
    {
      "id": "f0c82308-166f-44e4-84c0-65c2f5d65bf5",
      "name": "This Node Can Access Primary and Secondary",
      "type": "n8n-nodes-base.set",
      "position": [
        1340,
        520
      ]
    },
    {
      "id": "a0b6fd7d-fc69-47c9-bc17-14a57c4eb628",
      "name": "Set Primary Execution Context",
      "type": "n8n-nodes-base.set",
      "position": [
        620,
        400
      ]
    },
    {
      "id": "e4d59b9a-536b-42c6-901e-afb4e4897efd",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        300,
        280
      ],
      "parameters": {
        "width": 357.8809516773294,
        "height": 80,
        "content": "## Primary Trigger/Execution\n"
      }
    },
    {
      "id": "a7370b71-3c0e-4bff-b786-0b353938bcfe",
      "name": "Receive Input from External, Independent Process",
      "type": "n8n-nodes-base.webhook",
      "position": [
        420,
        780
      ]
    },
    {
      "id": "8f1ef649-f5df-498c-9aa4-a1dc00613cef",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        391
      ],
      "parameters": {
        "width": 218,
        "height": 557,
        "content": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nThese are the nodes that combine the `Secondary` execution back to the `Primary` execution via the `resumeUrl`."
      }
    },
    {
      "id": "dacae6ab-9039-4b80-af59-21ca9c958bc0",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        211.1677791891891
      ],
      "parameters": {
        "width": 1415.7138930630392,
        "height": 792.7070677927813,
        "content": "# Main Workflow - Keep these together in the same workflow instance"
      }
    },
    {
      "id": "442f3d39-5a1b-4534-95a2-7c47ce150bb1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        180,
        1040
      ],
      "parameters": {
        "width": 1410.9085229279067,
        "height": 411.48103707206576,
        "content": "# Simulated External Independent Process\nCut/Paste these nodes into a separate workflow instance\nThen activate the trigger\nThen activate the workflow"
      }
    },
    {
      "id": "d9b3d85f-b2f6-48f4-9bfc-3e134e2d4f20",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        580,
        360
      ],
      "parameters": {
        "width": 180.88095167732934,
        "height": 217,
        "content": "## Update Me"
      }
    },
    {
      "id": "38738f2c-d478-4cba-95be-a52536843bcd",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        420
      ],
      "parameters": {
        "width": null,
        "height": 306.5674498803857,
        "content": "## Execute This Node to Test"
      }
    },
    {
      "id": "de9913e4-ea3f-4378-a851-7d7925679bd6",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        480,
        1260
      ]
    },
    {
      "id": "e84ad080-9239-44ee-bc73-d16496813241",
      "name": "Simulate Event that Hits the 2nd Trigger/Flow",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1360,
        1260
      ]
    },
    {
      "id": "4fb07c03-1df0-4703-9d26-22cff17137bf",
      "name": "Simulate some Consumed Service Time",
      "type": "n8n-nodes-base.wait",
      "position": [
        1140,
        1260
      ]
    },
    {
      "id": "66f3cf0a-62dc-4c85-a832-143f45280dd5",
      "name": "HTTP Request - Get A Random Joke",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        920,
        1260
      ]
    },
    {
      "id": "873a6d02-6393-4354-b7fe-c9c1f2e84339",
      "name": "Demo \"Trigger\" Callback Setup",
      "type": "n8n-nodes-base.set",
      "position": [
        700,
        1260
      ]
    },
    {
      "id": "a8eafdc2-e4b0-42b1-b0aa-7e3cb3972b4b",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        280,
        1260
      ]
    },
    {
      "id": "77282136-69ec-4f23-b222-30817498b47d",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        662,
        1220
      ],
      "parameters": {
        "width": 171,
        "height": 217,
        "content": "## Update Me"
      }
    }
  ],
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "This Node Can Access Primary and Secondary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Respond to Webhook": {
      "main": [
        [
          {
            "node": "Demo \"Trigger\" Callback Setup",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Demo \"Trigger\" Callback Setup": {
      "main": [
        [
          {
            "node": "HTTP Request - Get A Random Joke",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Primary Execution Context": {
      "main": [
        [
          {
            "node": "HTTP Request - Initiate Independent Process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Get A Random Joke": {
      "main": [
        [
          {
            "node": "Simulate some Consumed Service Time",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Set Primary Execution Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simulate some Consumed Service Time": {
      "main": [
        [
          {
            "node": "Simulate Event that Hits the 2nd Trigger/Flow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request - Initiate Independent Process": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Receive Input from External, Independent Process": {
      "main": [
        [
          {
            "node": "HTTP Request - Resume Other Workflow Execution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}