I have a strange behavior with my webhooks.
sometimes, when i call webhooks in my n8n instance i m getting errors. then i enter the execution logs and i see an old obsolete workflow.
i switch over to the editor and there is my correct actually workflow.
it seems n8n called old webhooks and not the up to date one in some cases.
i have to “unpublish” and “publish” and its working again but i could not figure out how and when this is happing.
You’re not alone this is a known gotcha with webhooks, especially on self-hosted Docker setups, and I can help you track it down and fix it properly.
What you’re describing usually points to stale webhook registrations being served even though the editor shows the latest workflow. This can happen due to:
Old webhook definitions still cached/registered internally
Multiple workflow IDs sharing the same webhook path at different times
Container restarts or upgrades not fully re-registering active webhooks
Reverse proxy / load balancer caching (very common with Docker + nginx/Traefik)
The fact that unpublish → publish fixes it is a strong signal that the webhook registry is getting refreshed manually.
If you’re open to it, I can help you:
Identify why the obsolete workflow is still being called
Check for duplicate webhook paths or lingering registrations
Verify whether this is coming from n8n’s internal webhook table vs proxy caching
Set up a clean, stable pattern so this doesn’t keep happening
If you want, share:
Whether this webhook is Production or Test
If you’re behind nginx / Traefik / Cloudflare
Whether the workflow was duplicated or renamed at any point
Happy to help you get this fully resolved instead of relying on re-publishing every time.
Thanx very much for your fast reply!
Yes indeed i m behind cloudflare tunnels.
I m actually building up a system and i got around 25 different workflows in my project folder.
I goin thru the setup and working and editing the workflows while they are active/published so it can happen fast, that i forgot to “start/stop” workflows after editing…so i guess this was the case here.
But in a production system with maybe alot of webhooks its hard to remember to pub/unpub everytime you made little changes…
A function like “unpub/pub all” for a complete group or folder for a webhook collection would make it save…or something…just my thoughts…
But yes i prolly have to go to all the webhooks and “unpub/pub” them all to be sure its working for demonstration and in productions…
Could end in alotta clickedie-click