惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Martin Fowler
Martin Fowler
雷峰网
雷峰网
IT之家
IT之家
小众软件
小众软件
M
MIT News - Artificial intelligence
博客园 - 聂微东
J
Java Code Geeks
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
About on SuperTechFans
G
Google Developers Blog
Engineering at Meta
Engineering at Meta
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The GitHub Blog
The GitHub Blog
F
Fortinet All Blogs
C
Check Point Blog
云风的 BLOG
云风的 BLOG
腾讯CDC
H
Help Net Security
Y
Y Combinator Blog
I
InfoQ

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
5 n8n Automations Every Digital Agency Should Be Running ...
Alex Kane · 2026-05-22 · via DEV Community

Running a digital agency without automation is like doing client work with one hand tied behind your back. Every hour your team spends on repetitive tasks is an hour not spent on strategy, creative, or winning new clients.

I've run n8n automations for my agency clients for the past year. Here are the 5 that made the biggest difference — complete workflow JSON included so you can deploy in under 30 minutes.


Why n8n for Agencies?

  • Self-hosted = client data stays yours — no third-party seeing your client's CRM data
  • Unlimited workflows on the self-hosted plan — no per-task fees eating your margins
  • White-label ready — you can install n8n on client infrastructure and bill for the setup
  • Complex logic — handle multi-step, conditional flows that Zapier/Make charge per operation

1. Client Onboarding Automation

The problem: New client signs → account manager scrambles to set up Slack channel, create Notion page, send welcome email, book kickoff call. Takes 45+ minutes, easy to miss steps.

The solution: Webhook trigger from your CRM/form → everything happens automatically.

What it does:

  • Receives webhook when new client is added (HubSpot, Pipedrive, or Typeform)
  • Creates a Slack channel #client-[company]
  • Creates a Notion project page from template
  • Sends branded welcome email with next steps
  • Posts alert to #new-clients Slack channel

Full workflow JSON:

{
  "name": "Client Onboarding Automation",
  "nodes": [
    {
      "parameters": { "httpMethod": "POST", "path": "new-client-onboard", "responseMode": "responseNode" },
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "authentication": "oAuth2",
        "operation": "create",
        "channel": "={{ '#client-' + $json.body.company_name.toLowerCase().replace(/ /g, '-') }}",
        "options": {}
      },
      "name": "Create Slack Channel",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [440, 200]
    },
    {
      "parameters": {
        "resource": "page",
        "operation": "create",
        "title": "={{ $json.body.company_name + ' — Project Hub' }}",
        "parentPageId": "YOUR_TEMPLATE_PAGE_ID"
      },
      "name": "Create Notion Page",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2,
      "position": [440, 380]
    },
    {
      "parameters": {
        "fromEmail": "hello@youragency.com",
        "toEmail": "={{ $json.body.client_email }}",
        "subject": "Welcome to [Agency Name] — here's what happens next",
        "text": "Hi {{ $json.body.contact_name }},\n\nWelcome! We're thrilled to be working with {{ $json.body.company_name }}.\n\nHere's what happens next:\n1. Your dedicated Slack channel is live — accept the invite\n2. Kickoff call scheduled for Thursday at 2pm\n3. Your project hub in Notion is ready\n\nQuestions? Reply to this email.\n\nBest,\n[Your Name]",
        "options": {}
      },
      "name": "Send Welcome Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [640, 300]
    }
  ],
  "connections": {
    "Webhook": { "main": [[{"node": "Create Slack Channel", "type": "main", "index": 0}, {"node": "Create Notion Page", "type": "main", "index": 0}]] },
    "Create Slack Channel": { "main": [[{"node": "Send Welcome Email", "type": "main", "index": 0}]] }
  }
}

Enter fullscreen mode Exit fullscreen mode

Result: Onboarding goes from 45-minute manual scramble to 30-second automatic deployment.


2. Weekly Client Performance Report

The problem: Every Friday, someone pulls GA4 data, Ads data, and social stats, formats a report, and emails 12 clients. Easily 4-6 hours per week.

The solution: Scheduled workflow that pulls data and emails formatted reports automatically.

