N8n for AI Agents

Is anyone else trying to get their AI agents to ‘talk’ to n8n from their IDE?
I’m a no-coder building in Antigravity, and while I use n8n for all my backends, I really miss having a unified workplace. I want my agent to be able to tweak my n8n workflows just like it tweaks my code. Has anyone figured out an MCP connection or a workaround to make n8n workflows editable directly within an IDE? Would love to know if anyone has cracked this

1 Like

Hi @zederick There isn’t an official way yet to edit n8n workflows directly inside an IDE with an AI agent like you edit code.

Right now you can:

  • Let AI tools use workflows via n8n’s MCP server (they can search, inspect, trigger), but not truly edit them in-IDE.

  • Programmatically read and update workflows by fetching their JSON with the n8n REST API (GET /workflows/{id}), letting your agent modify it, and then sending it back (PUT /workflows/{id}).

So you can hook your IDE/agent to n8n’s API and have it modify workflow JSON, but there’s no built-in “workflow editor inside your IDE” yet.

2 Likes

@zederick you can actually treat n8n as a programmable backend for your IDE or AI agents. I’ve had success using Claude and Cursor to generate and modify workflows directly by hitting the n8n REST API.

The key is providing your LLM with the n8n API documentation and a few examples of the workflow JSON schema in its context window. While the new AI Agent node is great for triggering logic from your IDE, using the REST API endpoints to POST or PUT workflow JSON is the way to go if you want the agent to actually build or edit the flows for you.

Hope this helps!

2 Likes

Super thankful for the tip! I’ll go play around with the REST API for a bit and see if I can get it working. Cheers!

You are welcome. If you found it helpful you can mark as the solution.

1 Like

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