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-devin 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
I am exploring the execution via CLI using n8n execute --id <ID> as described in this part of the doocumentation but the execution of the following workflow seems stuck at the User settings loaded from: /home/node/.n8n/config
Here is the workflow (although it is a simple just to test the execution):