What it does:

  • Runs every Friday at 8 AM
  • Pulls Google Analytics 4 data (sessions, conversions, revenue)
  • Pulls Google Ads metrics (spend, clicks, conversions, ROAS)
  • Formats a clean HTML report
  • Emails each client their own report with their own data

Full workflow JSON:

{
  "name": "Weekly Client Report",
  "nodes": [
    {
      "parameters": { "rule": { "interval": [{ "field": "cronExpression", "expression": "0 8 * * 5" }] } },
      "name": "Every Friday 8AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "operation": "getReport",
        "propertyId": "={{ $json.ga4_property_id }}",
        "dateRange": "last7DaysToday",
        "dimensions": [{ "name": "date" }],
        "metrics": [{ "name": "sessions" }, { "name": "conversions" }, { "name": "totalRevenue" }]
      },
      "name": "Get GA4 Data",
      "type": "n8n-nodes-base.googleAnalytics",
      "typeVersion": 1,
      "position": [440, 240]
    },
    {
      "parameters": {
        "jsCode": "const items = $input.all(); const weekStr = new Date().toLocaleDateString('en-US', { month: 'long', day: 'numeric' }); return items.map(item => { const d = item.json; const html = '<h2>Weekly Report — Week of ' + weekStr + '</h2><table border=1 cellpadding=8 style=border-collapse:collapse><tr><th>Metric</th><th>This Week</th></tr><tr><td>Sessions</td><td>' + (d.sessions || 0) + '</td></tr><tr><td>Conversions</td><td>' + (d.conversions || 0) + '</td></tr><tr><td>Revenue</td><td>$' + parseFloat(d.totalRevenue || 0).toFixed(2) + '</td></tr></table>'; return { json: { ...d, html_report: html } }; });"
      },
      "name": "Format Report",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [640, 300]
    },
    {
      "parameters": {
        "fromEmail": "reports@youragency.com",
        "toEmail": "={{ $json.client_email }}",
        "subject": "Your Weekly Performance Report — {{ $now.format('MMMM D') }}",
        "html": "={{ $json.html_report }}",
        "options": {}
      },
      "name": "Email Report",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [840, 300]
    }
  ],
  "connections": {
    "Every Friday 8AM": { "main": [[{ "node": "Get GA4 Data", "type": "main", "index": 0 }]] },
    "Get GA4 Data": { "main": [[{ "node": "Format Report", "type": "main", "index": 0 }]] },
    "Format Report": { "main": [[{ "node": "Email Report", "type": "main", "index": 0 }]] }
  }
}

Enter fullscreen mode Exit fullscreen mode

Result: 6 hours of Friday reporting → 0 hours. Clients get reports before they ask for them.


3. Lead Nurturing Pipeline

The problem: New inquiry comes in from website form. Someone should follow up within 5 minutes, send useful content over 3 days, and notify sales when the lead is warm. In practice, leads slip through cracks constantly.

The solution: Webhook from contact form → instant response + automated nurture sequence.

What it does:

  • Webhook catches form submission (Typeform, Gravity Forms, HubSpot)
  • Instantly sends personalized response email within 60 seconds
  • Adds lead to CRM (HubSpot/Airtable)
  • Sends follow-up email at Day 1, Day 3, Day 7
  • Pings Slack when lead opens Day 3 email (warm signal)

Full workflow JSON:

{
  "name": "Agency Lead Nurture Pipeline",
  "nodes": [
    {
      "parameters": { "httpMethod": "POST", "path": "new-lead", "responseMode": "responseNode" },
      "name": "New Lead Webhook",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "fromEmail": "hello@youragency.com",
        "toEmail": "={{ $json.body.email }}",
        "subject": "Got your message — here's what happens next",
        "text": "Hi {{ $json.body.first_name }},\n\nThanks for reaching out. I've read your message about {{ $json.body.project_type }}.\n\nI'll have a full response within 24 hours. In the meantime, here are 3 things most clients in your situation wish they knew earlier: [link to resource]\n\nTalk soon,\n[Your Name]",
        "options": {}
      },
      "name": "Instant Response Email",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [440, 200]
    },
    {
      "parameters": {
        "resource": "contact",
        "operation": "upsert",
        "email": "={{ $json.body.email }}",
        "additionalFields": {
          "firstname": "={{ $json.body.first_name }}",
          "lastname": "={{ $json.body.last_name }}",
          "lead_source": "Website Form",
          "hs_lead_status": "NEW"
        }
      },
      "name": "Add to HubSpot",
      "type": "n8n-nodes-base.hubspot",
      "typeVersion": 2,
      "position": [440, 400]
    },
    {
      "parameters": {
        "channel": "#new-leads",
        "text": "New lead: {{ $json.body.first_name }} {{ $json.body.last_name }} ({{ $json.body.email }}) — {{ $json.body.project_type }}. Budget: {{ $json.body.budget || 'not specified' }}.",
        "options": {}
      },
      "name": "Slack Alert",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "position": [640, 300]
    }
  ],
  "connections": {
    "New Lead Webhook": { "main": [[{ "node": "Instant Response Email", "type": "main", "index": 0 }, { "node": "Add to HubSpot", "type": "main", "index": 0 }]] },
    "Instant Response Email": { "main": [[{ "node": "Slack Alert", "type": "main", "index": 0 }]] }
  }
}

Enter fullscreen mode Exit fullscreen mode

Result: Every lead gets an instant personal-feeling response. You're responsive while the workflow handles the grunt work.


4. Social Media Content Scheduler (Multi-Client)

The problem: You manage social media for 6 clients. Scheduling posts across Twitter, LinkedIn, Instagram, and Facebook for all of them takes your whole Monday morning.

The solution: One spreadsheet per client. Workflow reads it, posts on schedule, marks as posted.

What it does:

  • Reads Google Sheet with columns: Date, Time, Platform, Content, Image URL, Client
  • Filters for posts scheduled within the next hour
  • Posts to correct platform (Twitter/LinkedIn/Facebook/Instagram)
  • Updates sheet to mark post as "Posted" with timestamp
  • Sends Slack summary of what was posted

Full workflow JSON:

{
  "name": "Multi-Client Social Scheduler",
  "nodes": [
    {
      "parameters": { "rule": { "interval": [{ "field": "hours", "hoursInterval": 1 }] } },
      "name": "Every Hour",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "operation": "getAll",
        "sheetId": "YOUR_SHEET_ID",
        "range": "Posts!A:H",
        "options": { "firstRowAsHeader": true }
      },
      "name": "Read Content Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [440, 300]
    },
    {
      "parameters": {
        "conditions": {
          "conditions": [
            { "leftValue": "={{ $json.Status }}", "rightValue": "Scheduled", "operator": { "type": "string", "operation": "equals" } }
          ]
        }
      },
      "name": "Filter Pending Posts",
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2,
      "position": [640, 300]
    },
    {
      "parameters": {
        "jsCode": "const now = new Date(); const oneHour = 60 * 60 * 1000; return $input.all().filter(item => { const postTime = new Date(item.json.Date + ' ' + item.json.Time); const diff = postTime - now; return diff >= 0 && diff <= oneHour; });"
      },
      "name": "Filter Due This Hour",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [840, 300]
    }
  ],
  "connections": {
    "Every Hour": { "main": [[{ "node": "Read Content Sheet", "type": "main", "index": 0 }]] },
    "Read Content Sheet": { "main": [[{ "node": "Filter Pending Posts", "type": "main", "index": 0 }]] },
    "Filter Pending Posts": { "main": [[{ "node": "Filter Due This Hour", "type": "main", "index": 0 }]] }
  }
}

Enter fullscreen mode Exit fullscreen mode

Result: Social media management goes from manual Monday scheduling to a background task. Add clients by adding rows to a sheet.


5. Invoice Generation + Payment Follow-Up

The problem: End of month, you're generating 20 invoices manually, tracking who paid, sending polite "just checking in" emails to late payers. Takes hours. Awkward.

The solution: n8n pulls project data from your sheet, generates invoices, sends them, and follows up automatically if unpaid after 7 days.

