The Product Compass

The Product Compass

AI Product Management

The Ultimate Guide to n8n for PMs

How to build LLM workflows, agentic workflows, and AI agents in n8n without coding. Best practices, common mistakes, and ethical hacks for the n8n Community Edition.

Paweł Huryn's avatar
Paweł Huryn
Oct 20, 2025
∙ Paid
39
3
Share

Learning n8n is one of the highest ROI investments you can make to:

  • Automate your repetitive tasks (market research, product discovery, SEO, etc.).

  • Integrate with virtually any system (1,000+ integrations: Google Sheets, Gmail, Slack, Airtable, Supabase, Notion, Slack, Jira, HubSpot, LinkedIn, etc.).

  • Demonstrate an AI PM portfolio with RAG, AI agents, and multi-agent systems.

  • Implement a backend or background jobs for your vibe-engineered products.

In the past, we’ve discussed many specific examples:

  • How to Build a RAG Chatbot Without Coding - n8n as backend for a chatbot

  • J.A.R.V.I.S. for PMs (Building an AI Voice Agent) - n8n as an AI voice agent backend

  • I Copied the Multi-Agent Research System by Anthropic - n8n as a simple frontend and backend of the multi-agent system

  • Every few days, n8n prepares market data (salaries, exchange rates) for the PM Salary Reports (a Lovable app). I discussed it during our office hours.

In this issue, however, I’d like to go back and discuss the basics:

  1. What is n8n

  2. n8n vs. Common Agentic Frameworks

    1. Orchestration Beats Agency

    2. AI Agent Frameworks Comparison

  3. How to Host n8n

  4. n8n Nodes Overview

  5. Example: How to Build a Weekly Competitor Research

    1. Variant A: LLM Workflow

    2. Variant B: Agentic Workflow

    3. Variant C: AI Agent

  6. Best Practices: Debugging, Error Handling & Error Prevention

  7. Ethical Hacks for the n8n Community Edition

    1. Remove the limit of 1-day workflow history retention

    2. Workaround to get global variables in n8n

    3. Store a full version history for each workflow

Let’s dive in.


1. What Is n8n

n8n is one of the world’s most popular low-code workflow automation platforms. Critically, it allows you to easily mix traditional business workflows with AI agents.

A picture is worth a thousand words. So, let’s look at an example of a daily competitor research workflow:

In the example above:

  • Step 1: The workflow starts every day at 8 AM.

  • Step 2: Next, the Research Agent uses tools to read the list of competitors. For each, it performs Perplexity search to find the recent news. Finally, it replies with a markdown report.

  • Step 3: A traditional workflow action creates an HTML report.

  • Step 4: The HTML is sent to a predefined address.


2. n8n vs. Common Agentic Frameworks

What’s the difference between n8n, Make, OpenAI Agent Builder and other agentic frameworks? To me, the most critical aspect is its non-AI orchestration layer.

2.1 Orchestration beats agency

In 14 Principles of Building AI Agents, I argued that you shouldn’t make everything an AI agent. In 2025, orchestration beats agency — it’s cheaper, faster, and more reliable especially for processes where you can’t afford 10% failure rate in production. Still, most agentic platforms lack a flexible non-AI orchestration layer.

In a recent interview, Andrej Karpathy, OpenAI co-founder stated:

“They don’t have enough intelligence, they’re not multimodal enough, they can’t do computer use and all this stuff.” — Dwarkesh Patel YouTube channel, Oct 17, 2025

The next day, he followed up on X:

“On LLM agents. My critique of the industry is more in overshooting the tooling w.r.t. present capability. I live in what I view as an intermediate world where I want to collaborate with LLMs and where our pros/cons are matched up. The industry lives in a future where fully autonomous entities collaborate in parallel to write all the code and humans are useless.” — Andrej Karpathy on X, Oct 18, 2025

n8n fixes this by combining powerful agentic capabilities with one of the best workflow automation engines.

P.S. Soon, I’ll release my new research. All three variants from point 5 work reliably with GPT-5. Still, for production, I recommend implementing an LLM-powered workflow rather than an AI agent.

2.2 AI agent frameworks comparison

I’d argue that non-AI orchestration is what makes a difference between a demo and an AI workflow running in production.

Other differences include:

n8n vs. Make vs. OpenAI Agent Builder

Share

I’ll demonstrate how to implement observability in n8n in a future post.


3. How to Host n8n?

As an individual or a small team, you’ll most likely use a free, self-hosted Community Edition. You can install it locally using Docker (we discussed it here), or leverage a third-party hosting that runs 24/7.

The cheapest third-party solution I’ve found so far is Hostinger. For $4.99/mo (after a year it renews at $9.99/mo for 2 years) you get a virtual server with unlimited executions.

