How to Vibe Code n8n Workflows
I've been trying to get Claude Code to build n8n workflows for me for months. It failed every single time, without fail.
The JSON structure of n8n workflows is just too alien and abstracted for coding agents to work with. Claude Code can write Python, JavaScript, React components, whatever. But n8n workflow JSON? It gets close, then it doesn't paste correctly into n8n, and you're left debugging something that was supposed to save you time.
I tried this repeatedly for this website. It would've been useful to describe an exercise workflow and have Claude Code build it for me. Never worked. Then two open-source tools changed that.
What Makes n8n JSON So Hard for AI
When you export an n8n workflow, you get a JSON file. Sounds simple. But inside that file, every node has deeply nested parameter structures, specific expression syntax, connection mappings between nodes, and configuration patterns that don't look like standard code. There aren't millions of training examples for AI to learn from, the way there are for, say, a REST API or a React component. n8n's format is specific to n8n.
n8n Cloud has a built-in AI workflow builder that handles this, but if you're self-hosting (which I recommend), you don't get that feature.
The Two Tools That Fix It
Both tools are by the same developer (czlonkowski) and they're designed to work together.
n8n MCP Server connects Claude Code directly to your n8n instance through the Model Context Protocol. It gives Claude Code access to all 1,100+ n8n nodes with their exact parameters, over 2,700 workflow templates for reference, and the ability to create, update, and manage workflows in your running instance.
n8n Skills are seven specialized instruction sets that teach Claude Code how n8n actually works: expression syntax, node configuration, workflow patterns, validation, JavaScript and Python code nodes. Without these, Claude Code is guessing at the format. With them, it knows the rules.
The MCP server gives Claude Code access. The skills teach it how to use that access correctly. The combination lets it verify its own outputs, catch mistakes, and fix them automatically.
The MCP server also works with OpenAI Codex, Cursor, Windsurf, and other tools that support MCP. The skills are Claude-specific, but they're just markdown files, so you could adapt them for other agents if you wanted to.
Vibe Coding for n8n
This enables something that genuinely wasn't possible before: vibe coding with n8n.
You describe a workflow in plain language. Claude Code searches the node documentation, figures out which nodes to use, configures them, and creates the workflow directly in your instance. When it runs into errors, it reads them, figures out what went wrong, and fixes it.
For beginners, this lowers the entry barrier significantly. Instead of staring at a blank canvas wondering which node does what, you describe what you want and get a working starting point. Then you adjust and customize, which is much easier than starting from zero.
Proceed with caution though. Claude Code still gets details wrong. It might pick the wrong model version or fill in parameters that don't make sense. You should always review what it builds before connecting credentials or activating the workflow.
Why You Should Still Learn n8n
Here's why this course still exists, even with AI that can build workflows for you.
First: it's way easier to instruct the model when you understand what you want to build. "Make me a workflow that does X" is a vague prompt. "Build a workflow with a Schedule Trigger that fires daily at 7am, an HTTP Request node that calls the Perplexity API, and a Code node that formats the response as HTML for Gmail" is specific. The second prompt produces a better result every time. You can only write it if you know the building blocks.
Second, and this is the bigger point: creativity happens during building, not before it.
When you're wiring up nodes yourself, you see data flowing through, and you think "wait, what if I also..." That thought, that mid-build idea, is where the real value is. You don't get that from a prompt. You get it from being in the workflow, hands on, seeing what's possible.
This is the myth of waterfall engineering. You can't plan everything ahead. A lot of it is discovery. And discovery only happens when you're building.
So use AI to build workflows. Use it to get unstuck. Use it to generate starting points. But learn the fundamentals so you understand what you're looking at, and so you can push the work further than any prompt could take it alone.
If you've read the why n8n guide, you know I went from watching tutorials without building anything to actually doing the work. That's still the right approach. AI just makes the doing part faster.
How This Compares to OpenClaw
OpenClaw is a self-hosted AI agent that you talk to through Signal or Telegram. You describe what you want and it runs shell commands, calls APIs, and manages files on your machine. It got popular in early 2026, and it's a genuinely cool project.
The difference is in what you end up with. With OpenClaw, the AI decides how to execute your request every time. The output is non-deterministic. With n8n, you get a workflow that does the same thing every time it runs. You can inspect every execution, debug every step, and share the workflow as JSON. For anything running for your business or clients, that predictability is what you need.
The other issue is security. OpenClaw gives an AI agent shell access to your machine, and its skills marketplace has had problems with leaked credentials and malicious community contributions. For personal tinkering, that might be acceptable. But for most work contexts, you just can't use it. It's not that it's dangerous in a dramatic way, it's that your employer or clients won't (and shouldn't) allow it.
n8n uses scoped API credentials and runs workflows in isolated containers. The Claude Code + MCP approach gives you AI-assisted workflow building on top of that. You get help creating workflows, but the workflows themselves are still stable, inspectable, and safe to run at work.
Setting It Up
You don't need an IDE for this. You never see code. You're just talking to Claude Code and it builds workflows in your n8n instance. Install Claude Code as a standalone app or use it in your terminal.
The setup takes about 20 minutes.
What you need:
- Claude Code installed
- A running n8n instance (self-hosted or cloud)
- An n8n API key (Settings → n8n API in your instance)
Step 1: Create a project folder.
Create a folder on your machine for this project. This is where Claude Code stores its configuration. Open Claude Code and point it at this folder.
Step 2: Install the n8n MCP server.
Tell Claude Code to do it:
"Install the n8n MCP server from https://github.com/czlonkowski/n8n-mcp. My n8n instance URL is your URL and my API key is your key."
It will create the MCP configuration file and connect to your instance. If it asks clarifying questions, answer them. It sometimes tries to be helpful and suggests you install things manually. Tell it to do everything for you.
Step 3: Install the n8n skills.
Same approach:
"Install the n8n skills from https://github.com/czlonkowski/n8n-skills and make sure they're accessible in this project."
This gives Claude Code seven skill files covering expression syntax, node configuration, workflow patterns, validation, and code nodes.
Step 4: Create a CLAUDE.md file.
This is like a system prompt for your project. Tell Claude Code:
"Help me create a CLAUDE.md file. This project is for building n8n workflows in my instance using the MCP server and skills we just installed."
It'll create a structured file that keeps it on track across conversations.
Step 5: Restart and test.
Restart Claude Code (this reloads the MCP server and skills). Then test with: "Search for the webhook node using the n8n MCP server."
If it finds results, you're ready to build.
Tips for Getting Good Results
Use plan mode first. Before telling Claude Code to build anything, switch to plan mode and describe what you want. It'll ask clarifying questions and build a plan. Review the plan before letting it execute. This catches misunderstandings early.
Be specific. "Build me a newsletter workflow" is vague. "Build a workflow with a Schedule Trigger at 7am, an AI Agent using OpenRouter and GPT-5 for research, a second AI Agent using Sonnet 4.5 for writing HTML, and a Gmail node to send the result to my email" is specific. The more specific you are, the less the AI has to guess.
Let it iterate. Claude Code often gets things 80% right on the first pass. The MCP setup lets it verify its own output, find issues, and fix them. Let the loop run.
Connect credentials manually. Claude Code creates the workflow structure, but you connect your actual credentials (Gmail, OpenAI, Slack, whatever) inside n8n yourself. Don't paste API keys into the chat.
Start small. A 5-node workflow works well. A 60-node workflow might time out or overwhelm the API. Build incrementally.
Ready?
You have n8n running. You have the tools to let AI help you build workflows. The question is: what do you want to automate?
If you're not sure yet, that's fine. Work through the course. The exercises will give you the vocabulary to describe what you want and the understanding to evaluate what Claude Code gives you back.