Workflow step

Wait for Webhook

Send a job to an external service, pause this workflow, and continue with the JSON that the service posts back. Each run gets its own callback URL. Inside a Loop, each iteration gets its own URL.

Send a job and receive its result

Suppose a rendering service accepts a job immediately, then posts the finished file URL to a callback address.

  1. Start with a draft workflow (pause an active workflow while connecting these two steps). Add an HTTP Request that posts to the service’s job endpoint. Configure its authentication and required job inputs. A provider Action that accepts a callback field also works.
  2. On the sending step’s normal output, choose Add step → Wait for Webhook. Set Timeout in seconds, for example 3600 for one hour, then save.
  3. Reopen the sending step. In the service’s callback field, select Callback URL from the wait step in the data picker. For an HTTP JSON body, insert the field token into the value of the property the service expects, such as callback_url. The mapping path is callback.url. FastHook creates the actual URL before sending the request.
  4. Save the sending step. Add an Action or Code after the wait to use the result. For example, if the callback contains the JSON below, map input.file_url into the next action.
  5. Activate the workflow and submit a synthetic trigger event. Have the external service send a POST to the supplied URL with Content-Type: application/json and the final result.
JSON
{"job_id":"render-42","status":"ready","file_url":"https://example.org/files/render-42.pdf"}

Open Run history. Check that the sending Action succeeded, open Data out on Wait for Webhook, then inspect the next step. The sending Action’s immediate response remains available under that Action. The wait’s output is the callback body itself. To try a sample first, reopen Wait for Webhook, paste the example into Sample callback JSON, and choose Test sample callback. The preview does not create a live URL. To verify the round trip, start a run from its trigger.

Example job request

Choose POST and the JSON body type in HTTP Request. This example assumes the rendering service calls its callback parameter callback_url. Replace the job parameters with the ones your service expects.

JSON
{"template":"invoice","callback_url":"{{callback.url}}"}

The service should send the final result to the complete URL it receives, including the query string. If the sending Action fails, check its response in history before retrying. A new execution that starts directly at the wait cannot recover a URL issued for another run. Include the sender when submitting a new job.

Timing, retries and limits

  • The timeout starts when FastHook prepares the URL, before sending the job. Set a whole number from 1 second to 30 days. A callback that arrives while the sending Action is still running is saved. A callback wakes the worker through its queue. A scheduled check every five minutes also recovers a missed wake-up. Queue congestion can increase that interval. A result accepted before expiry remains valid even when the worker wakes later.
  • The first accepted JSON body wins (HTTP 202). A duplicate before expiry receives HTTP 200 and leaves that body intact. Expired URLs return 410. Unknown URLs return 404. Invalid JSON, oversized bodies, and unsupported media types return 400, 413, and 415 respectively. The size limit is 16 KiB of UTF-8 JSON.
  • If the service never responds, the wait fails with workflow_callback_timeout. Connect an error route for a notification or recovery. Start a fresh run from the trigger to send a new job after expiry.
  • Connect one wait directly after one sending Action. Inside a Loop, place both steps in the same Loop body. Use an explicit Loop when each job needs an independent callback.
  • Treat the URL as a bearer credential. Send it over HTTPS only to the intended service. Anyone who obtains it can submit the first result. The endpoint accepts JSON without collecting request headers or verifying provider-specific signatures. Send only fields you want available in workflow history. The callback URL and the body are different: the URL authorizes delivery, the body becomes step output.