I can’t import via CLI or API a workflow that is triggered by a webhook
TL;DR
I need to import a workflow that will be triggered only via a webhook.
The webhook returns 404 until I update the workflow on n8n UI.
Once I do that, it works properly.
But I need it to be programmatically.
Does anyone has a workaround about this ?
Original version:
I have pulled a bunch of my hair on this one.
I am in the exact same situation as @dingo-dev in his post trying to build a CI/CD pipeline and automating workflow creation.
I need to run integration tests from Github Actions (hence the need for zero UI intervention) that would call an automation via webhook and assert the result, before committing the workflow to the GitHub repository.
I tried:
- Importing via CLI then activating via CLI
- Importing via CLI then activating via API
- Importing via CLI then activating I then deactivating then reactivating via API
- Importing via CLI then making a PUT on the workflow via API
- Importing via API , then activating via API
The webhook won’t work until I touch it via the UI
Does anybody know any workaround ?
Even if it is triggering a workflow programmatically with another way than webhook
Information on your n8n setup
- n8n version: 1.84.3,
- Database: PostgreSQL
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: Ubuntu 22.04 or Mac OS 15.4