The Complete Guide to n8n Workflow Automation

Learn how to build powerful automations that connect your tools, eliminate manual tasks, and scale your operations, from beginner basics to advanced techniques.

In this comprehensive guide:

  • What n8n is and why it's the best choice for workflow automation
  • Core concepts: triggers, actions, and nodes explained
  • Step-by-step tutorials with real-world examples
  • Essential building blocks for Slack, HubSpot, GitHub, and more
  • Advanced techniques including code nodes and AI-assisted development
  • When to build yourself vs. when to hire experts

Table of Contents

  1. What is n8n?
  2. Why Choose n8n Over Zapier or Make?
  3. Core Concepts: Triggers, Actions, and Nodes
  4. Getting Started with n8n Cloud
  5. Your First Workflow
  6. Essential n8n Building Blocks
  7. Real-World Workflow Examples
  8. Advanced Techniques
  9. When to Build vs. When to Hire
  10. Ready-to-Use Workflow Library
  11. Further Reading & Resources

What is n8n?

n8n is a fair-code workflow automation platform that lets you connect different tools, automate tasks, and build custom workflows without writing extensive code. Think of it as the backbone for workware—purpose-built software created by assembling existing components.

What Makes n8n Different?

Unlike traditional automation platforms, n8n gives you:

  • Full control over your data - Self-host on your own infrastructure or use n8n Cloud
  • Unlimited workflow complexity - Build advanced logic with code nodes (JavaScript/Python)
  • Fair-code licensing - Open source with commercial licenses for businesses
  • Visual workflow builder - Drag-and-drop interface for non-developers
  • 500+ integrations - Connect to popular tools and APIs
  • No vendor lock-in - Export workflows as JSON, migrate anytime

Who Uses n8n?

n8n is trusted by development teams, agencies, operations managers, and growing businesses who need:

  • Custom automation that off-the-shelf tools can't provide
  • Data privacy and security (healthcare, finance, regulated industries)
  • Cost-effective scaling (no per-task pricing)
  • Technical flexibility with code when needed

Real-world impact: Teams using n8n report saving 10-20 hours per week on manual tasks, with workflows running 24/7 without human intervention.

Get Started with n8n Cloud
Free trial - no credit card required
Learn more

Learn more: Understand how n8n fits into the broader workware philosophy and our approach to configuration over coding.


Why Choose n8n Over Zapier or Make?

Choosing the right automation platform depends on your team's needs, technical capabilities, and budget. Here's an honest comparison:

Quick Comparison: n8n vs. Other Automation Platforms

Featuren8nZapier/Make
Self-Hosting Available
Run on your own infrastructure for data privacy
Full Code Support
Write JavaScript/Python for custom logic
Advanced Branching & Logic
Complex IF/THEN, error handling, loops
Unlimited API Calls
No limits on custom API integrations
Visual Debugging
See data flow through each node
Pre-Built Integrations
500+ apps (n8n) vs 5,000+ apps (Zapier)
Free Tier Available
Self-hosted n8n is 100% free
Beginner-Friendly
Easy setup with no technical knowledge

When to Choose n8n

Choose n8n if you:

  • Need full control over sensitive data (HIPAA, GDPR compliance)
  • Have technical team members who can write code when needed
  • Want to avoid per-task pricing as you scale
  • Require advanced branching, error handling, or custom logic
  • Need to call internal APIs or custom webhooks frequently
  • Want to self-host for cost savings or data sovereignty

Example: A healthcare agency chose n8n to process patient intake forms because they needed data to stay on their own servers (HIPAA compliance). With Zapier, all data would pass through third-party servers.

When Zapier or Make Might Be Better

Consider alternatives if you:

  • Have a non-technical team with no coding capability
  • Need plug-and-play setup in under 5 minutes
  • Only run low-volume workflows (< 1,000 tasks/month)
  • Prefer paying for simplicity over technical control
  • Don't want to manage any infrastructure

The bottom line: n8n offers unmatched flexibility and control for teams willing to invest a bit more time in setup. For our agency clients, the cost savings typically pay back within 3-6 months.

Need help deciding? We help teams evaluate and implement the right automation platform. Schedule a free consultation to discuss your specific needs.


Core Concepts: Triggers, Actions, and Nodes

Before building your first workflow, let's understand how n8n thinks. Every workflow is built on three fundamental concepts:

1. Triggers: What Starts Your Workflow

A trigger is the event that kicks off your automation. Without a trigger, nothing happens. Common trigger types include:

Schedule Triggers - Run workflows on a timetable

Webhook Triggers - React to external events

  • Form submission from your website
  • GitHub issue created or updated
  • Payment received in Stripe
  • Example: GitHub to Slack Bot

App Triggers - Listen to specific app events

Manual Triggers - Test workflows or run on-demand

  • Button click in n8n interface
  • API call from another system
  • Testing and debugging workflows

Mental model: Think of triggers as the "starting gun" for your automation race. Once fired, your workflow springs into action.

2. Actions: What Happens Next