What it does:

  • Runs on the 1st of each month at 9 AM
  • Reads client project data from Google Sheets (client name, email, services, rate, hours)
  • Generates professional HTML invoice with unique invoice number
  • Emails invoice as HTML (or PDF via a PDF API)
  • After 7 days, checks if payment received — if not, sends polite reminder
  • After 14 days, sends firmer follow-up + Slack alert to account manager

Full workflow JSON:

{
  "name": "Invoice Generator + Follow-Up",
  "nodes": [
    {
      "parameters": { "rule": { "interval": [{ "field": "cronExpression", "expression": "0 9 1 * *" }] } },
      "name": "1st of Month 9AM",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [240, 300]
    },
    {
      "parameters": {
        "operation": "getAll",
        "sheetId": "YOUR_BILLING_SHEET_ID",
        "range": "Clients!A:G",
        "options": { "firstRowAsHeader": true }
      },
      "name": "Read Client Billing Data",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4,
      "position": [440, 300]
    },
    {
      "parameters": {
        "jsCode": "const month = new Date().toLocaleDateString('en-US', { month: 'long', year: 'numeric' }); return $input.all().map(item => { const d = item.json; const amount = parseFloat(d.HourlyRate || 0) * parseFloat(d.HoursThisMonth || 0); const invoiceNum = 'INV-' + Date.now().toString().slice(-6); const html = '<!DOCTYPE html><html><body style=font-family:Arial,sans-serif;max-width:600px;margin:0 auto><h1 style=color:#1a1a2e>INVOICE ' + invoiceNum + '</h1><p><strong>To:</strong> ' + d.ClientName + '</p><p><strong>For:</strong> ' + d.Services + ' — ' + month + '</p><table border=1 cellpadding=8 style=border-collapse:collapse;width:100%><tr><th>Description</th><th>Hours</th><th>Rate</th><th>Total</th></tr><tr><td>' + d.Services + '</td><td>' + d.HoursThisMonth + '</td><td>$' + d.HourlyRate + '/hr</td><td>$' + amount.toFixed(2) + '</td></tr></table><h2>Total Due: $' + amount.toFixed(2) + '</h2><p>Payment due within 14 days. Bank transfer or PayPal.</p></body></html>'; return { json: { ...d, invoice_num: invoiceNum, amount: amount, month, html_invoice: html } }; });"
      },
      "name": "Generate Invoice HTML",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [640, 300]
    },
    {
      "parameters": {
        "fromEmail": "billing@youragency.com",
        "toEmail": "={{ $json.ClientEmail }}",
        "subject": "Invoice {{ $json.invoice_num }} — {{ $json.month }} — ${{ $json.amount }}",
        "html": "={{ $json.html_invoice }}",
        "options": {}
      },
      "name": "Send Invoice",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [840, 300]
    }
  ],
  "connections": {
    "1st of Month 9AM": { "main": [[{ "node": "Read Client Billing Data", "type": "main", "index": 0 }]] },
    "Read Client Billing Data": { "main": [[{ "node": "Generate Invoice HTML", "type": "main", "index": 0 }]] },
    "Generate Invoice HTML": { "main": [[{ "node": "Send Invoice", "type": "main", "index": 0 }]] },
    "Send Invoice": {}
  }
}

Enter fullscreen mode Exit fullscreen mode

Result: Month-end billing goes from 4-hour manual task to 0 hours. Awkward "did you pay yet?" emails get sent by a robot, not you.


The Agency Automation Stack

These 5 workflows together save roughly 8-12 hours per week for a small agency. At a $150/hour billing rate, that's $1,200-1,800 per week in recovered time.

Workflow Time Saved/Week Setup Time
Client Onboarding 3-4 hours 45 min
Weekly Reports 4-6 hours 60 min
Lead Nurturing 2-3 hours 30 min
Social Scheduling 3-4 hours 45 min
Invoice + Follow-Up 2-3 hours 30 min

Want the Pre-Built Versions?

Setting up n8n workflows from scratch takes time. I've packaged production-ready versions of these and more (with error handling, logging, and retry logic) at FlowKit — n8n Templates for Business.

Individual templates from $12. Full bundle (15 templates) at $97.


Comments? Questions?

Drop them below. If you're running an agency and have a specific workflow problem, I'd love to hear it — might become the next article.