How to complete the `n8n execute --file` command with cloud api

Describe the problem/error/question

On the web side, after creating a workflow, there is a Test workflow button at the bottom of the page, which can be used to test the created workflow. This is a very important feature.

However I looked at the API and didn’t find one for testing workflows. I need to create a workflow to upload a json file through the API, test it and get the results of the test. How do I accomplish this requirement through API.

Just like using the n8n execute --file *** command locally. How do I accomplish this using the cloud api?

It looks like your topic is missing some important information. Could you provide the following if applicable.

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

Hey @eloik,

Welcome to the community :cake:

On cloud you don’t have access to the n8n command itself so you may need to do that locally, The API also doesn’t have an option to run a workflow as you could do that from a webhook node.

Depending on what you want to test you could use a webhook node and pass a workflow id then use an n8n node to get the workflow from the api and use the output in an Execute Workflow node… or pass the ID directly to the execute worklfow node.

Sounds feasible. I’ll try. Thank you.

1 Like

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