Installation takes a few clicks. You can get it here (I registered as an affiliate, it doesn’t impact the price you get):

Get n8n from Hostinger

How to host n8n. n8n hosting options. n8n pricing.

At the end of this post, I demonstrate how to improve the n8n Community Edition:

  • Ethical hack 1: How to remove the limit of 1-day workflow history retention

  • Ethical hack 2: Workaround to get global variables in n8n

  • Ethical hack 3: Store a full version history for each n8n workflow

These are compliant as long as you use n8n internally or for your own purposes.


4. n8n Nodes Overview

Once you have n8n installed, you’ll spend most of your time connecting and configuring nodes - small building blocks that make up your workflow.

Each node performs a specific action: runs a script, fetches data, sends an email, or triggers an AI model or AI agent.

Think of them as Lego bricks. You connect them together to build a system that runs exactly how you want. For example:

n8n Nodes Overview

Each node has inputs (data coming from previous steps), outputs (results that flow to the next step), and internal configuration. And since n8n is visual, you can literally see the data moving through your workflow.

n8n - Each node has inputs (data coming from previous steps), outputs (results that flow to the next step), and internal configuration.

You can read the documentation of each node directly from the workflow editor. This link “Docs” in the top right corner takes you to documentation with examples, and templates:

n8n You can read the documentation of each node

Let’s go through each node group in detail.

4.1 Trigger nodes

Trigger nodes define when your workflow starts.

n8n Trigger Nodes

The most popular ones:

  • Manually - Primarily when developing a workflow.

  • Schedule - Start, e.g., every morning at 8:00.

  • Webhook - An incoming webhook, see a RAG example. It’s often used with Respond to Webhook - node. In that case, the app calling a webhook received a response after executing a specific logic.

  • An app event - Like a new email, a new row in Google Sheets or a new file in Google Drive; see a RAG example.

  • MCP Server - Allows you to expose your workflow as an MCP server

  • Error - A special type of trigger that can execute when a specific workflow fails

  • n8n Form Trigger - Triggered by the user from the UI; see our multi-agent research system example.

Most of my workflows start with a schedule or webhook trigger. A single workflow can have multiple triggers.

4.2 AI nodes

AI nodes add AI-powered capabilities to your workflow. You can run an OpenAI model, build AI agents, or summarize and search documents.

In 99% of cases I use “Message a model” or “AI Agent” nodes:

n8n AI Nodes
  • OpenAI \ Message a model operation - Calls a Chat Completions API by OpenAI. Prompt can be parametrized using outputs of the previous nodes. You can find similar nodes for OpenRouter and other LLM providers.

  • AI Agent - Defines an AI agent with optional memory and tools.

    • You can use outputs of the previous nodes as parameters.

    • n8n automatically handles the iteration loop, so you don’t need to manage reasoning steps manually.

    • In particular, you can use other agents as tools with the AI Agent Tool node.

Both nodes are very flexible; you can chain them, reuse their outputs, or combine them with traditional nodes. I often use “Message a model” for summarization and “AI Agent” when I need more autonomy (e.g., multi-step research).

While n8n includes many other AI nodes, most are variants of these two. Examples include:

  • Information Extractor - Extracts structured information (e.g., JSON object).

  • Basic LLM Chain - Runs a list of prompts.

  • Text Classifier - Categorizes text into predefined labels.

  • Sentiment Analysis - Detects tone or polarity of text.

  • Summarization Chain - Summarizes a long text. Might be helpful if you are worried about the context window length and don’t want to split the text into chunks manually.

  • LangChain Code (advanced) - Allows you to define a custom LangChain code that works as a standard n8n node. Works only on self-hosted instances.

4.3 Flow control nodes

Control how your workflow runs - when to branch, merge, or loop through steps.

For example, when one agent finishes a task, you can decide what happens next based on its output. For example:

n8n Flow Control Nodes

Here are the key nodes you’ll use most often:

  • Merge - Combines multiple input collections into one. You can:

    • Append one collection after another (default),

    • Merge matching items from different collections,

    • Write a custom SQL query,

    • Select just one input branch.

  • Filter - Lets only certain items pass through based on your rules. For example, filter out empty results or low-confidence outputs from an AI node.

  • If - Routes data depending on a condition. For example:

    • If a competitor’s price change > 10%, send a Slack alert.

    • Otherwise, just log it.

  • Switch - Unlike If, the Switch node can check multiple conditions with many output branches, for example:

    • If a document type is Invoice, do X.

    • If a document type is Contract, do Y.

    • Otherwise, do something else.

  • Loop over items - Repeats a set of actions for each item (or a batch) in a list. It’s powerful, but you often don’t need it as many nodes in n8n handle iterations automatically.

  • Execute Sub-workflow - Runs another workflow inside your current one. This can help you reuse specific logic across multiple n8n workflows.

