Hey everyone ![]()
I wanted to ask if it’s possible to execute a specific workflow directly via an API call — without using a webhook trigger or the CLI command.
I’ve looked through the available REST API endpoints but couldn’t find any documented way to start a workflow programmatically. The webhook-based approach works in some cases, but it’s not always consistent or practical for internal automation. The CLI command also isn’t an ideal solution for this use case.
Is there an official (or even internal) API endpoint that allows me to trigger a workflow by its ID, similar to how the “Execute Workflow” button works inside the n8n editor?
Thanks in advance!
short answer: No, there isn’t a documented public REST API endpoint in n8n that allows you to trigger an arbitrary workflow by its ID in the same way that clicking “Execute Workflow” in the editor does.
PS. Could you share detailed information why webhook works only in some cases? Maybe there is some workaround or other option to solve your issue. With bigger context it will be easier to solve it.
Retry Execution Endpoint can be usefull in some cases…
I came across a private REST API endpoint that seems to be called when the “Execute Workflow” button is clicked in the editor. I’m curious if anyone knows what payload structure and headers this endpoint expects in order to execute a workflow reliably.
For context, I’m aware of the webhook-based approach, where adding a Webhook trigger allows a workflow to be executed by simply calling the webhook URL. However, I’m interested in understanding how the internal “Execute Workflow” API call works behind the scenes, and whether it can be safely used for consistent execution.
Without telling us what your use case is, it’s impossible to help.
The n8n code is open source, go check it on GitHub and you’ll understand..
But trying to reverse-engineer or mimic the UI interaction is just a waste of time IMO,
Sure, you could replicate the request, but why?! Not to mention the cookies, CORS, and other restrictions that would make it unnecessarily complicated.
Again, if you explain what you’re really trying to do, I’m 100% sure there’s a proper solution for your use case that you just haven’t mentioned yet..
I’m currently working on a project at my company where we’re developing a custom wrapper around n8n. As part of this, we need to execute workflows programmatically from our application.
So far, I’ve explored a couple of approaches:
-
Triggering the workflow using a Webhook trigger.
-
Reverse-engineering the internal API (as you mentioned earlier, this would likely make things unnecessarily complicated).
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
