Quick answer: n8n is a visual automation tool where you connect blocks (“nodes”) instead of writing code. To build your first AI agent, connect four nodes: When chat message received → AI Agent → Google Gemini Chat Model (free key) → Simple Memory, then add a tool like Calculator or Wikipedia. You can start with n8n Cloud’s 14-day trial (no card) or self-host the free Community Edition with Docker. Total time: about 30 minutes.
What is n8n, in plain English?
Imagine a dabbawala system for your apps. Each dabbawala (node) picks something up, passes it to the next one, and the lunch reaches the right desk on time, every day, without you touching it. n8n lets you design that chain: “When a form is filled → save to Google Sheets → send a WhatsApp/Email → ask AI to summarise”.
What makes n8n special in 2026 is its AI Agent node. Instead of a fixed chain, you give an AI model a goal plus some tools, and it decides which tool to use, step by step. That’s an agent. New to the idea? Read Building blocks of AI Agents.
Cloud, self-host or VPS: which should you use?
| Option | Cost | Good for |
|---|---|---|
| n8n Cloud | 14-day free trial (no credit card), then paid | Fastest start, zero setup |
| Self-host on your laptop (Docker) | Free Community Edition | Learning and personal automations |
| Self-host on a VPS | Free software + VPS rent | Agents that must run 24/7 |
License note: the Community Edition is free to self-host under n8n’s Sustainable Use License. Using it for your own or your company’s internal workflows is fine, but you can’t resell n8n itself as a hosted service. Read the license if you plan a business on it.
Step 1: Start n8n
Option A, Cloud (easiest): sign up at n8n.io for the free trial and skip to Step 2.
Option B, Docker on your computer (free): install Docker Desktop, then run:
docker volume create n8n_data
docker run -it --rm --name n8n -p 5678:5678 \
-e GENERIC_TIMEZONE="Asia/Kolkata" -e TZ="Asia/Kolkata" \
-e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
-v n8n_data:/home/node/.n8n \
n8nio/n8n
Open http://localhost:5678 and create your owner account. (n8n’s docs now recommend Docker Compose for long-term setups; the command above is perfect for learning.)
Option C, VPS for 24/7 agents: a small VPS is enough to start. For example, Hostinger’s own n8n guide suggests at least 1 vCPU and 1 GB RAM, with 2 vCPU/2 GB recommended.
Step 2: Get a free Gemini API key
- Go to Google AI Studio and create an API key (free tier available). Our free LLM API guide shows the exact screens.
- Copy the key. You’ll paste it into n8n, not into any prompt.
Step 3: Build your first AI agent
- Click Create workflow.
- Add the trigger When chat message received. This gives you a chat box to test with.
- Click + after it and add AI Agent.
- On the AI Agent’s Chat Model slot, add Google Gemini Chat Model. Create a new credential and paste your API key.
- On the Memory slot, add Simple Memory so the agent remembers earlier messages in the conversation.
- On the Tool slot, add Calculator and Wikipedia.
- Open the AI Agent node and write a system message (below).
- Click Open chat and talk to your agent.
You are "Chotu", a friendly study assistant for Indian students.
- Use the Wikipedia tool for facts about people, places and events.
- Use the Calculator tool for ANY maths, never calculate in your head.
- Keep answers under 120 words and use simple English.
- If you are not sure, say so.
Test it: ask “Who was C. V. Raman and how many years ago did he win the Nobel Prize?” Open the execution log and you’ll see the agent call Wikipedia, then Calculator, then answer. That decision-making is what makes it an agent.
Write tool descriptions like you’re briefing a new colleague
The agent chooses tools by reading their names and descriptions. Vague descriptions mean wrong choices. “Database” is bad. “Look up a customer’s order status by order ID (format ORD-12345)” is good. This one habit improves agents more than switching models.
Keep cost and loops under control
- Set a max iterations limit on the AI Agent node so a confused agent can’t loop forever.
- Start with a free or cheap model, and upgrade only for steps that need more reasoning.
- Add a human approval step before anything irreversible (sending emails, payments, deleting data).
3 starter agent ideas
- Inbox summariser: every morning, summarise unread emails and post the top 5 actions to Telegram or Slack.
- Lead qualifier: when a website form arrives, the agent researches the company, scores the lead and adds it to Google Sheets.
- FAQ bot for a local business: answers timings, prices and booking questions from a Google Doc.
Troubleshooting
- Agent doesn’t answer / credential error: recreate the Gemini credential and check the key has no extra spaces.
- Agent forgets the conversation: make sure Simple Memory is connected to the AI Agent’s Memory slot.
- Workflow stops after the chat trigger: check the AI Agent is connected to the trigger’s output (the arrow), not just placed nearby.
- Localhost URL won’t open: confirm Docker is running and port 5678 isn’t used by another app.
FAQ
Is n8n free? The self-hosted Community Edition is free. n8n Cloud is paid after the 14-day trial. You also pay for any AI model usage beyond free tiers.
Do I need coding? No. But a little JavaScript (for the Code node) makes you much more powerful.
n8n vs Zapier vs Make? n8n can be self-hosted and has strong AI agent features; Zapier and Make are fully hosted and very beginner-friendly. See more options in our AI agent builders list.
Your next step
Build “Chotu” today, then turn it into the inbox summariser. Once you’re comfortable, connect your agent to real tools with MCP. Our MCP setup guide explains the idea.