4.4 Integrations

Integrations in n8n are available as:

  • Triggers (already discussed),

  • AI agent and LLM tool nodes,

  • “Action in the app” nodes,

n8n Integrations

The most critical part is setting up credentials that can be reused across workflows. These are required for any integration to work.

Setting up special integrations:

  • Google services - requires a Google Cloud account:

    • Sign up: https://console.cloud.google.com/

    • Set up OAuth2 for Calendar, Drive, Mail, Sheets and make sure the right services are enabled: instructions

  • OpenAI - requires OpenAI Platform account and a credit card. Your ChatGPT subscription is irrelevant. Go to https://platform.openai.com/api-keys.

For most other services you simply need an API key.

Browse over 1,000 n8n integrations here: https://n8n.io/integrations/

4.5 Core nodes

Core nodes give you full flexibility. Run JavaScript/Python code, make HTTP requests (e.g., to call an API), execute shell commands, or wait.

They’re the backbone of any serious automation letting you step outside prebuilt integrations and do anything from writing custom scripts to running shell commands.

A real-life example from jobs.productcompass.pm:

n8n Core Nodes
  • Step 1: Call an API to get currency exchange rates (https://exchange-rates7.p.rapidapi.com).

  • Step 2: Transform a single object with 120+ properties into a list of currency exchange rates using JavaScript.

  • Step 3: Call Supabase API to update currency exchange rate.

  • Step 4: Wait 1 second to respect API limits.

Below are the key ones you’ll use most often (we’ll skip nodes covered in triggers and flow and Data Tables, which are promising but still ignore query criteria in tests):

  • Code - Runs JavaScript or Python directly inside your workflow. It’s perfect for transforming data, formatting outputs, or calculating metrics. I often use it to convert a JSON object into a clean list of items.

  • HTTP Request - Makes API calls to any external service. You can connect to REST APIs, send data to Supabase, or fetch information from external endpoints.

  • Execute Command - Runs shell commands on the host machine. Available only for self-hosted instances, it’s useful for system-level automations like triggering scripts or managing local files.

  • n8n (internal) - Lets you interact with your own n8n instance , e.g., retrieving workflow details or execution data, or updating workflows programmatically.

  • n8n Form - Creates simple web forms to collect human input directly in your workflow. It’s great for internal approvals or small feedback loops.

  • No Operation - A “do nothing” node. Useful for structuring complex flows or temporarily disabling branches during testing.

  • Wait - Pauses workflow execution for a defined time. Often used to respect API rate limits, add delays between requests, or wait for a condition to become true.

4.6 Human in the loop nodes

Human in the loop nodes wait for human approval or input before continuing.

Those include standard communication apps, such as Gmail, Google Chat, Microsoft Outlook, Slack, Telegram, and WhatsApp, which are configured to:

  • Send a message,

  • Wait for response with Response type = Approval.

n8n Human in the loop Nodes

Based on my tests, the Human in the Loop (HITL) pattern is necessary for workflows that involve sensitive actions (like updating pricing, changing subscriptions, or publishing reports). 1-10% error rate would be good for demos, but is not acceptable for critical business processes.

An exception: you use LLMs or agents for generation, but not for making decisions (e.g., customer support chat responses).


5. Example: Weekly Competitor Research

The goal of the workflow is to find important competitor insights published within the last 30 days. I prepared three variants with an increasing level of autonomy.

We will discuss all three variants tomorrow during weekly office hours. The recording will be available for premium members of the newsletter.

5.1. LLM workflow

The entire logic is fully orchestrated by n8n. Autonomy: None.

That’s the default way of building “AI agents:”

n8n example - LLM Workflow

5.2. Agentic workflow

The entire logic fully orchestrated via workflow and detailed steps in the agent prompt. Autonomy: Low.

n8n example - Agentic Workflow

5.3 AI agent

All actions performed by the agent. The prompt doesn’t contain specific steps or tools to use, only the objective. Agency: High

n8n example - AI Agent

5.4 Download A, B, and C as n8n workflow templates

Three definitions in one file. You can import it to your n8n environment:

Download n8n template


Next, in the premium part we cover:

  1. 🔒 Best Practices: Debugging, Error Handling & Error Prevention (+recordings)

  2. 🔒 Ethical Hacks for the n8n Community Edition

    • How to remove the limit of 1-day workflow history retention

    • Workaround to get global variables in n8n

    • Store a full version history for each n8n workflow


6. Best Practices: Debugging, Error Handling & Error Prevention

Keep reading with a 7-day free trial

Subscribe to The Product Compass to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Paweł Huryn
Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture