n8n error workflow: make it fire when an API job fails
An n8n error workflow runs only when an execution fails. A remote job that ends failed is a normal 200 read, so check its status and throw with Stop And Error.

An n8n error workflow is a separate workflow that starts with an Error Trigger node; you select it under Error workflow in another workflow's settings, and it runs when that workflow's execution fails. It won't fire when a remote API job fails, because reading a failed job's status is a successful HTTP call. Check the status field, and send failed to a Stop And Error node, which fails the execution on purpose and triggers the error workflow with your message.
n8n facts come from its error handling, Error Trigger, Stop And Error, HTTP Request and node settings pages. The API example is Sume's, from Jobs and results, Errors and rate limits and Runs and results. All were read on 2026-09-29. Sume has no n8n node; the workflow calls its API with the HTTP Request node.
How do I set up an error workflow in n8n?
- Create a new workflow with the Error Trigger as its first node, name it (for example Error Handler) and save it. It doesn't need to be published.
- In the workflow you want to watch, open Options > Settings, choose that workflow under Error workflow, and save.
- Add the alert you want after the Error Trigger, such as an email or Slack message. One error workflow can serve many workflows.
- Test it with a real automatic run. The Error Trigger only runs when an automatic workflow errors, not when you run a workflow manually.
Why doesn't my n8n error workflow fire?
Check three things. Was the run manual? The Error Trigger ignores manual runs. Did the failing node have On Error set to Continue? Then the workflow carried on with the last valid data. Or did nothing in n8n fail at all, only the remote job?
The last case is the one paid API workflows hit. The HTTP Request node reports success on any 2xx response. Polling a Sume job whose work failed is still a successful read: in current code GET /v1/jobs/{id}/status answers 200 with the job's status inside, so the node succeeds and the workflow moves on.
Don't poll the result URL instead. GET /v1/jobs/{id}/result is only for completed jobs and answers 409 job_not_completed for any other status. That would fail the node, but for the wrong reason and without the job's own error.
How do I fail the workflow when the API job fails?
Poll until the job is terminal (completed, failed or canceled), then add an IF node on the status. Send the failed branch, and canceled if you treat that as an error, to Stop And Error. Its Error Message type takes a text message; its Error Object type takes a JSON object of error properties. Put the job id and the API's reason in it.
| What you poll | The failed value | Where the reason is |
|---|---|---|
Sume job: GET /v1/jobs/{id}/status | sume_status is failed | job.error on GET /v1/jobs/{id} |
Format run: GET /v1/format-runs/{run_id} | status is failed | error on the same receipt |
What does the error workflow receive?
The Error Trigger gets the failed execution's id and url, error.message, lastNodeExecuted, and the workflow's id and name. The execution id and URL are there only when the execution was saved to the database. Stop And Error is how you put your own message into that payload.
A failed Sume job carries public error metadata: category, stage, retryability, retry-after seconds, public reason and next action. Copy the category and next action into the Stop And Error message so the alert says what to do. Why did my AI video job fail? explains each category, and n8n Retry On Fail for paid API calls covers errors on the create call itself.
Sources
Related posts
More in Integrations
- n8n Loop Over Items: batch paid API calls under a rate limit
n8n's Loop Over Items node sends items through in batches of Batch Size, then emits all results on done. Pair it with Wait to pace a paid API.
- Automate video editing with n8n: caption and cut by API
Automate video editing with n8n: an HTTP Request node submits a caption or cut job, a Wait node resumes on the webhook, a last node reads the file.
- n8n webhook timeout: respond immediately, then do the work
On n8n Cloud a webhook that hasn't answered in 100 seconds fails with a 524. Set Respond to Immediately, do the slow work after, and dedupe sender retries.
- p-retry npm: retry a paid API POST and stop on errors
p-retry reruns an async function with exponential backoff. Throw AbortError on answers a resend can't fix, and keep one Idempotency-Key per job.
Written by Sume