How to use an API to execute a workflow

Describe the problem/error/question

I’m currently working on a feature to integrate the Execute workflow into our app. I couldn’t find it in your Public API, but I can see in your interface that it’s calling a private endpoint /rest/workflows/run. But how can we use it in our API to call that?

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @wardo1230,

I wouldn’t recommend using the internal API as it is undocumented and may change, Instead what you could do is create your own API using a webhook and the execute workflow node which would give you more control over it.

If you really did want to go down the unsupported route though if you pop open your browser and manually run a workflow with the browser dev tools open it will show you the payload that is sent.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.