Once triggered, action nodes carry out the actual work. Actions can:

  • Send data: Post Slack messages, send emails, create tickets
  • Retrieve data: Fetch customer info from CRM, read spreadsheet data
  • Transform data: Format dates, filter lists, combine datasets
  • Make decisions: IF conditions, routing based on data
  • Wait: Pause execution, delay actions
  • Call APIs: Connect to any web service

Actions execute sequentially by default, flowing from one node to the next like dominoes. You can also create parallel branches for more complex logic.

3. Nodes: The Building Blocks

In n8n, everything is a node. Each node is a self-contained unit that does one specific thing. Categories include:

Core Nodes:

  • Set Node: Transform and map data between nodes
  • Code Node: Write custom JavaScript or Python
  • IF Node: Conditional routing (if/else logic)
  • Switch Node: Multi-way routing (switch/case logic)
  • Merge Node: Combine data from multiple sources
  • Split Node: Break arrays into individual items

App Nodes (500+ integrations):

  • Communication: Slack, Gmail, Discord, Microsoft Teams
  • CRM: HubSpot, Salesforce, Pipedrive, Attio
  • Project Management: GitHub, Linear, Jira, Asana, Trello
  • Data: Google Sheets, Airtable, Notion, databases
  • And 490+ more...

Utility Nodes:

  • HTTP Request: Call any API
  • Wait: Pause workflow execution
  • Schedule Trigger: Time-based automation
  • Webhook: Receive external data

How Data Flows Through Workflows

Understanding data flow is crucial:

  1. Trigger fires → Provides initial data (e.g., webhook payload)
  2. Data passes to first action → Node processes input, produces output
  3. Output becomes input for next node → Data flows like a pipeline
  4. Final node completes → Workflow execution ends

Each node receives data from the previous node and outputs transformed data to the next node. This pipeline model makes workflows predictable and debuggable.

Visual example:

[Schedule Trigger] → [HTTP Request to API] → [Code Node: Parse Data] → [Slack: Send Message]

Data from the API response is parsed by the Code node, then formatted into a Slack message.

Pro tip: Use the n8n "Execution" tab to see exactly what data each node receives and outputs. This is invaluable for debugging.

Items vs. Single Execution

n8n can process data in two modes:

Item Processing (default): If a node receives 10 items (e.g., 10 GitHub issues), n8n executes the downstream nodes 10 times—once per item. This is powerful for bulk operations.

Single Execution: Some nodes (like Merge or Aggregate) process all items at once, combining them into a single output.

Understanding when to use each mode is key to building efficient workflows.

Next step: Now that you understand the concepts, let's get hands-on by setting up n8n and building your first workflow.


Getting Started with n8n Cloud

The fastest way to start with n8n is using n8n Cloud—a hosted version that eliminates infrastructure setup. You can be building workflows in under 5 minutes.

Why Start with n8n Cloud?

We recommend n8n Cloud for beginners because:

  • Zero setup - No servers, Docker, or technical configuration
  • Always up-to-date - Automatic updates with latest features
  • Built-in security - Encrypted credentials, HTTPS by default
  • Scalable - Handles increased workflow volume automatically
  • Free trial - Start free, upgrade as you grow

You can always migrate to self-hosted later if needed (workflows export as JSON).

Sign Up for n8n Cloud
Free trial - no credit card required
Learn more

Understanding the n8n Interface

Once you sign up, you'll see the n8n canvas, your workflow workspace. Key areas:

1. Canvas (center) - Drag-and-drop workspace where you build workflows

  • Add nodes by clicking the "+" button
  • Connect nodes by dragging between connection points
  • Move nodes around to organize your workflow

2. Node Panel (left sidebar) - Browse 500+ integration nodes

  • Search by app name (e.g., "Slack", "GitHub")
  • Filter by category (Communication, CRM, Data)
  • See recently used nodes

3. Workflow Settings (top) - Manage workflow configuration

  • Name your workflow
  • Set workflow status (Active/Inactive)
  • Configure error handling
  • Access workflow settings

4. Credentials Manager - Securely store API keys and OAuth tokens

  • Add credentials once, reuse across workflows
  • Encrypted storage
  • Easy credential testing

5. Executions Log (bottom) - Debug and monitor workflow runs

  • View successful and failed executions
  • See data at each node
  • Identify bottlenecks and errors

Your First 5 Minutes

Quick start checklist:

  1. Create n8n Cloud account
  2. Take the UI tour (optional but helpful)
  3. Click "New Workflow" to create blank canvas
  4. Add a "Manual Trigger" node (every workflow needs a trigger)
  5. Add a "Set" node to see data transformation
  6. Click "Test Workflow" to run it

Congratulations! You've executed your first n8n workflow. Now let's build something useful.

Want to self-host? We help teams deploy n8n on AWS, GCP, or your own infrastructure with proper monitoring, backups, and security. Learn more →


Your First Workflow: GitHub to Slack Notifications

Let's build a practical workflow that posts Slack notifications when GitHub issues are created or updated. This is one of our most popular workflows and perfect for learning n8n fundamentals.

What You'll Build

By the end of this tutorial, you'll have a workflow that:

  • Listens for GitHub issue events (created, updated, closed)
  • Extracts issue data (title, description, author, labels)
  • Formats a nice-looking Slack message with buttons
  • Posts to your team's Slack channel automatically

