Official n8n API

n8n currently doesn’t have an official API. It would be amazing to have an official API that would allow us to

  1. Activate/Deactivate a workflow via the API endpoint
  2. Check the executions
  3. Create a workflow by providing the JSON

Would be nice to have for managing the credentials too.

4 Likes

An API to query the Workflow Executions and see the Name, Status, Mode, Running Time etc for providing that info to end user without touching the n8n panel.

3 Likes

I’d love to see this too

Hey @scottyb!

Welcome to the community :sparkling_heart:

Can you share your use case? It would really help us understand and make sure that when it is released, we have it covered.

Sure!

We have created a workflow that allows us to sync data two pieces of software for a client.

We found that a few other clients want to use the identical flow. I suspect we might end up with dozens, if not hundreds, of clients using the same flow.

If there was an API we would use it to manage credentials, create a flow for a new customer (and update endpoints) etc.

In essence, n8n would be the logic and queue for delivering what could become a SaaS tool. This frees us up to just manage billing and basic authorisation flows for connecting the software.

2 Likes

Hey all!

I am very interested on it too!

My use case is a bit different I guess: we don’t use n8n UI. Instead, I created a Python client to interact with n8n. This client (very simple!) is based on some reverse engineering I did by observing the requests the UI does.

6 Likes

Hey @victorpantoja Welcome to n8n community.

This is really cool. I just bookmarked it. Will check in the morning :grinning:

Actually I would love to have some kind of API first approach to be able to do anything via API as via UI.

I would be interested in at least the following parts:

  • search and filter executions (e.g. for analytical purposes)
  • get status of executions (e.g. running, waiting, finished)
  • stop/kill running or waiting executions, retry broken executions
3 Likes

May be I don’t understand but n8n can activate/deactivate download etc. Just use the the endpoint you see in the console.

If you add a http request to turn on and turn of you are done. Can do this from a separate flow based on Cron.

1 Like

Is there any updates regarding a possible API?

Hey @victorpantoja,

It is getting there, you can check the progress here: n8n Public API by RicardoE105 · Pull Request #3064 · n8n-io/n8n · GitHub

1 Like

Awesome!! Thanks!

Got released with [email protected]

6 Likes

Amazing, @jan !

Great to hear!!

Are you or is anybody already working on a node for n8n to work with the n8n API?

Awesome, and really loving the API & docs! I did notice that workflow detail GET /workflows/{id} doesn’t include the workflow tags. Is that intended?

Amazing to finally have the n8n API!

Would also love it if it was possible to filter workflows by the nodes, and/or get the list of nodes used in a workflow.
Use-case: it often becomes important to identify which workflows are using a particular node and currently there’s no direct way to achieve that.

Cheers,

1 Like

Thank you for the API, works great!