Marketing Automation with n8n
Marketing automation with n8n means building workflows in n8n, a workflow automation tool, that move marketing data between apps and act on it without manual copying. Each workflow is a chain of connected nodes, where a trigger starts the run and every following node reads, changes or sends data, including AI steps that classify or write text.
- Nodes: Each application or action is represented by a node, such as Google Sheets, Gmail or an AI Agent.
- Triggers: A workflow starts from an event such as a form submission, from a schedule, or from a manual run.
- AI steps: The AI Agent node lets a language model classify, summarise or draft text inside the workflow itself.
- Hosting: Use n8n Cloud or run it on your own server.
- Control: You can inspect every run in the executions list, including the data that passed through each step.
This tutorial builds one workflow for a NEET coaching institute in Lucknow. Enquiries arrive from its website at all hours, and counsellors lose valuable time copying them into a spreadsheet and deciding which students to call first. The finished workflow saves each enquiry, uses AI to classify it by course and urgency, alerts a counsellor whenever a student requests a call, and sends the brochure to students who specifically asked for it.
Prerequisites for Marketing Automation with n8n
- An n8n account: An n8n Cloud workspace, or a self-hosted installation that someone on the team maintains regularly.
- A Google account for the business: For Google Sheets and Gmail, owned by the institute, not a staff member's personal account.
- An AI model key: Credentials for a chat model that the AI Agent node supports, such as models from OpenAI, Anthropic or Google.
- A consent field on the form: A tick box that asks, in plain words, whether the student agrees to receive course emails. The rules are in the DPDP Act lesson.
- Basic agent ideas: The n8n AI agent lesson explains how the AI Agent node, its model and its tools fit together.
Setup: Prepare Sheets and Credentials
- Create a Google Sheet called "Enquiries" with columns: date, name, phone, email, course, class, wants_call, consent, ai_course, ai_urgency, status.
- In n8n, open Credentials and add a Google Sheets credential and a Gmail credential, signing in with the institute's Google account.
- Add a credential for your chosen AI model provider.
- Create a new workflow and name it "Website enquiry to counsellor".
Step-by-Step: Build the Enquiry Workflow
Step 1: Add the Form Trigger
Add the n8n Form Trigger node, or a Webhook node if your website form already exists. Add fields for name, phone, email, course of interest, current class, "Would you like a call?" and the consent tick box. Copy the form or webhook URL into your website.
Submit one test enquiry yourself, so the node has realistic sample data to work with in the following steps.
Step 2: Save the Lead to Google Sheets
Next, add a Google Sheets node and choose the Append row operation. Pick the "Enquiries" sheet, map each form field to its matching column, and set the status to "new". Keeping every enquiry in one sheet means nothing is lost, even if a later step in the workflow fails.
Step 3: Sort the Lead with the AI Agent Node
Add an AI Agent node and connect the chat model credential. In its system message, tell the model exactly what to return:
You sort enquiries for a NEET coaching institute in Lucknow.
Courses: NEET repeater batch, Class 11 two-year programme, Class 12 one-year programme, crash course.
Read the enquiry and reply only with JSON:
{"ai_course": "<one course from the list or unclear>", "ai_urgency": "high | normal", "reason": "<one short sentence>"}
Mark urgency high only if the student mentions an exam date within 3 months or asks to join a batch this month.
Do not guess fees, results or batch dates.Pass the enquiry fields into the user message with expressions, such as the course and class fields from the trigger. Turn on the output parser option so the reply is checked against the JSON format.
Step 4: Write the AI Result Back
Add a second Google Sheets node with the Update row operation. Match on the row you just added and fill in ai_course and ai_urgency, so counsellors now see the classified lead in the spreadsheet they already use every day.
Step 5: Branch with the IF Node
Add an IF node that checks whether wants_call is "yes".
- True branch: A Gmail node sends an alert to the counsellors' inbox with the student's course, class, urgency and the AI's reason. The subject line starts with "HIGH" when urgency is high, so they call those students first.
- False branch: A second IF node checks the consent field. If the student agreed, a Gmail node sends the brochure email they asked for. If not, the workflow stops, and the lead waits in the sheet for a normal reply.
Step 6: Test with Real Examples
Submit five test enquiries that cover each case: a repeater with an exam soon, a Class 10 student asking about Class 11, a student with no consent, a vague message, and one in Hindi. Open Executions and check the data at every node.
Step 7: Turn It On
Activate or publish the workflow so it runs for every new enquiry. Add an Error Trigger workflow that emails the team if a run fails, so a broken credential does not silently drop leads.
Common Mistakes
- No consent check: Sending brochures or newsletters to everyone who completed the form damages the trust that the enquiry created.
- Unstructured AI output: Without a fixed JSON format, the IF node cannot read the result reliably and the branches go wrong.
- Letting AI promise things: The model must never state fees, seat availability or exam results, because that information should come from the counsellor.
- Testing only the happy path: Vague, incomplete and Hindi enquiries break workflows far more often than clean, complete ones.
- Personal accounts: Credentials connected to one employee's account stop working when that person leaves the institute.
- No error alert: A failed run without any alert means lost leads that nobody notices for several days.
Next Steps
- Follow-up: Extend this into a full reply flow with staff approval in automate lead follow-up.
- Reports: Use a schedule trigger to build a weekly summary, covered in automate marketing reports.
- Tool choice: If n8n feels heavy for your team, read Make vs Zapier vs n8n.
- Tracking: Tag website and ad links with UTM parameters and pass the source into the sheet, so you know which channel brings enquiries.
How AI Changes Marketing Automation
What AI Automates Now
Older automations could only follow fixed rules, such as "if course equals NEET, send email A". With an AI step, a workflow can read an untidy message, understand what the student actually wants, draft a reply, or summarise an entire week of enquiries. AI assistants can also help write n8n expressions and small code steps.
What Still Needs a Human
Deciding what the workflow should do, writing the course rules, checking the AI's classification on real enquiries, and talking to students and parents all stay with the counsellors. A person also reviews the workflow whenever courses, fees or batch timings change.
Risk to Watch
An AI step can classify a lead wrongly without any visible error, so review a sample of classified leads every week. Keep the model's instructions narrow, and do not give the AI Agent node tools that can send messages or change records on its own.
Do It with AI
Use this prompt to plan an n8n workflow before you build it. It works in ChatGPT, Claude or Gemini.
You are an n8n workflow planner for a marketing team in India. Business: [what you sell and to whom] Trigger: [what starts the workflow, such as a form entry or a weekly schedule] Goal: [what should happen by the end] Apps we use: [form tool, sheet, email, CRM, WhatsApp provider] 1. List the n8n nodes in order, with what each node does and which fields it passes on. 2. Mark any step that needs an AI model and write its instructions, with a fixed JSON output format. 3. Show where the workflow must check consent before sending any message. 4. List five test cases, including messy and non-English inputs. Do not suggest scraping contacts or messaging people who have not opted in.
- Describe one workflow you repeat every day or week.
- Run the prompt and compare the node list with the steps in this tutorial.
- Build it in n8n with test data only.
- Run the five test cases, check each execution, then activate it.
Check Before You Use It
- Facts: Confirm node names and options in n8n itself; features and names change between versions.
- Brand fit: Read the emails the workflow sends as if you were the student or parent.
- Compliance: Every message must go to people who asked for it, and personal data should stay only in the tools that need it.
Quick Quiz
Pick an answer to check yourself. Nothing is saved.
Question 1 / 3
1. In the coaching institute's workflow, what starts each run?
Frequently Asked Questions
What is n8n used for in marketing?
n8n connects the apps a marketing team already uses, such as forms, Google Sheets, email, a CRM and ad platforms, and moves data between them automatically. Common uses are lead capture and routing, weekly reports, content approval flows and AI steps that sort or summarise data.
Is n8n better than Zapier for marketers?
It depends on the team. n8n gives more control, allows code and can be self-hosted, which suits teams with some technical skill. Zapier is quicker for simple flows and has a very large app directory. The comparison lesson covers Make as well.
Can I use n8n without coding?
Yes, most marketing workflows are built by adding and connecting nodes on a visual canvas. Some tasks, such as reshaping data or writing an expression, are easier with a little JavaScript, and AI assistants can help write those small pieces.
Should I self-host n8n or use n8n Cloud?
Use n8n Cloud if no one on the team manages servers. Self-hosting gives more control over where data lives, but someone must handle updates, backups and security. Check current plans and licence terms before deciding.
Related Articles
- Make vs Zapier vs n8n for MarketersMake vs Zapier vs n8n for marketers: builder style, hosting, billing and AI steps compared in one table, with a Jaipur restaurant example to help you pick.
- Automate Lead Follow-Up with AIAutomate lead follow-up with AI safely: check opt-in, draft replies from your FAQs and let staff approve sensitive ones, shown for a Hyderabad clinic.
- Automate Marketing Reports with AIAutomate marketing reports with AI: pull GA4, ads and Shopify data into one sheet each week and get a checked summary, shown for a Surat saree brand.
- AI Agents for MarketingAI agents for marketing explained: how they plan, use tools and wait for approval, with a Bengaluru SaaS startup example and a prompt to map your agent.
- What is CRM in MarketingWhat is CRM in marketing? Learn how a CRM stores customer data, powers reminders and campaigns, and where AI helps, with a Hyderabad dental clinic example.
- Email MarketingEmail marketing strategy for beginners: opt-in lists, SPF, DKIM and DMARC, welcome series and metrics, with a Pune SaaS startup example and an AI prompt.