We build n8n automations for clients every week, and the slowest part used to be clicking nodes together and hunting for the right field names. Now I describe the workflow to Claude Code, it builds it in our n8n instance, and I review it, a bit like dictating a letter to someone who types faster than you and then reading it before it goes out.
What you need
- Claude Code installed
- An n8n instance you can reach (self-hosted or cloud) and an API key from n8n → Settings → n8n API
- The open-source n8n-MCP server, which gives Claude the docs and schemas for every n8n node, plus tools to create and update workflows
Setup
- Add the n8n-MCP server to Claude Code with your n8n URL and API key as environment variables. The exact command is in the n8n-MCP README; it's one
claude mcp add …line. - Restart Claude Code and ask it to list your workflows. If that works, it's connected.
- Keep the API key in an environment variable, never in a prompt or in a file you commit.
The 4 rules we give it
- Search the node docs before using a node. Without this it guesses parameter names from memory and gets them half right.
- Validate before saving. n8n-MCP has a validate tool, and the workflow doesn't get created until validation is clean.
- Never touch a live workflow directly. It builds a copy, we test it with pinned sample data, and then we swap.
- No real customer messages while testing. Test data only. This one matters most for anything that sends WhatsApp messages or email.
A prompt that works well
Build an n8n workflow: when a new row is added to the "Leads" Google Sheet, wait 5 minutes, send a WhatsApp message to the number in column C using the template in column D, and log the result in column E. Search the node docs first, validate before saving, and don't activate it.
Where it still needs a human
- Credentials: you connect them in n8n yourself.
- Anything with money, prices or customer promises: read the prompt the AI node uses, line by line.
- Error handling: ask for it explicitly, or you'll get a happy-path workflow that fails silently.
If people want, I can share the system prompt we keep in our CLAUDE.md for n8n work.
I run Arwahyn AI, an AI automation agency in Dhaka. There's a step-by-step Bangla version of this setup on our blog, and we run free live AI automation classes in Bangla every Friday and Saturday at 9:30 PM Dhaka time at Arwahyn Academy.