n8n errors that waste your first week, and the fix for each
These are common n8n problems that beginners report when they start building workflows. Each one has a short fix. Disclosure: I drafted this post with AI help and edited it myself. I have not run every snippet on a live
These are common n8n problems that beginners report when they start building workflows. Each one has a short fix.
Disclosure: I drafted this post with AI help and edited it myself. I have not run every snippet on a live instance for this article, so check the n8n docs for your version.
1. The webhook works in test but not in production
n8n gives you two URLs for a Webhook node: a test URL and a production URL. The test URL only listens while you click "Listen for test event". The production URL only works when the workflow is active. Switch the caller to the production URL and activate the workflow.
2. A node runs 5 times instead of once
Most nodes run once per incoming item. If the previous node outputs 5 items, the next node runs 5 times. Use the "Execute Once" setting on the node, or merge or aggregate the items first.
3. "undefined" when you read a field
Check the exact path. Expressions look like {{ $json.email }} for the current node input, or {{ $('Node Name').item.json.email }} to read from an earlier node. Name differences, such as a space or different capital letters, give undefined. Add a default: {{ $json.email ?? '' }}.
4. HTTP Request node errors
- 401 or 403: the credential or scope is wrong, or the API needs another header.
- 404: wrong URL or path variable.
- 429: you hit a rate limit. Turn on Retry On Fail and add a Wait node, or use batching.
- 400: the body format is wrong. Check that JSON is sent as JSON and not as form data.
5. Google OAuth redirect errors, and tokens that die after 7 days
The redirect URL shown in the n8n credential must be added exactly in the Google Cloud console. If your OAuth app stays in "Testing" status, Google expires refresh tokens after 7 days. Move the app to production or reconnect the credential.
6. The Code node returns nothing useful
In "Run Once for All Items" mode the Code node must return an array of objects shaped like { json: { ... } }. Returning a bare object or string causes errors.
7. Self-hosting: webhooks show localhost, credentials vanish after a restart
- Behind a reverse proxy, set the
WEBHOOK_URLenvironment variable so n8n builds the right public URLs. - Keep your data folder on a persistent volume, and keep the same
N8N_ENCRYPTION_KEYacross restarts. A new key makes saved credentials unreadable.
Want the longer list?
I put these into a 2-page cheat sheet with 20 errors and a pre-deployment checklist, plus a free sample workflow (lead form to Google Sheets). The sample is built for n8n 1.x and validated structurally, not run end to end on a live instance, so tell me if something fails to import.
- Cheat sheet (PDF, pay what you like from $5): https://ko-fi.com/s/586cbb1f26
- Free sample workflow: https://ko-fi.com/s/3238f384b9
I am the author of those files, so this is a link to my own work.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.