Create workflow without webhook or manual trigger, and activate using n8n api
Is it the case that all workflows should have a webhook trigger or manual trigger. I just want a simple workflow which I can trigger using an n8n api call with the workflow_id
Hey, the n8n API doesn’t have an Execute workflow method. Why do you want to avoid a webhook trigger? It’s essentially exactly what you need.
Alternatively, you can do a Scheduled trigger to run every 5 minutes. Then, you can use the n8n API to ACTIVATE (not run) the workflow. It will run once and then you will need to deactivate it before the next run in 5 minutes.
Hey, simply add the webhook trigger, activate the workflow then trigger the Production URL of the webhook like you would normally trigger an API call. Example in terminal with my webhook:
curl http://localhost:5678/webhook/2b8d0fe4-39d1-46fe-a0ee-9f44f30af51b
{"message":"Workflow was started"}
You can even configure the webhook to be a POST request so you can pass data in the Body of the request to use in the other nodes.