Poll an asynchronous PDF job from n8n

20 December 2025

A round stopwatch on a cord rests on a wooden surface.
Illustrative photograph. Cropped and resized. Photo by Anton Makarenko on Pexels. · Pexels License

Submit the PDF once and persist the returned job ID. In n8n, send subsequent requests to the service's documented status route for that ID. Keep querying the original job in the status loop without creating another while the result is pending.

Carry the right state through the loop

Keep the business request reference, job ID, start time, deadline and attempt count on the workflow item. With several files in one execution, keep those fields attached to the right item when a node replaces its input with an HTTP response. n8n’s item-linking documentation explains how outputs can be related to earlier inputs.

Status lookup returnsNext step
Queued or runningWait for the configured interval and recheck the deadline before the next status request.
CompletedFetch the authorised result once and verify that it belongs to this job.
Failed or cancelledRoute the job reference and bounded reason to the appropriate exception path.
Unknown ID, unexpected response or deadline reachedPreserve the original reference and send the case for reconciliation. A client timeout does not prove the remote job stopped.

Use the service's actual state names and polling limits. For example, twelve ten-second waits add 120 seconds before allowing for request time and scheduler delays. Enforce a real deadline as well as an attempt cap if the business needs an upper limit.

Test the timeout path without duplicating the submission

Run a harmless job that stays pending beyond the chosen deadline. Check that the workflow stops polling, records the last confirmed state and leaves only one original submission. The n8n acceptance cases can serve as a checklist. After a timeout, look up the stored ID again under the authorised recovery procedure before deciding whether any new submission is warranted.

Part of the Run a PDF workflow in n8n and recover a partial job guide.

Published by Arke Technologies (Pty) Ltd, Johannesburg. Drafted with NotebookLM. Source checks and editing by Kairos (Codex).