Time to complete: 15-20 minutes

Difficulty: Beginner

Prerequisites

Before starting, make sure you have:

  • n8n Cloud account (or self-hosted instance)
  • GitHub repository where you're an admin
  • Slack workspace where you can add webhooks/apps

Step 1: Create New Workflow

  1. In n8n, click "New Workflow"
  2. Name it "GitHub to Slack Notifications"
  3. Click Save (top-right)

Step 2: Add GitHub Webhook Trigger

  1. Click the "+" button on the canvas
  2. Search for "GitHub Trigger" node
  3. Select it to add to canvas

Configure the GitHub Trigger:

  1. Repository Owner: Your GitHub username or org name

  2. Repository Name: Your repo name (e.g., "my-project")

  3. Events: Select "Issues" events

    • issues.opened
    • issues.updated
    • issues.closed
  4. Credentials: Click "Create New Credentials"

    • You'll need a GitHub Personal Access Token
    • Go to GitHub → Settings → Developer Settings → Personal Access Tokens
    • Generate token with repo scope
    • Paste into n8n credentials
    • Test connection
  5. Copy the Webhook URL from n8n

  6. Add webhook to GitHub:

    • Go to your GitHub repo → Settings → Webhooks
    • Click "Add webhook"
    • Paste n8n webhook URL
    • Content type: application/json
    • Select "Let me select individual events" → Check "Issues"
    • Click "Add webhook"

Step 3: Parse GitHub Data

Add a Code Node to extract and format the GitHub issue data:

  1. Click "+" after the GitHub Trigger
  2. Search for "Code" node and add it
  3. Name it "Parse Issue Data"

Paste this code:

// Extract GitHub issue data
const issue = $input.first().json.issue;
const action = $input.first().json.action;
const sender = $input.first().json.sender;

// Determine action emoji
const actionEmoji = {
  opened: '🆕',
  updated: '✏️',
  closed: '✅',
  reopened: '🔄'
}[action] || '📌';

// Format output for Slack
return {
  json: {
    action: action,
    actionEmoji: actionEmoji,
    issueNumber: issue.number,
    issueTitle: issue.title,
    issueBody: issue.body || 'No description provided',
    issueUrl: issue.html_url,
    issueState: issue.state,
    labels: issue.labels.map(l => l.name).join(', ') || 'None',
    author: sender.login,
    authorUrl: sender.html_url
  }
};

What this does:

  • Extracts issue data from GitHub webhook payload
  • Adds emoji based on action type
  • Formats data for easy use in Slack node

Step 4: Add Slack Notification

  1. Click "+" after the Code node
  2. Search for "Slack" node
  3. Select "Slack > Post Message"

Configure Slack Node:

  1. Credentials: Click "Create New Credentials"

    • Choose "OAuth2" method
    • Click "Connect my account"
    • Authorize n8n in Slack (requires admin permission)
    • Select your workspace
  2. Channel: Choose your channel (e.g., #engineering, #github-notifications)

  3. Message Type: Select "Block"

  4. Blocks JSON: Paste this:

[
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "{{ $json.actionEmoji }} *Issue {{ $json.action }}:* #{{ $json.issueNumber }}"
    }
  },
  {
    "type": "section",
    "text": {
      "type": "mrkdwn",
      "text": "*{{ $json.issueTitle }}*\n\n{{ $json.issueBody.substring(0, 200) }}{{ $json.issueBody.length > 200 ? '...' : '' }}"
    }
  },
  {
    "type": "context",
    "elements": [
      {
        "type": "mrkdwn",
        "text": "👤 <{{ $json.authorUrl }}|{{ $json.author }}> | 🏷️ {{ $json.labels }}"
      }
    ]
  },
  {
    "type": "actions",
    "elements": [
      {
        "type": "button",
        "text": {
          "type": "plain_text",
          "text": "View Issue"
        },
        "url": "{{ $json.issueUrl }}"
      }
    ]
  }
]

What this creates:

  • Header with emoji and action type
  • Issue title and truncated description
  • Author and labels
  • "View Issue" button linking to GitHub

Step 5: Test Your Workflow

  1. Click "Test Workflow" button (top-right)
  2. Go to your GitHub repo and create a test issue
  3. Watch n8n executions panel (bottom)
  4. Check your Slack channel for the notification

If it doesn't work:

  • Check webhook deliveries in GitHub (Settings → Webhooks)
  • Verify credentials are connected
  • Review execution log for error messages

Step 6: Activate and Monitor

  1. Toggle workflow to "Active" (top-right switch)
  2. Your workflow now runs automatically 24/7
  3. Monitor executions in the n8n dashboard
  4. Set up error notifications (optional but recommended)

Congratulations!

You've built a production-ready workflow that:

  • Connects GitHub and Slack
  • Transforms data with code
  • Formats rich Slack messages
  • Runs automatically forever

Next Steps

Now that you understand the basics, you can:

  • Add filtering: Only notify for issues with specific labels
  • Add error handling: Catch failures and send alerts
  • Extend functionality: Add more GitHub events (PRs, comments)
  • Try other integrations: Replace Slack with Email, Discord, or Microsoft Teams

