Resources / Library
Resources for Better AI Workflows.
Practical guides, reusable automation templates, AI workflow ideas, and free tools — organized around the work you actually need to get done.
Choose a guide to learn, a template to reuse, or a free tool to build faster.
Selected reading
Learn from the workflows already published.
What Are AI Agents?
A practical explanation of agents versus fixed workflows, with concrete small-business examples.
Build Your First AI Agent in n8n
A step-by-step build focused on tool-calling and decision-making inside n8n.
Small Business Automation Stack
A practical framework for choosing an automation backbone and avoiding unnecessary complexity.
Inventory & Order Alerts
Turn a Google Sheet into a low-stock alert workflow with Make.
Automate Customer Support
Classify repetitive support requests and route the cases that still need a human.
AI Client Proposals in 10 Minutes
A reusable template-plus-AI process for getting from client brief to reviewable draft faster.
1. Customer Support Triage (AI)
Classifies incoming support tickets with Gemini (FAQ / Billing / Urgent) and routes each to the right action automatically. Full walkthrough: How to Automate Customer Support. Requires Gmail and Gemini API credentials in n8n.
Platform: n8n Difficulty: Intermediate Use case: Customer support Credentials: Gmail + Gemini
Show JSON — click to expand and copy
{
"name": "AutoFlow Template - Customer Support Triage (AI)",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "support-ticket",
"responseMode": "onReceived",
"options": {}
},
"id": "trigger-1",
"name": "Support Ticket Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [0, 0]
},
{
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{ "id": "a1", "name": "customerName", "value": "={{ $json.body?.name ?? $json.name ?? 'there' }}", "type": "string" },
{ "id": "a2", "name": "customerEmail", "value": "={{ $json.body?.email ?? $json.email ?? '' }}", "type": "string" },
{ "id": "a3", "name": "message", "value": "={{ $json.body?.message ?? $json.message ?? '' }}", "type": "string" }
]
}
},
"id": "set-1",
"name": "Normalize Ticket Data",
"type": "n8n-nodes-base.set",
"typeVersion": 3.5,
"position": [250, 0]
},
{
"parameters": {
"modelName": "models/gemini-2.5-flash",
"options": { "temperature": 0.1 }
},
"id": "model-1",
"name": "Gemini Classifier Model",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"typeVersion": 1.1,
"position": [500, 200],
"credentials": {
"googlePalmApi": { "id": "REPLACE_AFTER_IMPORT", "name": "Gemini API" }
}
},
{
"parameters": {
"inputText": "={{ $json.message }}",
"categories": {
"categories": [
{ "category": "Simple FAQ", "description": "Common question answerable from standard FAQ" },
{ "category": "Refund or Billing", "description": "Customer requests a refund, cancellation, or billing issue" },
{ "category": "Urgent or Angry", "description": "Customer is upset, escalated, or reports a serious problem" }
]
},
"options": { "fallback": "other" }
},
"id": "classifier-1",
"name": "Classify Support Ticket",
"type": "@n8n/n8n-nodes-langchain.textClassifier",
"typeVersion": 1.1,
"position": [500, 0]
},
{
"parameters": {
"resource": "message",
"operation": "send",
"sendTo": "={{ $('Normalize Ticket Data').item.json.customerEmail }}",
"subject": "Re: Your question",
"emailType": "text",
"message": "=Hi {{ $('Normalize Ticket Data').item.json.customerName }},\n\nThanks for reaching out! This looks like a common question - check our FAQ, or reply here and a real person will follow up shortly."
},
"id": "gmail-1",
"name": "Auto-Reply FAQ",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [750, -150],
"credentials": { "gmailOAuth2": { "id": "REPLACE_AFTER_IMPORT", "name": "Gmail" } }
},
{
"parameters": {
"resource": "message",
"operation": "send",
"sendTo": "YOUR_EMAIL@example.com",
"subject": "=[Billing/Refund] New ticket from {{ $('Normalize Ticket Data').item.json.customerName }}",
"emailType": "text",
"message": "=Customer: {{ $('Normalize Ticket Data').item.json.customerName }} ({{ $('Normalize Ticket Data').item.json.customerEmail }})\n\nMessage:\n{{ $('Normalize Ticket Data').item.json.message }}\n\nCategory: Refund/Billing - requires manual review."
},
"id": "gmail-2",
"name": "Notify Owner - Billing",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [750, 0],
"credentials": { "gmailOAuth2": { "id": "REPLACE_AFTER_IMPORT", "name": "Gmail" } }
},
{
"parameters": {
"resource": "message",
"operation": "send",
"sendTo": "YOUR_EMAIL@example.com",
"subject": "=[URGENT] Ticket from {{ $('Normalize Ticket Data').item.json.customerName }}",
"emailType": "text",
"message": "=Customer: {{ $('Normalize Ticket Data').item.json.customerName }} ({{ $('Normalize Ticket Data').item.json.customerEmail }})\n\nMessage:\n{{ $('Normalize Ticket Data').item.json.message }}\n\nCategory: Urgent/Angry - respond personally ASAP."
},
"id": "gmail-3",
"name": "Notify Owner - Urgent",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [750, 150],
"credentials": { "gmailOAuth2": { "id": "REPLACE_AFTER_IMPORT", "name": "Gmail" } }
},
{
"parameters": {
"resource": "message",
"operation": "send",
"sendTo": "YOUR_EMAIL@example.com",
"subject": "=[Review Needed] Ticket from {{ $('Normalize Ticket Data').item.json.customerName }}",
"emailType": "text",
"message": "=Customer: {{ $('Normalize Ticket Data').item.json.customerName }} ({{ $('Normalize Ticket Data').item.json.customerEmail }})\n\nMessage:\n{{ $('Normalize Ticket Data').item.json.message }}\n\nCategory: Unclassified - needs manual triage."
},
"id": "gmail-4",
"name": "Notify Owner - Manual Review",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [750, 300],
"credentials": { "gmailOAuth2": { "id": "REPLACE_AFTER_IMPORT", "name": "Gmail" } }
}
],
"connections": {
"Support Ticket Webhook": { "main": [[{ "node": "Normalize Ticket Data", "type": "main", "index": 0 }]] },
"Normalize Ticket Data": { "main": [[{ "node": "Classify Support Ticket", "type": "main", "index": 0 }]] },
"Gemini Classifier Model": { "ai_languageModel": [[{ "node": "Classify Support Ticket", "type": "ai_languageModel", "index": 0 }]] },
"Classify Support Ticket": {
"main": [
[{ "node": "Auto-Reply FAQ", "type": "main", "index": 0 }],
[{ "node": "Notify Owner - Billing", "type": "main", "index": 0 }],
[{ "node": "Notify Owner - Urgent", "type": "main", "index": 0 }],
[{ "node": "Notify Owner - Manual Review", "type": "main", "index": 0 }]
]
}
},
"active": false,
"settings": { "executionOrder": "v1" }
}
2. Sales Tracking Automation (Sheets)
Logs every new sale to Google Sheets automatically and sends an alert for high-value deals. Full walkthrough: How to Automate Sales Tracking. Requires Google Sheets and Gmail credentials in n8n.
Platform: n8n Difficulty: Beginner Use case: Sales tracking Credentials: Google Sheets + Gmail
Show JSON — click to expand and copy
{
"name": "AutoFlow Template - Sales Tracking Automation (Sheets)",
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "new-sale",
"responseMode": "onReceived",
"options": {}
},
"id": "trigger-1",
"name": "New Sale Webhook",
"type": "n8n-nodes-base.webhook",
"typeVersion": 2.1,
"position": [0, 0]
},
{
"parameters": {
"mode": "manual",
"assignments": {
"assignments": [
{ "id": "s1", "name": "date", "value": "={{ $now.toISO() }}", "type": "string" },
{ "id": "s2", "name": "customerName", "value": "={{ $json.body?.customerName ?? $json.customerName ?? '' }}", "type": "string" },
{ "id": "s3", "name": "customerEmail", "value": "={{ $json.body?.customerEmail ?? $json.customerEmail ?? '' }}", "type": "string" },
{ "id": "s4", "name": "product", "value": "={{ $json.body?.product ?? $json.product ?? '' }}", "type": "string" },
{ "id": "s5", "name": "amount", "value": "={{ $json.body?.amount ?? $json.amount ?? 0 }}", "type": "number" },
{ "id": "s6", "name": "source", "value": "={{ $json.body?.source ?? $json.source ?? 'Unknown' }}", "type": "string" }
]
}
},
"id": "set-1",
"name": "Normalize Sale Data",
"type": "n8n-nodes-base.set",
"typeVersion": 3.5,
"position": [250, 0]
},
{
"parameters": {
"resource": "sheet",
"operation": "append",
"documentId": { "__rl": true, "mode": "list", "value": "REPLACE_WITH_YOUR_SHEET_ID" },
"sheetName": { "__rl": true, "mode": "name", "value": "Sales" },
"columns": {
"mappingMode": "defineBelow",
"value": {
"date": "={{ $json.date }}",
"customerName": "={{ $json.customerName }}",
"customerEmail": "={{ $json.customerEmail }}",
"product": "={{ $json.product }}",
"amount": "={{ $json.amount }}",
"source": "={{ $json.source }}"
}
}
},
"id": "sheets-1",
"name": "Log Sale to Sheet",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.7,
"position": [500, 0],
"credentials": {
"googleSheetsOAuth2Api": { "id": "REPLACE_AFTER_IMPORT", "name": "Google Sheets" }
}
},
{
"parameters": {
"conditions": {
"options": { "caseSensitive": true, "leftValue": "", "typeValidation": "strict" },
"conditions": [
{ "leftValue": "={{ $('Normalize Sale Data').item.json.amount }}", "operator": { "type": "number", "operation": "gt" }, "rightValue": 500 }
],
"combinator": "and"
}
},
"id": "if-1",
"name": "High Value Sale?",
"type": "n8n-nodes-base.if",
"typeVersion": 2.3,
"position": [750, 0]
},
{
"parameters": {
"resource": "message",
"operation": "send",
"sendTo": "YOUR_EMAIL@example.com",
"subject": "=High-value sale: {{ $('Normalize Sale Data').item.json.customerName }} - ${{ $('Normalize Sale Data').item.json.amount }}",
"emailType": "text",
"message": "=New high-value sale logged:\n\nCustomer: {{ $('Normalize Sale Data').item.json.customerName }}\nProduct: {{ $('Normalize Sale Data').item.json.product }}\nAmount: ${{ $('Normalize Sale Data').item.json.amount }}"
},
"id": "gmail-1",
"name": "Alert High Value Sale",
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.2,
"position": [1000, 0],
"credentials": {
"gmailOAuth2": { "id": "REPLACE_AFTER_IMPORT", "name": "Gmail" }
}
}
],
"connections": {
"New Sale Webhook": { "main": [[{ "node": "Normalize Sale Data", "type": "main", "index": 0 }]] },
"Normalize Sale Data": { "main": [[{ "node": "Log Sale to Sheet", "type": "main", "index": 0 }]] },
"Log Sale to Sheet": { "main": [[{ "node": "High Value Sale?", "type": "main", "index": 0 }]] },
"High Value Sale?": { "main": [[{ "node": "Alert High Value Sale", "type": "main", "index": 0 }], []] }
},
"active": false,
"settings": { "executionOrder": "v1" }
}
3. Subscription Payment Reminders (Lemon Squeezy)
Receives Lemon Squeezy subscription payment events through a webhook, normalizes the event, routes failed payments to a three-day reminder, and logs failed, recovered, and successful payments in Google Sheets. Full walkthrough: Automating Subscription Payment Reminders with n8n and Lemon Squeezy.
Platform: n8n Difficulty: Intermediate Use case: Subscription payment recovery Credentials: Gmail + Google Sheets
Security: The template below contains no Lemon Squeezy signing secret, Gmail token, or Google credential. Connect your own credentials after import and add webhook signature verification before treating production requests as fully authenticated.
Show JSON — click to expand and copy
{
"name": "AutoFlow Template - Lemon Squeezy Subscription Payment Reminders",
"nodes": [
{
"parameters": {"httpMethod":"POST","path":"lemon-squeezy","responseMode":"onReceived","options":{}},
"id":"lemon-webhook",
"name":"Lemon Squeezy Webhook",
"type":"n8n-nodes-base.webhook",
"typeVersion":2.1,
"position":[0,0],
"webhookId":"REGENERATE_AFTER_IMPORT"
},
{
"parameters": {"mode":"manual","includeOtherFields":false,"assignments":{"assignments":[
{"id":"event","name":"event_name","value":"={{ $json.body?.meta?.event_name || $json.meta?.event_name || '' }}","type":"string"},
{"id":"subscription","name":"subscription_id","value":"={{ $json.body?.data?.id || $json.data?.id || '' }}","type":"string"},
{"id":"email","name":"customer_email","value":"={{ $json.body?.data?.attributes?.user_email || $json.data?.attributes?.user_email || '' }}","type":"string"},
{"id":"name","name":"customer_name","value":"={{ $json.body?.data?.attributes?.user_name || $json.data?.attributes?.user_name || 'Customer' }}","type":"string"},
{"id":"amount","name":"amount_due","value":"={{ (($json.body?.data?.attributes?.total ?? $json.data?.attributes?.total ?? 0) / 100) }}","type":"number"},
{"id":"currency","name":"currency","value":"={{ $json.body?.data?.attributes?.currency || $json.data?.attributes?.currency || '' }}","type":"string"},
{"id":"payment_url","name":"payment_url","value":"={{ $json.body?.data?.attributes?.urls?.update_payment_method || $json.data?.attributes?.urls?.update_payment_method || '' }}","type":"string"}
]}},
"id":"normalize",
"name":"Normalize Lemon Squeezy Event",
"type":"n8n-nodes-base.set",
"typeVersion":3.5,
"position":[224,0]
},
{
"parameters":{"rules":{"values":[
{"outputKey":"payment_failed","conditions":{"options":{"caseSensitive":false,"leftValue":"","typeValidation":"strict"},"conditions":[{"leftValue":"={{ $json.event_name }}","rightValue":"subscription_payment_failed","operator":{"type":"string","operation":"equals"}}],"combinator":"and"}},
{"outputKey":"payment_recovered","conditions":{"options":{"caseSensitive":false,"leftValue":"","typeValidation":"strict"},"conditions":[{"leftValue":"={{ $json.event_name }}","rightValue":"subscription_payment_recovered","operator":{"type":"string","operation":"equals"}}],"combinator":"and"}},
{"outputKey":"payment_success","conditions":{"options":{"caseSensitive":false,"leftValue":"","typeValidation":"strict"},"conditions":[{"leftValue":"={{ $json.event_name }}","rightValue":"subscription_payment_success","operator":{"type":"string","operation":"equals"}}],"combinator":"and"}}
]},"options":{"fallbackOutput":"none","allMatchingOutputs":false,"ignoreCase":true,"looseTypeValidation":true}},
"id":"router",
"name":"Route Lemon Squeezy Event",
"type":"n8n-nodes-base.switch",
"typeVersion":3.4,
"position":[448,0]
},
{
"parameters":{"resume":"timeInterval","amount":3,"unit":"days"},
"id":"wait-3-days",
"name":"Wait 3 Days",
"type":"n8n-nodes-base.wait",
"typeVersion":1.1,
"position":[672,0]
},
{
"parameters":{"resource":"message","operation":"send","authentication":"oAuth2","sendTo":"={{ $('Normalize Lemon Squeezy Event').item.json.customer_email }}","subject":"=Payment reminder — subscription {{ $('Normalize Lemon Squeezy Event').item.json.subscription_id }}","emailType":"text","message":"=Hi {{ $('Normalize Lemon Squeezy Event').item.json.customer_name }},\\n\\nWe could not complete your recent subscription payment.\\n\\nAmount: {{ $('Normalize Lemon Squeezy Event').item.json.amount_due }} {{ $('Normalize Lemon Squeezy Event').item.json.currency }}\\n\\nPlease update your payment method to keep your subscription active: {{ $('Normalize Lemon Squeezy Event').item.json.payment_url }}","options":{"appendAttribution":false}},
"id":"send-reminder",
"name":"Send Payment Reminder",
"type":"n8n-nodes-base.gmail",
"typeVersion":2.2,
"position":[1120,0],
"credentials":{"gmailOAuth2":{"id":"REPLACE_AFTER_IMPORT","name":"Gmail account"}}
},
{
"parameters":{"resource":"sheet","operation":"append","authentication":"oAuth2","documentId":{"__rl":true,"mode":"id","value":"REPLACE_WITH_YOUR_GOOGLE_SHEET_ID"},"sheetName":{"__rl":true,"mode":"name","value":"Invoice Reminders"},"columns":{"mappingMode":"defineBelow","value":{"invoice_id":"={{ $('Normalize Lemon Squeezy Event').item.json.subscription_id }}","customer_email":"={{ $('Normalize Lemon Squeezy Event').item.json.customer_email }}","amount_due":"={{ $('Normalize Lemon Squeezy Event').item.json.amount_due }}","currency":"={{ $('Normalize Lemon Squeezy Event').item.json.currency }}","reminder_stage":"3_days","sent_at":"={{ $now.toISO() }}"}}},
"id":"log-reminder",
"name":"Log Reminder",
"type":"n8n-nodes-base.googleSheets",
"typeVersion":4.7,
"position":[1344,0],
"credentials":{"googleSheetsOAuth2Api":{"id":"REPLACE_AFTER_IMPORT","name":"Google Sheets account"}}
},
{
"parameters":{"resource":"sheet","operation":"append","authentication":"oAuth2","documentId":{"__rl":true,"mode":"id","value":"REPLACE_WITH_YOUR_GOOGLE_SHEET_ID"},"sheetName":{"__rl":true,"mode":"name","value":"Invoice Reminders"},"columns":{"mappingMode":"defineBelow","value":{"invoice_id":"={{ $json.subscription_id }}","customer_email":"={{ $json.customer_email }}","amount_due":"={{ $json.amount_due }}","currency":"={{ $json.currency }}","reminder_stage":"subscription_payment_recovered","sent_at":"={{ $now.toISO() }}"}}},
"id":"log-recovery",
"name":"Log Recovery",
"type":"n8n-nodes-base.googleSheets",
"typeVersion":4.7,
"position":[896,260],
"credentials":{"googleSheetsOAuth2Api":{"id":"REPLACE_AFTER_IMPORT","name":"Google Sheets account"}}
},
{
"parameters":{"resource":"sheet","operation":"append","authentication":"oAuth2","documentId":{"__rl":true,"mode":"id","value":"REPLACE_WITH_YOUR_GOOGLE_SHEET_ID"},"sheetName":{"__rl":true,"mode":"name","value":"Invoice Reminders"},"columns":{"mappingMode":"defineBelow","value":{"invoice_id":"={{ $json.subscription_id }}","customer_email":"={{ $json.customer_email }}","amount_due":"={{ $json.amount_due }}","currency":"={{ $json.currency }}","reminder_stage":"subscription_payment_success","sent_at":"={{ $now.toISO() }}"}}},
"id":"log-success",
"name":"Log Payment Success",
"type":"n8n-nodes-base.googleSheets",
"typeVersion":4.7,
"position":[896,520],
"credentials":{"googleSheetsOAuth2Api":{"id":"REPLACE_AFTER_IMPORT","name":"Google Sheets account"}}
}
],
"connections":{
"Lemon Squeezy Webhook":{"main":[[{"node":"Normalize Lemon Squeezy Event","type":"main","index":0}]]},
"Normalize Lemon Squeezy Event":{"main":[[{"node":"Route Lemon Squeezy Event","type":"main","index":0}]]},
"Route Lemon Squeezy Event":{"main":[[{"node":"Wait 3 Days","type":"main","index":0}],[{"node":"Log Recovery","type":"main","index":0}],[{"node":"Log Payment Success","type":"main","index":0}]]},
"Wait 3 Days":{"main":[[{"node":"Send Payment Reminder","type":"main","index":0}]]},
"Send Payment Reminder":{"main":[[{"node":"Log Reminder","type":"main","index":0}]]}
},
"active":false,
"settings":{"executionOrder":"v1"}
}
What You Need to Configure
- Connect your Gmail and Google Sheets credentials in n8n.
- Set your Google Sheets document ID and keep the Invoice Reminders sheet available.
- Create the Lemon Squeezy webhook and select the subscription payment events used by your account.
- Add Lemon Squeezy webhook signature verification before production use.
Test Instructions
Import the template, connect credentials, send a test webhook payload for a supported event, and confirm the router sends failed payments to the three-day wait path while recovered and successful events go directly to their logging paths. Verify the resulting Google Sheets rows before activating production traffic.
Import & Customize
Import the JSON into n8n, reconnect your credentials, set your Google Sheet, review the email content and event names, then test with your own Lemon Squeezy payloads. Keep the workflow inactive until the production checks are complete.
Read the full Lemon Squeezy workflow guide → · Browse all automation workflows →
4. AI Content Generator & WordPress Publisher
Turns a topic or keyword into a structured English article draft, generates SEO metadata, and returns content ready for review before WordPress publishing. Requires a Gemini API key.
Platform: n8n + Gemini Difficulty: Intermediate Use case: Content publishing Credentials: Gemini API
Show JSON — click to expand and copy
{"name":"AutoFlow Template - AI Content Generator & WordPress Publisher","nodes":[{"parameters":{"httpMethod":"POST","path":"ai-content","responseMode":"lastNode","options":{}},"id":"content-webhook","name":"Content Brief Webhook","type":"n8n-nodes-base.webhook","typeVersion":2.1,"position":[0,0]},{"parameters":{"assignments":{"assignments":[{"id":"topic","name":"topic","value":"={{ $json.body?.topic ?? $json.topic ?? '' }}","type":"string"},{"id":"audience","name":"audience","value":"={{ $json.body?.audience ?? $json.audience ?? 'small business owners' }}","type":"string"},{"id":"keywords","name":"keywords","value":"={{ $json.body?.keywords ?? $json.keywords ?? '' }}","type":"string"}]},"options":{}},"id":"content-normalize","name":"Normalize Brief","type":"n8n-nodes-base.set","typeVersion":3.4,"position":[240,0]},{"parameters":{"method":"POST","url":"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=REPLACE_WITH_GEMINI_API_KEY","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"raw","rawContentType":"application/json","body":"={{ JSON.stringify({contents:[{parts:[{text:'Create a publication-ready English article. Return JSON only with title, excerpt, slug, meta_description, and html. Topic: '+$json.topic+'. Audience: '+$json.audience+'. Keywords: '+$json.keywords+'.'}]}]}) }}"},"id":"content-ai","name":"Generate Article with Gemini","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[500,0]},{"parameters":{"jsCode":"const raw=$json.candidates?.[0]?.content?.parts?.[0]?.text ?? ''; let data; try{data=JSON.parse(raw.trim())}catch(e){data={title:'AI Draft',excerpt:'Review before publishing.',slug:'ai-draft',meta_description:'',html:raw}} return [{json:{...data,review_required:true}}];"},"id":"content-parse","name":"Prepare Review Draft","type":"n8n-nodes-base.code","typeVersion":2,"position":[760,0]},{"parameters":{"respondWith":"json","responseBody":"={{ $json }}","options":{}},"id":"content-response","name":"Return Draft for Review","type":"n8n-nodes-base.respondToWebhook","typeVersion":1.4,"position":[1010,0]}],"connections":{"Content Brief Webhook":{"main":[[{"node":"Normalize Brief","type":"main","index":0}]]},"Normalize Brief":{"main":[[{"node":"Generate Article with Gemini","type":"main","index":0}]]},"Generate Article with Gemini":{"main":[[{"node":"Prepare Review Draft","type":"main","index":0}]]},"Prepare Review Draft":{"main":[[{"node":"Return Draft for Review","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"}}
Setup: Replace the Gemini API placeholder, import the workflow, send topic, audience, and optional keywords, then review the returned draft.
5. AI Lead Capture & Qualification
Receives a lead from a form or webhook, asks Gemini to classify it as Hot, Warm, or Cold, and returns a structured lead record with a reason and next action. The result can then be sent to Google Sheets, a CRM, or notifications.
Platform: n8n + Gemini Difficulty: Intermediate Use case: Lead qualification Credentials: Gemini API
Show JSON — click to expand and copy
{"name":"AutoFlow Template - AI Lead Capture & Qualification","nodes":[{"parameters":{"httpMethod":"POST","path":"lead-qualification","responseMode":"lastNode","options":{}},"id":"lead-webhook","name":"New Lead Webhook","type":"n8n-nodes-base.webhook","typeVersion":2.1,"position":[0,0]},{"parameters":{"assignments":{"assignments":[{"id":"name","name":"name","value":"={{ $json.body?.name ?? $json.name ?? '' }}","type":"string"},{"id":"email","name":"email","value":"={{ $json.body?.email ?? $json.email ?? '' }}","type":"string"},{"id":"company","name":"company","value":"={{ $json.body?.company ?? $json.company ?? '' }}","type":"string"},{"id":"message","name":"message","value":"={{ $json.body?.message ?? $json.message ?? '' }}","type":"string"}]},"options":{}},"id":"lead-normalize","name":"Normalize Lead Data","type":"n8n-nodes-base.set","typeVersion":3.4,"position":[240,0]},{"parameters":{"method":"POST","url":"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=REPLACE_WITH_GEMINI_API_KEY","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"raw","rawContentType":"application/json","body":"={{ JSON.stringify({contents:[{parts:[{text:'Qualify this business lead. Return JSON only with one of these labels: Hot, Warm, Cold. Include score from 0-100, reason, and next_action. Lead: '+JSON.stringify($json)}]}]}) }}"},"id":"lead-ai","name":"Qualify Lead with Gemini","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[500,0]},{"parameters":{"jsCode":"const raw=$json.candidates?.[0]?.content?.parts?.[0]?.text ?? ''; let q; try{q=JSON.parse(raw.trim())}catch(e){q={classification:'Warm',score:50,reason:raw,next_action:'Review manually'}} return [{json:{lead:$('Normalize Lead Data').item.json,...q,qualified_at:new Date().toISOString()}}];"},"id":"lead-parse","name":"Create Lead Record","type":"n8n-nodes-base.code","typeVersion":2,"position":[760,0]},{"parameters":{"respondWith":"json","responseBody":"={{ $json }}","options":{}},"id":"lead-response","name":"Return Qualified Lead","type":"n8n-nodes-base.respondToWebhook","typeVersion":1.4,"position":[1010,0]}],"connections":{"New Lead Webhook":{"main":[[{"node":"Normalize Lead Data","type":"main","index":0}]]},"Normalize Lead Data":{"main":[[{"node":"Qualify Lead with Gemini","type":"main","index":0}]]},"Qualify Lead with Gemini":{"main":[[{"node":"Create Lead Record","type":"main","index":0}]]},"Create Lead Record":{"main":[[{"node":"Return Qualified Lead","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"}}
Setup: Replace the Gemini API placeholder, connect the webhook to your lead form, then add a Google Sheets or CRM node after Create Lead Record if you want persistent storage.
6. AI Competitor & Website Change Monitor
Checks a target webpage on a schedule, compares the latest content with the previous snapshot, and uses Gemini to summarize meaningful changes. Adapt it for competitor pricing pages, product pages, documentation, or important website sections.
Platform: n8n + Gemini Difficulty: Advanced Use case: Website monitoring Credentials: Gemini API
Show JSON — click to expand and copy
{"name":"AutoFlow Template - AI Competitor & Website Change Monitor","nodes":[{"parameters":{"rule":{"interval":[{"field":"hours","hoursInterval":6}]}},"id":"monitor-trigger","name":"Check Every 6 Hours","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[0,0]},{"parameters":{"assignments":{"assignments":[{"id":"url","name":"url","value":"https://example.com/","type":"string"}]},"options":{}},"id":"monitor-config","name":"Target Page","type":"n8n-nodes-base.set","typeVersion":3.4,"position":[220,0]},{"parameters":{"method":"GET","url":"={{ $json.url }}","options":{"response":{"response":{"responseFormat":"text"}}}},"id":"monitor-fetch","name":"Fetch Webpage","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[460,0]},{"parameters":{"jsCode":"const crypto=require('crypto'); const html=String($json.data ?? $json.body ?? $json); const normalized=html.replace(/\\s+/g,' ').trim(); const hash=crypto.createHash('sha256').update(normalized).digest('hex'); const store=$getWorkflowStaticData('global'); const previous=store.lastHash ?? ''; const changed=Boolean(previous && previous!==hash); store.lastHash=hash; store.lastCheckedAt=new Date().toISOString(); return [{json:{url:$('Target Page').item.json.url,hash,previousHash:previous,changed,content:normalized.slice(0,12000)}}];"},"id":"monitor-compare","name":"Compare With Previous Snapshot","type":"n8n-nodes-base.code","typeVersion":2,"position":[700,0]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"typeValidation":"strict","version":2},"conditions":[{"leftValue":"={{ $json.changed }}","rightValue":true,"operator":{"type":"boolean","operation":"true"}}],"combinator":"and"}},"id":"monitor-if","name":"Change Detected?","type":"n8n-nodes-base.if","typeVersion":2.2,"position":[940,0]},{"parameters":{"method":"POST","url":"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=REPLACE_WITH_GEMINI_API_KEY","sendHeaders":true,"headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"}]},"sendBody":true,"contentType":"raw","rawContentType":"application/json","body":"={{ JSON.stringify({contents:[{parts:[{text:'Summarize the important changes on this webpage. Return JSON only with changed_sections, summary, impact, and suggested_action. URL: '+$json.url+'. Previous hash: '+$json.previousHash+'. Current content excerpt: '+$json.content}]}]}) }}"},"id":"monitor-ai","name":"Analyze Changes with Gemini","type":"n8n-nodes-base.httpRequest","typeVersion":4.2,"position":[1180,0]},{"parameters":{"respondWith":"json","responseBody":"={{ $json }}","options":{}},"id":"monitor-response","name":"Return Change Report","type":"n8n-nodes-base.respondToWebhook","typeVersion":1.4,"position":[1420,0]}],"connections":{"Check Every 6 Hours":{"main":[[{"node":"Target Page","type":"main","index":0}]]},"Target Page":{"main":[[{"node":"Fetch Webpage","type":"main","index":0}]]},"Fetch Webpage":{"main":[[{"node":"Compare With Previous Snapshot","type":"main","index":0}]]},"Compare With Previous Snapshot":{"main":[[{"node":"Change Detected?","type":"main","index":0}]]},"Change Detected?":{"main":[[{"node":"Analyze Changes with Gemini","type":"main","index":0}],[]]},"Analyze Changes with Gemini":{"main":[[{"node":"Return Change Report","type":"main","index":0}]]}},"active":false,"settings":{"executionOrder":"v1"}}
Setup: Set the target URL, replace the Gemini API placeholder, import the workflow, and add your preferred notification node after Analyze Changes with Gemini. The first run stores a baseline; later runs can report detected changes.
Important: Keep the workflow inactive until you review the target URL, API limits, and notification destination.
Keep building
Need the next step?
Browse the full automation hub, try the System Prompt Generator, or explore the published workflow guides.
Browse Tools & Automations → Prompt Generator → Workflow Builder → Cost Estimator →
Automation Tools
Plan a workflow with AI Workflow Builder and estimate its usage and cost with AI Automation Cost Estimator.
Free AI Tools
Plan the workflow before you build it.
Use the four-step AutoFlow path: assess the process, build the workflow, estimate cost, then generate the system prompt.
