Re-importing an n8n workflow silently kills its webhook
The obvious way to edit a workflow outside the UI is to export it, change the JSON, and import it back. If the workflow is webhook triggered, do not.
Importing replaces the workflow row. The webhook registration is a separate record keyed to that workflow, and it does not survive the replacement.
What you are left with is a workflow that still shows as active in the editor, still looks correct, and whose public URL returns 404. Nothing is logged. If that webhook was taking orders or inbound email, you will find out from the silence.
How to check
After any structural change, confirm the registration still exists:
SELECT "webhookPath", method
FROM webhook_entity
WHERE "workflowId" = 'yourWorkflowId';
No rows means no registration, whatever the editor says.
Recovery
- Deactivate the workflow.
- Clear any stale webhook rows for it.
- Activate it again.
- Restart the instance so registrations rebuild.
The better habit
Edit in place rather than replacing. Changing the contents of a workflow leaves the row, and therefore the registration, alone. If you must import, do it on a workflow that is triggered by a schedule or manually, never one that something external calls.
The general lesson is worth more than the specific one. Any operation that replaces a record rather than updating it will take its dependent records with it, and automation platforms are full of those relationships. Ask what else points at the thing you are about to replace.
Need help with any of this?
These notes are free and always will be. If you would rather someone just set it up, or you are stuck on something similar, get in touch at hello@opsira.io.