n8n 2.20: publish your sub-workflows and error workflow first
In n8n 2.20.8 a published workflow could not run an unpublished sub-workflow or error workflow. What we saw in testing, and an install order that avoids it.
While acceptance-testing the Reliable Automation Kit on self-hosted n8n 2.20.8, two errors showed up that had nothing to do with our logic. Both came from the order in which workflows were published. If you split work into sub-workflows, or use a central error workflow (and you should), this will save you an afternoon.
What we saw
In our pinned lab, on n8n 2.20.8:
- A published parent couldn't execute an unpublished sub-workflow. The parent calls a shared sub-workflow through Execute Workflow. Until the sub-workflow itself was published, the call failed.
- A published workflow couldn't use an unpublished error workflow. The parent's Settings → Error workflow pointed to a central handler that existed but wasn't published. A failure in the parent didn't run the handler.
Both reproduced reliably, and both went away once the called workflow was published. We've only verified this on 2.20.8. Other versions may behave differently, so test yours.
Why it matters more than it looks
The second case is the dangerous one. The error workflow is supposed to be your safety net. If it isn't published, the net isn't there. You get no alert, and you've no reason to suspect anything until someone notices missing results.
The first case is noisier, but it's also easy to miss. It typically appears right after a fresh install or an import into a new instance, when everything is unpublished at once.
An install order that avoids it
Publish from the bottom of the call graph upwards:
- Shared sub-workflows first. Idempotency gates, formatting helpers, anything called through Execute Workflow. Publish each one, then copy its workflow ID.
- The error workflow next. Publish it before any workflow points to it.
- Callers last. Paste the sub-workflow IDs, set Settings → Error workflow, then publish.
After an import or migration, check the same thing again: every workflow referenced as a sub-workflow or error workflow must be published.
Make it checkable
- Make the error workflow loud. Run a deliberately failing test workflow once after every deploy, and confirm the alert arrives. If you don't get it, something in the chain isn't published or isn't wired.
- Watch for silence too. A broken error handler and a stopped workflow look the same from the outside: nothing happens. A silence watchdog catches the second case. A test failure catches the first.
- Audit the settings. Our free n8n Reliability Audit lists every active workflow with no error workflow configured. Pair it with the publish-order rule above.
A five-minute check after any import or migration
- List the workflows that other workflows call through Execute Workflow. Each one is published.
- Open the error workflow. It's published, and its alert destination is reachable.
- Every production workflow has Settings → Error workflow set to that handler.
- A deliberately failing test workflow produces an alert within a minute.
- Any workflow IDs pasted into Execute Workflow nodes match the IDs on the new instance. Imports can assign new IDs.
That last point causes a related failure: after moving to a new instance, a parent may point to a sub-workflow ID that doesn't exist there. The fix is the same. Work bottom-up, publish, then update the IDs in the callers.
Related findings from the same lab
- The n8n CLI could reject importing a single workflow file without an ID, while
import:workflow --separateaccepted it. - Array-valued query parameters in the Postgres node handled values containing commas, apostrophes and Unicode as single values.
The full list, with pinned versions and results, is in our release validation report. The lab setup is described in how to acceptance-test n8n workflows in a disposable Docker lab.
Related
Your n8n workflow stopped running and nothing turned red
The error workflow only fires when a run starts and fails. How to catch dead schedules, disabled webhooks and expired triggers with a silence watchdog.
The n8n error workflow, done properly: useful alerts without the spam
Build an n8n error workflow that tells you what broke and what to do, classifies errors, and mutes repeats so one expired token doesn't flood Slack.