Skip to content
← Articles

n8n AI: what it does and how to use it for marketing

8 min read

By Jake Bauman

build-notes

A gold line rising across a dark field, cover image for "n8n AI: what it does and how to use it for marketing"

n8n AI is the set of AI features inside n8n, a visual workflow automation tool. With them you can:

  • drop a large language model into a workflow as one step
  • build AI agents that call your tools
  • describe a workflow in plain words and have n8n draft it
  • run models on your own servers

The model is one node among many. Ordinary automation still supplies the trigger, the data, the approval step and the output, and those parts decide whether the workflow is useful.

What n8n AI is

n8n AI is an LLM or agent step running inside an n8n workflow, next to triggers, app connections and approval steps. The Codecademy Team describes it this way: "N8n is a workflow automation tool that lets us create multi-step AI agents and automate workflows using visual tools." The same Codecademy guide notes that you can add JavaScript or Python code to a workflow when the visual nodes are not enough.

The n8n features page lists the AI pieces:

  • Create with AI. You describe the workflow and n8n builds a first version.
  • Agents. These are standalone or embedded in a workflow and connected to the tools and data they need.
  • Human-in-the-loop steps. These are approvals and decision points placed where a person should decide.
  • Self-hosted AI. Local models run with no external data transfer.

The n8n features page says n8n can "Connect 500+ apps out of the box." The same page points to a community forum with "the 200,000-strong n8n community" for help. For marketing work, the connector list matters more than any single model. A model that cannot read your form submissions or write to your CRM does nothing for you.

How an n8n AI workflow is put together

An n8n AI workflow has four parts:

  • a trigger that starts it
  • nodes that act in order
  • a model attached to the AI node
  • stored credentials for each service

The Codecademy walkthrough builds one. A form trigger collects a review, a Summarization Chain node summarizes it with the Google Gemini Chat Model, and a Slack node posts the summary to a channel.

Setup on your own machine is short. Per the Codecademy guide, n8n needs Node.js version 16 or greater. You install it with npm install -g n8n, and by default the editor opens on port 5678 at http://localhost:5678. The guide also mentions a 14-day trial of the hosted version if you would rather skip local setup.

Credentials are the step people underestimate. Each model provider and each app needs its own API key or token saved in n8n's credentials tab. n8n tests the key when you save it. Every key you add is also one more secret to rotate and one more permission to scope.

When an AI node is worth adding

Add an AI node to an n8n workflow only where the input is unstructured text and a wrong answer gets caught before anyone outside sees it. Everywhere else, use a plain node. Routing on a dropdown value, formatting a date or copying a field into HubSpot are deterministic jobs. An IF node or a Set node does them the same way every time, at no model cost, with nothing to drift.

Here is the decision rule I would use for each step:

  1. If a rule can decide the outcome from structured fields, use a regular node.
  2. If the step reads free text and produces a label or a short draft, use an AI node and force structured output. Free text here means a review, a lead message or a support email.
  3. If the step sends, publishes, charges or deletes anything, put a human approval in front of it, whether or not AI touched the data.

Most marketing workflows I would build in n8n end up with one or two AI nodes and many plain ones. That ratio is a good sign. A workflow with an agent at every step is hard to debug and hard to trust.

A worked example: lead triage with an approval step

A lead triage workflow in n8n shows where AI earns its place. It runs in four steps:

  1. A form or webhook trigger receives an inbound message.
  2. An AI node classifies the message and drafts a reply.
  3. A plain IF node routes by category.
  4. A human approves the draft in Slack before anything goes to the lead.

Only the classify-and-draft step needs a model.

The prompt for the AI node should return JSON that the next node can read. Here is one you can paste into an n8n LLM chain or AI Agent node and adjust:

You classify one inbound lead message for a marketing team.

Input:
Name: {{ $json.name }}
Company: {{ $json.company }}
Message: {{ $json.message }}

Return only valid JSON with these keys:
- "category": one of "sales", "support", "partnership", "spam", "unclear"
- "confidence": one of "high", "medium", "low"
- "reason": one sentence quoting the words in the message that decided the category
- "draft_reply": two to four sentences in a plain, friendly tone, or "" if category is "spam"

