Skip to content
Aakash GuptaAakash Gupta

Master 80% of n8n in 59 mins

Pawel Huryn has built more N8N workflows than almost anyone. He walks through building real workflows from scratch - from competitor monitoring to AI agents. Here's everything you need to master the most powerful workflow automation tool. Summary: https://www.news.aakashg.com/p/pawel-huryn-podcast Transcript: https://www.aakashg.com/mastering-n8n-how-to-build-powerful-ai-workflow-automations/ ---- Timestamps 0:00 - Intro 1:55 - Why n8n Matters 3:14 - Building Competitor Monitoring Workflow 8:44 - Cost & Free Version Benefits 12:09 - Ads 13:53 - Workflow Automation Deep Dive 19:57 - Traditional Workflow vs AI Agent 23:13 - Building an AI Agent 31:50 - Ads 34:11 - Agent Workflow Results 40:36 - n8n Best Practices 45:35 - Multi-Agent Research System 49:04 - PM Use Cases & Automation 51:12 - Free Version Hacks 57:57 - Outro ---- 🏆 Thanks to our sponsors: 1. Amplitude: The market-leader in product analytics - https://amplitude.com/session-replay?utm_campaign=session-replay-launch-2025&utm_source=linkedin&utm_medium=organic-social&utm_content=productgrowthpodcast 2. Vanta: Automate compliance across 35+ frameworks - http://vanta.com/aakash 3. Testkube: Leading test orchestration platform - http://testkube.io/ 4. Kameleoon: AI experimentation platform - http://www.kameleoon.com/ 5. Pendo: the #1 Software Experience Management Platform - http://www.pendo.com/aakash ---- Key Takeaways 1. n8n combines traditional workflow automation AND AI agent building in one platform - making it more powerful than Zapier or Make for complex automation needs. 2. Real use cases span from simple business workflows to chatbots, automatic competitor monitoring, multi-agent research systems, and inbox workers that take actions based on emails. Sky is the limit. 3. Pawel's competitor monitoring workflow costs $1-2/week using the FREE version of N8N. Just needs Perplexity API ($1-2 for hundreds of calls) and OpenAI credits. Enterprise tools charge $500+/month. 4. Pin your data during development. N8N caches API responses so you don't burn credits while testing workflows. Click the pin icon and N8N uses cached data instead of making new API calls. 5. n8n automatically loops through items - no need to write for-loops or while-loops. When you connect a node with 6 items, N8N repeats the action 6 times automatically. 6. Compress context before sending to LLMs. Pavel cuts 70% of tokens by extracting only summary content and citation URLs from Perplexity results, ignoring irrelevant snippets and metadata. 7. Use ChatGPT to write n8n code snippets. Pavel never writes code blocks himself - just takes a screenshot of the data and asks GPT "how do I compress this information?" 8. Traditional workflows are more efficient (saves tokens, very reliable) for predictable tasks. AI agents are more flexible but use more tokens and can make mistakes. Use workflows when you know the steps. 9. Set GPT reasoning effort to "low" for simple tasks. When you just need formatting or summarization (not complex thinking), low reasoning effort saves tokens significantly. 10. Best practices: Set dedicated error probes to catch errors before they break workflows. Use max iterations to prevent infinite loops. Set retry on fail to 3x attempts. Pin data during development. ---- 👨‍💻 Where to find Pavel Huryn: LinkedIn: https://www.linkedin.com/in/pavelhuryn/ X: https://twitter.com/pavolhuryn Company: https://www.n8n.io 👨‍💻 Where to find Aakash: Twitter: https://www.x.com/aakashg0 LinkedIn: https://www.linkedin.com/in/aagupta/ Newsletter: https://www.news.aakashg.com #n8n #ProductManagement --- About Product Growth: The world's largest podcast focused solely on product + growth, with over 187K listeners. Hosted by Aakash Gupta, who spent 16 years in PM, rising to VP of product, this 2x/week show covers product and growth topics in depth. Subscribe and turn on notifications to get more videos like this.

Pawel HurynguestAakash Guptahost
Jan 6, 202658mWatch on YouTube ↗

