n8n

How to Automate Webhook Callback Handling?

Hand off long running work to an outside system and pick up right where you left off when it calls back. Great for approvals, chatbot replies, vendor jobs, or any task that needs time. Teams avoid polling and keep one clear run that pauses and resumes safely.

A primary run starts from a manual trigger, sets context, and posts a unique resume link to a second entry point. The run then waits on a webhook. A separate webhook receives updates from an independent process and uses the resume link to continue the waiting run, passing results back. The pattern accepts only the first callback, so duplicates are ignored. The included path also simulates a delay and gets a sample message to show the handoff end to end.

Use a public n8n URL or expose local webhooks so other systems can reach them. Point your second trigger at any app that can send HTTP requests and carry the resume link in its payload. Expect less busywork, fewer timeouts, and cleaner state across delays. Common uses include document review, payment confirmation, and human in the loop checks. Setup is guided by clear steps and test nodes so you can validate the flow quickly.

What are the key features?

  • Manual start sets a primary context so you can pass values through the entire run.
  • HTTP Request sends a unique resumeUrl to an external entry point to begin independent work.
  • Wait node pauses the run and resumes only when its webhook receives a POST.
  • Secondary Webhook receives data from the independent process, including the resumeUrl.
  • HTTP Request resumes the waiting run and forwards returned fields like messages or results.
  • Respond to Webhook returns a fast acknowledgment to keep external callers responsive.
  • Simulated delay and sample API call help you test the end to end callback pattern.
  • Context values are accessible after resume, combining primary and secondary data.

What are the benefits?

  • Reduce manual follow ups from hours to minutes by letting external systems call back when ready.
  • Eliminate polling loops and cut wait monitoring time by 90%.
  • Stop duplicate updates by accepting only the first callback.
  • Handle hundreds of parallel waits with one repeatable pattern.
  • Connect any service that can send a webhook or HTTP request.

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. Confirm your n8n webhooks are reachable. On n8n Cloud, use the provided public URL. On self hosted, ensure your base URL is accessible from the internet or use a tunnel.
  3. Open the node named Receive Input from External, Independent Process and copy its webhook path. Activate the workflow so the webhook is live.
  4. Open the Set Primary Execution Context node and set the simulatedExternalProcessWorkflowId field to the exact webhook path you copied.
  5. Double click HTTP Request - Initiate Independent Process and verify the URL points to your webhook base URL plus the webhook path. Make sure the body includes resumeUrlForWaitingExecution set to the expression {{ $execution.resumeUrl }}.
  6. Check the Wait node and confirm Resume is set to Webhook with method POST.
  7. Open HTTP Request - Resume Other Workflow Execution and ensure it posts to the resumeUrl provided by the secondary trigger. Adjust the base URL replacement to match your environment if needed.
  8. Optional test path: Activate the Webhook and Respond to Webhook nodes and the following chain so you can simulate an external system doing work and calling back.
  9. Click Test workflow on the primary run. The flow should pause at the Wait node after sending the resumeUrl to the secondary entry point.
  10. Trigger the secondary webhook with a POST that includes resumeUrlForWaitingExecution in the body. You can use the included simulator chain or a tool like curl or Postman.
  11. Open Executions in n8n and verify the paused run resumes. Check the output of This Node Can Access Primary and Secondary to confirm both contexts are present.
  12. Troubleshoot: If the run does not resume, confirm the resumeUrl matches exactly, only one callback is sent, the webhooks are public, and methods are POST. Review the node logs for any errors.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.