n8n is an incredible tool for automation. But its native AI assistant has a few drawbacks: it usually requires a specific Cloud subscription, it has usage quotas, and ultimately, itโs a "black box."
I previously explored the concept of "n8n as code" in my article Stop Clicking. Start Coding. Back then, it was a CLI only approach.
Today, the concept has evolved.
I am excited to introduce the n8n-as-code VS Code Extension. This tool allows you to build and manage your workflows using your own AI agents directly inside your IDE.
Whether you use Roo Code, Cline, or Cursor, you can now choose your own model, avoid quotas, and work locally.
๐บ Watch the Demo
See how fast it is to generate workflows using VS Code and AI in this 2 minute overview:
๐ The Tutorial: How to set it up
Here is the step-by-step guide to connecting your local AI agents to n8n using the extension.
Step 1: Get your n8n Credentials
First, you need to allow VS Code to talk to your n8n instance.
- Open your n8n dashboard.
- Go to Settings > API.
- Click Create New API Key and copy it.
Step 2: Configure VS Code
Now, let's set up the environment.
-
Install the Extension: Search for
n8n-as-code\in the Visual Studio Marketplace and install it. - Configure: Open the extension settings.
- Paste your API Key and your n8n Instance URL.
Step 3: Let the Magic Happen (The AI Part)
This is where the workflow changes completely.
- Open your workflow file (JSON) in VS Code.
- Open your AI Agent on the side (e.g., Roo Code or Cline).
- Simply ask the AI to modify the workflow using natural language.
Example prompt:
"Add a Google Sheets node that reads the last row and connect it to the Slack node."
Because the file is just text, the agent writes the code directly in front of your eyes. It is instant.
Why this is a Game Changer
- No Quotas: You are not limited by n8n's cloud tiers. You use your own API keys (OpenAI, Anthropic, DeepSeek, etc.).
- No Limits: Work on complex logic without hitting arbitrary walls.
- Local & Cloud: This works whether your n8n is hosted on the official Cloud or self-hosted on your own server.
๐ Get Started
Ready to liberate your n8n productivity?
- Download the Extension: n8n-as-code on VS Marketplace
Stop clicking. Start creating.
Top comments (1)
This extension is of course open source :
github.com/EtienneLescot/n8n-as-code