CHAPTERS

  1. 0:00 – 3:38

    Why n8n stands out: workflows + AI agents in one tool

    Pawel and Aakash frame n8n as a uniquely powerful automation platform because it spans classic automations and modern AI-agent systems. They preview practical outcomes: chatbots, competitor monitoring, inbox actions, and multi-agent research.

    • n8n combines traditional workflow automation with AI agents/multi-agent systems
    • Positioned as flexible and full-powered vs. simplified automation tools
    • Real-world promise: save time by automating repeatable information work
    • Episode will teach by building, not theory
  2. 3:38 – 6:27

    Competitor monitoring workflow setup: triggers and pulling a competitor list

    They begin building a weekly competitor monitoring workflow, starting with a manual trigger for easy testing. The first real step is reading competitor names from Google Sheets and validating the data flow.

    • Different start modes: manual, scheduled, webhook/event-driven
    • Google Sheets node: connect credentials and “Get rows” from a sheet
    • Test execution step-by-step to confirm outputs
    • Acknowledge n8n’s initial complexity as a ‘power user’ tradeoff
  3. 6:27 – 7:06

    Development speed hack: pinning data to avoid repeated API calls

    Pawel shows how to pin node output so the workflow can be iterated on without re-querying Google Sheets or paying for repeated external calls. This becomes a recurring best practice for fast, cheap development.

    • Pin outputs to reuse data during workflow development
    • Avoid re-running expensive/slow steps while iterating
    • Can edit pinned data to simulate changes
    • Improves speed, reduces cost while debugging
  4. 7:06 – 8:44

    Gathering competitor updates with Perplexity: prompts, variables, and scale

    They add Perplexity as a research step, using each row (competitor) as an input variable so n8n automatically runs the node per item. Pawel explains prompt structure: what to look for, how to format results, and how to handle “no updates.”

    • Per-competitor Perplexity calls using sheet rows as variables
    • Prompt focuses on launches, pricing, partnerships, complaints, etc.
    • n8n iterates automatically over collections—no explicit loops required
    • Formatting requirements added upfront for clean downstream reporting
  5. 8:44 – 9:24

    Cost reality: free n8n, cheap Perplexity API calls, and why it’s affordable

    Aakash asks about paid plans; Pawel clarifies Perplexity requires an API key (card attached), but calls are inexpensive at scale. He also confirms the workflow is built on the free n8n version.

    • Perplexity API key required; subscription not required
    • Hundreds of calls can cost around $1–$2 depending on model
    • Free n8n is sufficient for building and running the workflow
    • Weekly runs are typically negligible cost
  6. 9:24 – 14:23

    Token optimization: compressing Perplexity output with a Code node

    Perplexity returns lots of metadata that would waste tokens if passed to an LLM. Pawel demonstrates extracting only the ‘content’ summary and ‘citations’ via a Code node, emphasizing context compression as a practical cost-control technique.

    • Perplexity output includes excess fields (snippets, titles, etc.)
    • Use Code node to keep only content + citations
    • Leverage ChatGPT to generate the code/extraction logic
    • Context compression reduces token burn and improves reliability
  7. 14:23 – 20:35

    Assembling a clean email report: aggregate, JSON stringify, LLM formatting

    They aggregate multiple competitor items into one object for a single LLM call, then send it to OpenAI to format a structured report. Pawel highlights key n8n expressions like converting objects into JSON strings so LLMs can interpret the data.

    • Aggregate multiple items into one payload for summarization
    • OpenAI “message a model” to generate a structured competitor report
    • Critical expression: convert structured objects to JSON string for LLM input
    • Prompting tactics: formatting rules, link replacement via citations, examples
  8. 20:35 – 22:43

    Delivering the report: Markdown→HTML conversion and Gmail send

    To avoid spending tokens on HTML generation, they keep the report in Markdown and convert it to HTML using a dedicated node. The final step sends the HTML email via Gmail, proving the workflow works end-to-end with minimal hallucination risk.

    • Generate Markdown (cheaper) and convert to HTML via node
    • Gmail node sends HTML email to the recipient
    • Pinning again avoids rerunning upstream steps during tweaks
    • Result: scannable competitor report with sources
  9. 22:43 – 23:22

    Traditional workflow vs agentic workflow: what changes and why it costs more

    Aakash notes the initial build is complex; Pawel explains it’s optimized for reliability and token efficiency. They then introduce the ‘agentic workflow’ approach—letting an AI Agent decide prompts/tool usage—while warning that it increases time and token cost.

    • Classic workflow is more deterministic and token-efficient
    • Agentic workflow introduces flexibility but more token usage and latency
    • Some manual nodes (markdown conversion, email) still kept for efficiency
    • ‘Workflow with LLM’ ≠ true agent; agency exists on a spectrum
  10. 23:22 – 30:20

    Building an agentic workflow: AI Agent with tools, system prompt, max iterations

    They create an AI Agent node powered by OpenAI, attach tools (Google Sheets + Perplexity), and define a detailed system prompt with step-by-step reasoning instructions. Pawel introduces max iterations (e.g., 30) to prevent premature stopping during tool use.

    • AI Agent requires an LLM ‘brain’ plus tools
    • Tools added: Google Sheets (competitors) and Perplexity (research)
    • System prompt includes explicit reasoning steps and formatting guidance
    • Max iterations setting prevents agents from stopping too early
  11. 30:20 – 35:48

    Agentic workflow results: logs, parallelism, and the token/time trade-off

    They inspect agent logs showing tool calls and note Perplexity calls can run in parallel in this setup. Pawel compares costs: the agentic version takes longer and uses substantially more tokens than the deterministic workflow, illustrating why optimization matters.

    • Agent logs show tool selection, inputs, and outputs step-by-step
    • Perplexity calls can execute in parallel (in this configuration)
    • Comparison: ~5k tokens vs ~12k tokens; ~30–40s vs ~1.5 min (approx.)
    • More agency increases cost and potential error surface
  12. 35:48 – 40:31

    True agent build: minimal instructions, add email tool, best output—highest cost

    They move from ‘coding in English’ to a ‘true agent’ by giving a high-level objective and the necessary tools (including sending email) and letting the model decide the process. The resulting email is the best formatted yet, but token usage spikes dramatically.

    • True agent = objective + tools, minimal step-by-step constraints
    • Add Gmail send tool so the agent completes the full loop
    • Sequential vs parallel tool calling may depend on tool descriptions/limits
    • Result quality improves, but cost jumps (e.g., ~90k tokens)
  13. 40:31 – 45:29

    n8n operational best practices: error workflows, retries, tool descriptions, From AI

    Pawel lists practical production best practices: dedicated error workflows, retries on failure, increasing max iterations, and improving tool descriptions so agents use tools correctly (including parallelism guidance). He also shows the ‘From AI’ expression for parameters when the sparkle UI isn’t available.

    • Create an error workflow to notify via email/Slack on failures
    • Use retry-on-fail to handle transient model/tool outages
    • Write strong tool descriptions with examples and pitfalls
    • Use ‘From AI’ expression to let the agent fill parameters when needed
  14. 45:29 – 48:57

    Multi-agent research system demo: orchestrator + sub-agents + report generation

    Pawel demonstrates a more advanced n8n setup inspired by Anthropic’s multi-agent research architecture. A lead agent clarifies the query, delegates tasks to multiple sub-agents running in parallel, compresses sources, and produces a report saved to Google Drive.

    • Lead ‘orchestrator’ agent decomposes tasks and coordinates sub-agents
    • Sub-agents browse/search (e.g., Brave), extract content, compress context
    • Parallel execution across many agents for faster scoped research
    • Outputs stored as files in Google Drive; can generate long-form reports
  15. 48:57 – 58:53

    PM automation use cases + free-plan hacks (history retention, global vars, backups)

    They close with practical product-management automations (email triage, PRDs, Slack/Drive search) and how to stretch the free plan. Pawel shares workarounds: self-hosting for better history retention, using data tables as global variables, and an n8n workflow that exports workflows daily to Drive for version history.

    • PM use cases: email summarization/drafting, competitor research, PRDs, ops syncs
    • Free plan constraints: limited execution history and no built-in version history
    • Hack 1: self-host n8n (e.g., low-cost VM) to remove retention limits
    • Hack 2: data tables emulate global variables/secrets
    • Hack 3: automated daily workflow export to Drive = DIY version history

Get more out of YouTube videos.

High quality summaries for YouTube videos. Accurate transcripts to search & find moments. Powered by ChatGPT & Claude AI.