Want to go deeper? Read our full GitHub-Slack Bot Guide with advanced patterns like bidirectional sync and custom commands.

Need help building custom workflows? We design and implement production-grade automations for agencies and teams. Schedule a consultation →


Essential n8n Building Blocks

Now that you've built your first workflow, let's explore the most common integrations you'll use. These "building blocks" can be mixed and matched to solve nearly any automation challenge.

Slack: Team Communication Hub

Why automate Slack? Your team already lives in Slack. By automating Slack notifications, approvals, and interactions, you meet your team where they are—eliminating context switching and email overload.

Common use cases:

  • Daily standup reminders and status reports
  • Error alerts from monitoring systems
  • Approval workflows via Slack buttons
  • Custom Slack bots for internal tools
  • Form submissions and feedback collection

Key n8n nodes:

  • Slack Trigger (listen to messages, reactions, slash commands)
  • Send Message (post to channels or DMs)
  • Get User Info (lookup user details)
  • Upload File (share reports, screenshots, CSVs)

Authentication: OAuth2 (one-click workspace integration)

Example workflows:

Pro tip: Use Slack's Block Kit for rich, interactive messages with buttons, dropdowns, and formatted text.

Complete Slack Building Block Guide
Learn advanced Slack automation patterns
Learn more
Slack Automation Solutions
See how we help teams automate Slack workflows
Learn more

HubSpot: CRM and Marketing Automation

Why automate HubSpot? HubSpot is powerful but manual data entry kills productivity. Automate contact creation, deal updates, and invoice generation to eliminate busywork.

Common use cases:

  • Sync form submissions to HubSpot contacts automatically
  • Create invoices from calendar events (billable hours tracking)
  • Trigger email campaigns based on external events
  • Generate custom reports from HubSpot data
  • Keep HubSpot in sync with other tools (Stripe, Intercom, etc.)

Key n8n nodes:

  • HubSpot Trigger (listen to contact created, deal updated, etc.)
  • Create/Update Contact
  • Create/Update Deal
  • Create Invoice
  • Get Company

Authentication: API Key or OAuth2

Example workflows:

Real-world impact: One agency client saved 8 hours/week by automating invoice creation from billable meetings. The workflow paid for itself in the first month.

Complete HubSpot Building Block Guide
Master HubSpot CRM automation
Learn more
HubSpot Automation Solutions
Professional HubSpot workflow implementation
Learn more

GitHub: Developer Workflow Automation

Why automate GitHub? GitHub is the command center for engineering teams. Automating issue triage, PR reviews, and deployment notifications keeps everyone in sync without constant status meetings.

Common use cases:

  • Auto-label issues based on content or author
  • Assign issues to team members via round-robin or keyword matching
  • Notify teams in Slack when PRs are ready for review
  • Sync GitHub issues to project management tools (Jira, Linear, Front)
  • Post deployment notifications to Slack or Slack when releases ship

Key n8n nodes:

  • GitHub Trigger (issues, PRs, releases, comments)
  • Create/Update Issue
  • Add Comment
  • Get Pull Request
  • Create Branch

Authentication: Personal Access Token or OAuth

Example workflows:

Pro tip: Use GitHub webhooks (push model) instead of polling (pull model) for real-time notifications without API rate limit issues.


Google Calendar & Gmail: Productivity Automation

Why automate Google Workspace? If you use Google Calendar for scheduling and Gmail for email, automation can eliminate repetitive admin work like follow-ups, invoicing, and meeting prep.

Common use cases:

  • Create HubSpot invoices when calendar events end (billable hours)
  • Send automated follow-up emails after meetings
  • Sync calendar availability to team dashboards
  • Generate weekly meeting reports (time tracking)
  • Auto-create tasks from calendar events

Key n8n nodes:

  • Google Calendar Trigger (event starts, event ends)
  • Gmail Send Email
  • Gmail Read Email
  • Create Calendar Event
  • Update Calendar Event

Authentication: OAuth2 (Google Service Account for server-to-server)

Example workflows:

Real-world impact: A consulting agency automated their entire billable hours workflow—calendar events automatically create HubSpot invoices with correct line items and rates.


HTTP Requests & Custom APIs

Why use HTTP Request node? Not every tool has a dedicated n8n integration. The HTTP Request node lets you connect to any web service with an API—unlocking infinite integration possibilities.

Common use cases:

  • Connect to internal APIs (your own backend services)
  • Scrape web data (with respect to terms of service)
  • Call third-party APIs not yet in n8n library
  • Build custom webhooks for external systems
  • Test APIs during development

Key nodes:

  • HTTP Request (make API calls)
  • Webhook (receive incoming data)
  • Respond to Webhook (send responses back)

Authentication: API Key, Bearer Token, OAuth2, Basic Auth, Custom Headers

Example code:

// Making an authenticated API call
const response = await $http.request({
  method: 'POST',
  url: 'https://api.example.com/data',
  headers: {
    'Authorization': `Bearer ${$env.API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: {
    data: $json.inputData
  }
});

return { json: response };

Pro tip: Use environment variables ($env.API_KEY) instead of hardcoding credentials. Set these in n8n settings → Environment Variables.


Data Transformation Nodes

These utility nodes are your Swiss Army knife for manipulating data:

Set Node - Transform and map data

  • Rename fields
  • Add calculated fields
  • Remove unwanted data
  • Format dates and strings

Code Node - Full JavaScript/Python for custom logic

  • Complex calculations
  • API response parsing
  • Business logic implementation
  • Data validation

Merge Node - Combine data from multiple sources

  • Join datasets like SQL JOIN
  • Append arrays
  • Merge objects

Split Node - Break arrays into individual items

  • Process lists item-by-item
  • Fan-out workflows

Example: Format invoice data

// Calculate invoice line items from calendar event
const event = $input.first().json;

// Parse service type from event title (e.g., "Consulting - Project X")
const match = event.summary.match(/^(\w+) - (.+)$/);
const serviceType = match ? match[1] : 'General';
const projectName = match ? match[2] : event.summary;

// Calculate hours (event duration)
const start = new Date(event.start.dateTime);
const end = new Date(event.end.dateTime);
const hours = (end - start) / (1000 * 60 * 60); // milliseconds to hours

// Lookup hourly rate by service type
const rates = {
  'Consulting': 150,
  'Development': 125,
  'Training': 100,
  'General': 100
};
const rate = rates[serviceType] || rates.General;

// Calculate total
const lineTotal = hours * rate;

return {
  json: {
    projectName: projectName,
    serviceType: serviceType,
    hours: hours.toFixed(2),
    rate: rate,
    lineTotal: lineTotal.toFixed(2),
    description: `${serviceType} work on ${projectName} (${hours.toFixed(1)}h @ $${rate}/hr)`
  }
};

Struggling with a specific integration? We've built workflows for 100+ tools and can help you connect anything. Get expert help →


Real-World Workflow Examples

Let's see how these building blocks come together in production workflows that real teams use every day.

Example 1: Google Search Console Weekly SEO Report

The Problem Manually checking Google Search Console for SEO performance is time-consuming. Ranking drops go unnoticed for weeks, missing opportunities to fix issues quickly.

The Solution

Automated weekly reports that identify:

  • Quick wins (keywords ranking 11-20 with high impressions)
  • Biggest ranking improvements
  • Biggest ranking drops
  • Newly indexed pages

Workflow Components

  1. Schedule Trigger - Every Monday at 9 AM
  2. HTTP Request - Call Google Search Console API (queries and pages)
  3. Code Node - Analyze data, calculate changes, identify opportunities
  4. Gmail Node - Send formatted HTML report to team

Key Insights

  • Saved 2 hours/week of manual SEO monitoring
  • Caught ranking drops 5x faster (weekly vs. monthly reviews)
  • Identified 15+ quick-win keywords in first month

Technical Highlights

  • OAuth2 authentication with Google Search Console API
  • Data analysis logic comparing this week vs. last week
  • HTML email template with charts and actionable recommendations

Learn More


Example 2: GitHub to Front Customer Support Sync

The Problem Engineering team uses GitHub for issue tracking. Support team uses Front for customer communication. Issues get lost in translation, leading to slow response times and frustrated customers.

The Solution Bidirectional sync that:

  • Creates Front conversations when GitHub issues are opened
  • Updates Front when engineers add GitHub comments
  • Updates GitHub when support adds Front replies
  • Closes both sides when issue is resolved

Workflow Components

  1. GitHub Webhook Trigger - Listen for issue events
  2. Code Node - Parse issue data and determine sync logic
  3. HTTP Request - Call Front API to create/update conversations
  4. Switch Node - Route different event types (created, updated, closed)

Key Insights

  • 50% faster response time (no more manual syncing)
  • Zero issues lost between teams
  • Customers see real-time updates without engineering having to context-switch

Technical Highlights

  • Custom webhook authentication for security
  • Deduplication logic to prevent sync loops
  • Error handling and retry logic for API failures

Learn More


Example 3: Google Calendar to HubSpot Invoice Automation

The Problem Agency tracks billable hours in Google Calendar but manually creates HubSpot invoices at month-end. This takes 4+ hours and is error-prone.

The Solution Automatic invoice creation when calendar events end:

  • Reads calendar event title for service type (e.g., "Consulting - Client X")
  • Calculates hours from event duration
  • Looks up hourly rate by service type
  • Creates HubSpot invoice with line items
  • Tags invoice with client name and project

Workflow Components

  1. Google Calendar Trigger - Event ends
  2. Filter Node - Only process events from "Billable Hours" calendar
  3. Code Node - Parse event title, calculate hours and cost
  4. HubSpot Node - Create invoice with calculated line items

Key Insights

  • Eliminated 100% of manual invoice data entry
  • Invoices sent same day instead of end-of-month
  • Improved cash flow (faster invoicing → faster payment)
  • Reduced billing errors to zero

Technical Highlights

  • Regex parsing of calendar event titles
  • Rate lookup table in Code node
  • HubSpot API line item formatting

Learn More


Browse All Workflow Templates

These are just 3 of our 6+ production-tested workflows. Each comes with:

  • Complete workflow JSON (import in one click)
  • Step-by-step setup guide
  • Credential configuration help
  • Troubleshooting tips
Browse Complete Workflow Library
Import 6+ ready-to-use workflow templates
Learn more

Can't find what you need? We build custom workflows for agencies and growing teams. From idea to production in 2-4 weeks. Schedule a discovery call →


Advanced Techniques

Ready to level up? These advanced patterns will help you build production-grade workflows with proper error handling, debugging, and AI assistance.

Code Nodes & JavaScript

When to use Code nodes

  • Complex data transformations beyond Set node capabilities
  • Business logic that changes based on multiple conditions
  • API response parsing with nested data structures
  • Custom calculations and algorithms

Accessing workflow data

  • $input.first().json - Get first item from previous node
  • $input.all() - Get all items as array
  • $node["Node Name"].json - Get data from specific node
  • $env.VARIABLE_NAME - Access environment variables

Example: Advanced data transformation

// Process multiple items with error handling
const items = $input.all();

const processed = items.map((item, index) => {
  try {
    const data = item.json;

    // Complex business logic
    const score = calculateScore(data);
    const category = categorize(data);
    const enriched = enrichData(data);

    return {
      json: {
        id: data.id,
        score: score,
        category: category,
        ...enriched,
        processed: true,
        processedAt: new Date().toISOString()
      }
    };
  } catch (error) {
    // Graceful error handling
    console.error(`Error processing item ${index}:`, error);
    return {
      json: {
        id: item.json.id,
        error: error.message,
        processed: false
      }
    };
  }
});

return processed;

// Helper functions
function calculateScore(data) {
  // Your scoring logic
  return (data.metric1 * 0.5) + (data.metric2 * 0.3) + (data.metric3 * 0.2);
}

function categorize(data) {
  if (data.score > 80) return 'high';
  if (data.score > 50) return 'medium';
  return 'low';
}

function enrichData(data) {
  // Add calculated fields
  return {
    fullName: `${data.firstName} ${data.lastName}`,
    daysActive: Math.floor((Date.now() - new Date(data.createdAt)) / (1000 * 60 * 60 * 24))
  };
}

Error Handling & Retry Logic

Why error handling matters In production, workflows will encounter failures:

  • API rate limits
  • Network timeouts
  • Invalid data
  • External service outages

Proper error handling ensures workflows recover gracefully.

Built-in retry settings Every node has retry settings:

  1. Click node → Settings tab
  2. Enable "Retry On Fail"
  3. Configure:
    • Max Retries: 3-5 attempts
    • Wait Between Tries: 5-10 seconds
    • Exponential backoff: Recommended

Error Trigger workflow Create a separate workflow that catches all failures:

  1. Error Trigger node - Catches errors from any workflow
  2. Code Node - Format error details
  3. Slack Node - Alert team in #alerts channel

Example error notification

// Format error for Slack
const error = $json;

return {
  json: {
    text: '🚨 Workflow Error',
    blocks: [
      {
        type: 'section',
        text: {
          type: 'mrkdwn',
          text: `*Workflow:* ${error.workflow.name}\n*Node:* ${error.node.name}\n*Error:* ${error.error.message}`
        }
      },
      {
        type: 'context',
        elements: [
          {
            type: 'mrkdwn',
            text: `Execution ID: ${error.executionId} | Time: ${new Date().toLocaleString()}`
          }
        ]
      }
    ]
  }
};

n8n: The Perfect Complement to Vibe-Coded Apps

Why n8n and vibe coding are made for each other

If you're building apps with AI coding tools (Lovable, Bolt, Replit Agent, Cursor), you've discovered something powerful: you can ship functional apps without being a professional developer. But you've also hit a wall when it comes to backend automation.

The vibe coding gap:

  • Frontend: AI excels at generating UI components and database schemas
  • CRUD operations: Basic create/read/update/delete works great
  • Complex workflows: Multi-step automation breaks down in prompts
  • External integrations: Connecting 3rd party APIs is tedious via prompts
  • Business logic: Conditional workflows are hard to visualize in text

Why n8n fills this gap perfectly:

n8n appeals to the same skillset and mindset as vibe coding:

  • Visual, not text-based - See your automation logic instead of prompting for it
  • Interactive iteration - Drag, drop, test, refine in real-time (no waiting for AI)
  • Instant feedback - See data flowing through each node as you build
  • Same technical level - If you can vibe code, you can build n8n workflows
  • No complex abstractions - Direct manipulation of your automation logic

The Ideal Stack: Supabase + n8n + Vibe-Coded Frontend

Supabase - Database and auth (AI tools generate this automatically) n8n - Backend automation and workflows (you build this visually) Lovable/Bolt/etc - Frontend UI (AI generates this from prompts)

This combination keeps your app code minimal while unlocking powerful automation:

Example: User Onboarding Flow

Instead of prompting AI to write complex onboarding code:

"When user signs up, create workspace, send welcome email,
add to Mailchimp, notify team in Slack, schedule follow-up..."

You simply:

  1. Configure Supabase webhook on user INSERT
  2. Build n8n workflow visually:
    • Webhook receives new user data
    • Create workspace (Supabase API call)
    • Send email (Mailchimp node)
    • Notify team (Slack node)
    • Schedule follow-up (Wait node + Email)
  3. Test and refine interactively

The vibe coding advantage: Your frontend stays simple (just user signup form), while n8n handles all the complex orchestration in the background.

Real-World Use Cases for Vibe-Coded Apps

Product-Led Growth:

  • User hits usage milestone → Trigger upgrade offer workflow
  • Trial ending → Send retention email sequence
  • Feature adoption low → Activate in-app tutorial

User Onboarding:

  • New signup → Create workspace, send welcome email, notify team
  • Onboarding incomplete → Send reminder sequence
  • First action taken → Celebrate with team notification

Data Enrichment:

  • Lead captured → Enrich with Clearbit, score, route to sales
  • User profile updated → Sync to CRM (HubSpot, Salesforce)
  • Form submitted → Create ticket in support tool (Front, Zendesk)

Subscription Management:

  • Payment succeeded → Provision access, send receipt, update analytics
  • Payment failed → Retry sequence, dunning emails
  • Subscription cancelled → Exit survey, win-back campaign

All of these workflows are painful to build through AI prompts but intuitive in n8n's visual interface.

Using AI to Help Build n8n Workflows

While n8n is visual, you can still use AI assistants for specific tasks:

When to use AI with n8n:

  • Data transformation logic - Generate Code node JavaScript for complex parsing
  • API payload formatting - Format data structures for external APIs
  • Regex patterns - Generate text matching/extraction patterns
  • Error handling logic - Create retry and fallback strategies

Example prompt for Code node:

"I have user data with fields: firstName, lastName, email, signupDate. I need to: 1) Combine firstName + lastName into fullName, 2) Calculate days since signup, 3) Categorize as 'new' (< 7 days), 'active' (7-30 days), or 'established' (>30 days). Return as JSON."

AI generates the code, you paste into Code node, test with real data, iterate if needed.

The key difference: n8n's visual canvas lets you see and manipulate the workflow logic directly, while AI just helps with small code snippets within nodes.

Learn More About Vibe Coding + n8n

Deep dives:

The bottom line: If you're vibe coding your app, you should be using n8n for your backend workflows. Same skillset, same mindset, infinitely more powerful than trying to prompt AI for complex automation.


Workflow Testing & Debugging

Use execution logs Every workflow execution is logged:

  1. Click "Executions" tab (bottom panel)
  2. Select an execution
  3. See data at each node
  4. Identify where things went wrong

Step-by-step debugging

  • Click on any node during execution to see its input/output
  • Use "Test Workflow" to run without activating
  • Add "Sticky Note" nodes with debugging comments

Webhook testing External webhooks are hard to test locally. Use:

  • RequestBin - Capture webhook payloads
  • webhook.site - See real-time webhook data
  • Copy payload → Use in manual testing

Production vs. Development Best practice: Maintain two versions of workflows:

  • Development: Test changes before production
  • Production: Active, monitored workflow
  • Export/import JSON to copy between environments

Performance Optimization

Minimize node executions

  • Use filtering early (IF node at start of workflow)
  • Avoid unnecessary loops
  • Batch API calls when possible

Batch vs. Item processing

  • Item mode: Processes each item separately (slower but more control)
  • Batch mode: Processes all items at once (faster for bulk operations)

Caching expensive operations Store API responses that don't change often:

  • Use n8n's built-in cache
  • Store in external database
  • Set cache expiration

Monitor execution time

  • Check "Duration" in execution logs
  • Identify slow nodes
  • Optimize or parallelize

Security Best Practices

Manage credentials securely

  • Use n8n Credentials Manager (encrypted storage)
  • Never hardcode API keys in Code nodes
  • Use environment variables for sensitive data
  • Don't commit credentials to version control

Webhook authentication Always validate webhook sources:

// Verify webhook signature
const receivedSignature = $node["Webhook"].headers['x-hub-signature'];
const expectedSignature = calculateHmac($json, process.env.WEBHOOK_SECRET);

if (receivedSignature !== expectedSignature) {
  throw new Error('Invalid webhook signature');
}

Input validation Never trust external input:

// Validate and sanitize
function validateEmail(email) {
  const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
  return regex.test(email);
}

if (!validateEmail($json.email)) {
  throw new Error('Invalid email format');
}

Rate limiting Respect API rate limits:

  • Use "Wait" node between batch requests
  • Check API documentation for limits
  • Implement exponential backoff on errors

Audit logging Log sensitive operations:

  • Who triggered the workflow
  • What data was accessed
  • When actions were performed

Need production-grade workflows? We implement workflows with enterprise-level error handling, monitoring, security, and compliance. Learn more →


When to Build vs. When to Hire

Not every workflow should be a DIY project. Here's an honest framework to help you decide.

Build Yourself When:

Simple 3-5 node workflows Example: Schedule trigger → HTTP Request → Slack notification

Standard integrations available in n8n Example: Slack, Gmail, Google Sheets, common APIs

You have technical team members At least one person comfortable with basic JavaScript

Time to learn and iterate Can afford 2-4 weeks of trial and error

Low risk if workflow breaks Internal tools, non-customer-facing, nice-to-have features

You enjoy learning new tools DIY is rewarding if you're motivated to learn

Recommended starting point: Browse our workflow templates and modify them for your needs.


Consider Hiring When:

⚠️ Mission-critical workflows Revenue-impacting, customer-facing, or core business operations

⚠️ Complex multi-system orchestration 5+ tools with interdependencies and data transformations

⚠️ Custom API integrations Tools not in n8n library requiring complex authentication

⚠️ Need error handling and monitoring Production-grade reliability with alerting and recovery

⚠️ Security/compliance requirements HIPAA, GDPR, SOC2, or other regulatory needs

⚠️ Team lacks bandwidth No time to learn, maintain, and debug workflows

⚠️ Need it done right the first time Can't afford weeks of iteration and troubleshooting


What We Provide

When you hire Workware Labs for n8n implementation:

1. Discovery & Design (Week 1)

  • Requirements gathering workshop
  • Workflow architecture design
  • Integration feasibility analysis
  • Timeline and cost estimate

2. Implementation (Weeks 2-3)

  • Production-grade workflow development
  • Error handling and retry logic
  • Monitoring and alerting setup
  • Security and authentication configuration

3. Documentation & Training (Week 4)

  • Complete workflow documentation
  • Team training session (recorded)
  • Troubleshooting runbook
  • Handoff and ongoing support plan

4. Ongoing Maintenance (Optional)

  • Monthly workflow health checks
  • Performance optimization
  • New feature additions
  • 24/7 emergency support

Typical Investment: $3,000 - $15,000 depending on complexity Timeline: 2-4 weeks from kickoff to production

What makes us different:

  • We've built 50+ production n8n workflows
  • We teach you to maintain workflows (not vendor lock-in)
  • We're honest when DIY makes more sense
  • 2-4 week delivery (not months)

Free 30-Minute Automation Assessment

Not sure if you should build or hire?

Book a free call where we'll:

  1. Review your use case and technical requirements
  2. Assess your team's capabilities and bandwidth
  3. Provide honest recommendation (build vs. hire)
  4. Share relevant workflow templates if DIY makes sense
  5. Provide estimated timeline and cost if hiring makes sense

No sales pressure. If we think you should build it yourself, we'll tell you—and share free resources to help.

Schedule Free Automation Assessment
30-minute consultation - no obligation
Learn more

Case Study Preview

Agency X was manually syncing 200+ customer support tickets per week between GitHub (engineering) and Front (support). This took 8+ hours of admin time weekly and tickets were often lost or duplicated.

Solution: We built a bidirectional GitHub-Front sync workflow with custom logic for deduplication, error handling, and status mapping.

Results:

  • 8 hours/week saved (400+ hours/year)
  • Zero tickets lost or duplicated
  • 50% faster response time
  • ROI payback in 6 weeks

Read full case study → (coming soon)


Ready-to-Use Workflow Library

Don't start from scratch. Import our production-tested workflows and customize them for your needs.

1. Google Search Console Weekly SEO Report

  • 📊 Automated SEO monitoring and insights
  • 🎯 Identifies ranking opportunities
  • ✉️ Formatted email reports every Monday
  • View Guide | Import Workflow

2. GitHub to Front Customer Support Sync

  • 🔄 Bidirectional issue synchronization
  • 🤝 Connects engineering and support teams
  • ⚡ Real-time updates, zero data loss
  • Import Workflow

3. Google Calendar to HubSpot Invoice

  • 💰 Automatic invoice generation
  • ⏱️ Tracks billable hours from calendar
  • 🏷️ Custom service types and rates
  • View Guide

Browse by Integration:

  • 💬 Slack Workflows
  • 📊 HubSpot Workflows
  • 🐙 GitHub Workflows
  • 📅 Google Workspace Workflows
  • 🔗 Custom API Workflows

Browse by Use Case:

  • Notifications & Alerts
  • CRM Automation
  • Analytics & Reporting
  • DevOps & Deployment
  • Data Synchronization
Browse Complete Workflow Library
6+ production-ready templates - import in one click
Learn more

Further Reading & Resources

Getting Started

Core Concepts:


Building Blocks

Integration Guides:


Step-by-Step Guides

Hands-On Tutorials:


Deep Dives & Philosophy

Thought Leadership:


Browse by Solution Type

Industry-Specific Automation:


External Resources

Official n8n Documentation:


Start Building Today

You now have everything you need to master n8n workflow automation:

  • ✅ Understanding of core concepts
  • ✅ Step-by-step tutorials
  • ✅ Real-world examples
  • ✅ Advanced techniques
  • ✅ Production-ready templates

Your next steps

  1. If you're ready to DIY

  2. If you need expert help


Questions? We're here to help. Email us or book a call.

Found this guide helpful? Share it with your team or on social media to help others discover the power of n8n automation.

n8nWorkflow AutomationComplete GuideTutorial