nodes / builtin / flow
Poll Until
Call an endpoint on an interval until a condition is met, or give up
Call a URL again and again until the response says it is ready, or give up after a deadline.
What it does
Section titled “What it does”On each poll, Poll Until sends the request you set up and checks the response against your Done when conditions (combined with AND / OR, as in IF).
- When the conditions hold, the response leaves through Done.
- When the Give up after time passes first, the last response leaves through Timeout.
By default it polls every 5 minutes and gives up after 1 hour. Change the numbers and units to suit the job.
The conditions see the response as { status, ok, body }:
status: the HTTP status code, for example200.ok:truefor a 2xx status.body: the JSON (or text) the endpoint returned.
So a condition’s left side is a path such as body.status, body.result.state or status. A request that fails or times out counts as “not yet”, and polling continues until the deadline.
How it waits between polls depends on the interval:
- 1 minute or more, in the browser extension: durable. The run is saved between polls and resumes on time even if you close the tab or restart the browser. It shows as waiting in the Executions pane.
- Under 1 minute, or in the web app: a simple timer that stops if you close the tab.
When to use it
Section titled “When to use it”- Start a long export, render or build with one request, then poll its status URL until it reports done.
- Wait for an outside system to reach a state: an order ships, a file appears, an approval flips.
Inputs and settings
Section titled “Inputs and settings”| Setting | Type | What it does |
|---|---|---|
| URL (required) | Text | The endpoint to poll. |
| Method | Choice | HTTP method. Options: GET, POST, PUT, PATCH, DELETE. Default: GET |
| Headers | Text | One "Key: Value" per line (e.g. an Authorization header). |
| Body | Text | Request body, for non-GET methods. |
| Done when (required) | Conditions | Stop polling once these conditions on the response hold. Left side is a path into the response (e.g. body.status, or status for the HTTP code). |
| Poll every | Number | How long to wait between polls. Default: 5 |
| Poll unit | Choice | Options: Milliseconds, Seconds, Minutes, Hours. Default: Minutes |
| Give up after | Number | Stop and route to Timeout after this long. Default: 1 |
| Give up unit | Choice | Options: Milliseconds, Seconds, Minutes, Hours. Default: Hours |
Put one header per line in Headers, as Key: Value, for example Authorization: Bearer …. Body is only sent for methods other than GET.
Outputs
Section titled “Outputs”-
Done -
Timeout
Both ports send the response as { status, ok, body } (plus error when the last request failed). Read the result downstream with {{ $input.body }}.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Authentication goes in Headers.
Example workflow
Section titled “Example workflow”- Http Request starts an export and returns a job id.
- Poll Until calls
https://api.example.com/jobs/{{ $input.data.id }}with Done whenbody.status(String) Is Equal Tofinished, Poll every 1 Minutes, Give up after 30 Minutes. - Done goes to an HTTP Request that downloads
{{ $input.body.downloadUrl }}. - Timeout goes to a Browser Notification: “The export is stuck.”
Common issues
Section titled “Common issues”- It always ends on Timeout. Check the path on the left of the condition. It starts with
body.for anything in the response content (body.status, notstatus, unless you mean the HTTP code). - It keeps polling after the job finished. The value may differ from what you compare against, for example
Finishedversusfinished, or a number compared as String. - A long poll stopped when you closed the tab. Durable polling needs the extension and an interval of at least 1 minute.
Related nodes
Section titled “Related nodes”- Wait: pause for a fixed time.
- Loop: repeat any group of steps.
- Http Request: a single call.
- Wait For Approval: wait for a person instead of a URL.