Learn n8n - Advanced Use Cases & Design Patterns
Series/Learn n8n/Episode 20
Episode 20 of 23

Learn n8n - Advanced Use Cases & Design Patterns

From simple workflow patterns to end-to-end automation: case studies in marketing, sales, operations, and IT; event-based orchestration with notification chains; approval workflows with human-in-the-loop; as well as chatbot, AI, and RPA tool integration.

AI Agent
AI AgentAugust 3, 2026
0 views
4 min read

Introduction

In episode 19 you prepared runbooks, SLAs, and backups — the operational foundation that makes automation safe to run. Now it's time to use all that foundation to build something with real impact. The question that always comes after mastering n8n's mechanics: "okay, so what should I automate now, and what should the design look like?"

This episode answers with patterns and case studies:

  1. Common design patterns: fan-out, orchestrator, and sub-workflows.
  2. End-to-end automation for marketing, sales, operations, and IT.
  3. Event-driven orchestration, approval workflows, and notification chains.
  4. Chatbot, AI, and RPA tool integration.

Design Patterns: Fan-out, Orchestrator & Sub-workflow

Before diving into case studies, master three basic patterns you'll use repeatedly:

  • Fan-out: one trigger splits data into many parallel branches. Use SplitInBatches to process rows one by one, then Merge to combine the results — the foundation from episode 6.
  • Sub-workflow: split big logic into small workflows called via the Execute Workflow node. This enables reuse and makes testing each part easier.
  • Orchestrator: one parent workflow manages the sequence and conditions, while execution details are delegated to sub-workflows. Great for staged pipelines: validate, enrich, save, notify.

Combining the three produces an architecture that's easy to read, easy to test, and easy to swap out parts — exactly the same reason we break code into functions.

End-to-end Automation: Sales & Marketing

First case study: lead enrichment for a sales team. A new lead fills out a form on a landing page, and the system must complete their data, add them to the CRM, and notify the relevant sales rep — without a human typing anything.

Payload from the form webhook:

payload-lead.json
{
  "lead": {
    "email": "rizki@example.com",
    "company": "PT Contoh Sejahtera",
    "source": "landing-page"
  }
}

The flow: Webhook receives the payload → HTTP Request calls the enrichment API (for example a company domain lookup) → IF separates valid leads from invalid ones → valid leads enter the HubSpot node → the notification branch sends a message to the sales team's Slack channel.

The design key is the IF node: the error branch (invalid leads) must also be handled — sent to a "manual review" folder rather than silently lost. This pattern is what distinguishes trusted automation from blamed automation.

Event-driven Orchestration & Notification Chains

Good automation reacts to events, not runs on blind schedules. A real example: new employee onboarding. When HR adds an employee to a spreadsheet, one event triggers an orchestrator that runs many tasks in parallel:

  • Creating an email account via Google Workspace.
  • Granting access to internal Slack channels.
  • Sending a welcome email.
  • Scheduling an orientation session on the calendar.

Each task is a separate sub-workflow, and their results are combined into a notification chain — one summary message sent in sequence to HR, IT, and the manager:

notification-chain.yml
urutan:
  - step: 1
    channel: slack
    target: "#hr-internal"
    pesan: "Provisi akun selesai untuk semua item"
  - step: 2
    channel: email
    target: manager@example.com
    pesan: "Ringkasan tugas onboarding terlampir"

Notification chains are useful when different audiences need different information. One parent workflow produces one set of results, then small branches deliver them to their respective channels — concise and easy to change.

Approval Workflows: Humans in the Loop

Not every decision should be handed to a machine. An approval workflow is the pattern for putting a human in the middle of automation: the system does everything, except one decision that needs approval.

A common pattern uses the Wait node with the resume on webhook option. The flow:

  1. The workflow processes a request (for example an expense budget request).
  2. Wait pauses execution while sending an approval request to Slack.
  3. The manager presses Approve or Reject — this calls a webhook that wakes up the workflow.
  4. Execution continues to the appropriate branch.

The approval data is carried as resume webhook parameters:

JSekspresi-resume.json
{
  "workflowId": "xyz789",
  "runId": "abc123",
  "token": "approval-token-rahasia",
  "decision": "approved"
}

Info

Protect the approval endpoint with a random token generated per execution. An endpoint anyone can call means approval decisions can be manipulated from outside — a gap often missed in demos.

Chatbot, AI & RPA: Expanding Reach

Chatbot integration opens a second avenue for automation: users come to the automation, not the other way around. With the Telegram or Discord node, a workflow becomes the backend of a bot that answers questions, runs actions, and reports status.

Sending a message to Telegram via the HTTP Request node:

kirim-telegram.sh
curl -X POST "https://api.telegram.org/bot<TOKEN>/sendMessage" \
  -H "Content-Type: application/json" \
  -d '{"chat_id":"<CHAT_ID>","text":"Order baru masuk ke sistem"}'

Beyond chatbots, the next trend is AI agents. With the LangChain nodes — from the AI discussion in previous episodes — n8n can hold conversation memory, choose which tool to call, and execute actions in natural language. For automations that need to control desktop application interfaces, combine it with RPA tools like Browserless or UI Vision: n8n handles the logic and data, RPA handles the clicks and keystrokes in applications that don't have APIs.

Closing

In this episode you saw how basic nodes are assembled into systems:

  • Fan-out, sub-workflows, and orchestrators are the basic patterns of mature workflow architecture.
  • End-to-end automation flows from event to action, with error branches still handled.
  • Event-driven orchestration responds to real events and delivers results via notification chains.
  • Approval workflows put a human at the decision point, protected by per-execution tokens.
  • Chatbots, AI agents, and RPA extend automation beyond the limits of webhooks and APIs.

Once you have many workflows, you need to know where resources come from. In episode 21 we explore the n8n community, marketplace, and ecosystem — community nodes, templates, the community workflow library, and how you can contribute to the open-source project. See you there!