Rules:
- If the message does not state a need, use "unclear".
- Never promise a price, a date or an outcome.
- Do not invent facts about the sender or their company.
- If the message asks for something you cannot classify, use "unclear" and confidence "low".

The reason field is the part I care about most. It makes the model show its evidence, so the person approving in Slack can check the label in seconds. Without it, they would have to reread the whole message. Route anything marked low confidence or unclear straight to a person with no draft attached.

Keeping humans in the loop in n8n

n8n supports approval steps natively, so leaving them out of an n8n workflow is a design choice. The n8n features page puts it plainly: "Add approvals and decision points wherever human judgment matters." My own workflows follow the same pattern. They start with a real input, produce an output someone can inspect, and keep a human review step before it ships.

n8n also lets you check what happened after a run. According to the features page, you can follow every step of a past run, replay runs to find issues, and roll back to a previous workflow version. For an AI step, use the replay. When a reviewer rejects a draft, open that execution and read the exact input and output. Then fix the prompt against that real failure.

Self-hosting n8n AI

Self-hosting n8n AI makes sense when customer data cannot leave your infrastructure. The n8n features page describes a self-hosted AI stack built on Ollama for local models, a vector database and PostgreSQL, with no external data transfer. The same page lists SOC 2 Type II compliance, role-based access control, SSO and audit logging. It also lists pulling secrets from AWS Secrets Manager, Azure Key Vault or HashiCorp Vault.

The tradeoff is upkeep. Self-hosting means you own updates, backups, uptime and the hardware that runs the models. Local models are also usually weaker than hosted frontier models at drafting copy. For a small marketing team, I would start on the hosted version of n8n with a commercial model API. I would move to self-hosting only when a data rule forces it.

Costs and risks the tutorials skip

The biggest ongoing cost of n8n AI is the model API call on every execution, and it scales with volume. A workflow that summarizes a handful of reviews a day costs almost nothing. The same workflow pointed at every support email can become a real line item. Estimate executions per month before you pick a model, and use a smaller model for classification.

Three other risks in n8n AI workflows show up after launch:

  • Silent wrong output. An AI node rarely errors out. It returns confident, plausible text that is wrong. Two things catch it: a human approval step, and a prompt that makes the model quote the words behind each answer.
  • Model changes. Providers update or retire models. Pin the model version in the node where you can, and rerun a saved set of test inputs after any change.
  • Credential sprawl. Every app connection is a stored key with permissions. Scope each one to the least access the workflow needs.

Checklist before an n8n AI workflow goes live

Run through this before switching any n8n AI workflow from manual testing to an active trigger:

[ ] Each AI node has a reason to exist: it reads free text that a rule cannot handle
[ ] The AI node returns structured JSON, and the next node checks the keys exist
[ ] Low-confidence and "unclear" outputs route to a person, not to a send step
[ ] Anything that sends, publishes, charges or deletes sits behind an approval
[ ] The model version is pinned where the node allows it
[ ] Ten or more real past inputs have been run, and the outputs were read by a person
[ ] Monthly executions are estimated and the model cost per run is known
[ ] Each credential is scoped to the minimum permission the workflow needs
[ ] An error workflow or alert exists so a failed run does not vanish
[ ] Someone owns the workflow and reviews rejected drafts each week

You may be weighing n8n's hosted plan against building the same flow in code, or against skipping it. If so, run the numbers through Buy, Build, or Skip before you commit.

Pick one marketing task that starts with free text. Build it as a trigger, one AI node and one approval step, and run it on ten real inputs this week.

How this post was made: drafted with AI assistance (Claude Opus 5.5) from the sources linked above and checked by an automated quality gate that matched every figure and quotation to its source on 2026-10-27.

Get the free Starter Kit.

Enter your email to see the download link on this page. Build Notes is optional and has a separate checkbox.

Your files appear here after signup. If email delivery is available, you may also receive your requested file by email. The newsletter is optional. Privacy.

Related reading