by Khairul Muhtadin
This workflow scrapes Google Maps via Decodo API, analyzes each business using Google Gemini 2.5 Flash, scores lead quality, and generates ready to send outreach emails. Why Use This Workflow? Time Savings:** Reduces manual lead research from 20 minutes per lead to 30 seconds processing 100 leads in under an hour Cost Reduction:** Eliminates $300-500/month spent on lead databases and enrichment tools like Apollo or ZoomInfo Scalability:** Process 500+ leads daily without additional staff or subscription costs Ideal For Sales Teams & BDRs:** Building targeted prospect lists for local businesses (restaurants, retail, service providers) with verified contact data and personalized outreach hooks Digital Marketing Agencies:** Identifying high-value clients in specific niches (e.g., "restaurants without websites in Chicago") and automating first-touch campaigns B2B SaaS Companies:** Finding businesses matching ideal customer profiles based on ratings, reviews, and digital maturity indicators Local Service Providers:** Generating qualified leads for web design, SEO, POS systems, or booking software tailored to underserved markets How It Works Trigger: Manually start the workflow or schedule it to run on specific intervals (e.g., daily/weekly) Data Collection: Scrapes Google Maps search results using Decodo API based on your query (e.g., "coffee shops in Austin"), country, and language settings Processing: Parses raw HTML responses into structured lead objects with business name, address, phone, website, ratings, reviews, and coordinates Intelligence Layer: Google Gemini 2.5 Flash analyzes each lead to generate value propositions, identify pain points, create outreach hooks, and assign a 1-10 quality score Output & Delivery: Filters leads scoring ≥7, generates personalized email templates, and saves all data to Google Sheets with enrichment timestamps Storage & Logging: Maintains complete lead database with outreach status tracking; error handler sends Telegram notifications for failed executions Setup Guide Prerequisites | Requirement | Type | Purpose | |-------------|------|---------| | n8n instance | Essential | Workflow execution platform | | Decodo Scraper API | Essential | Google Maps data extraction (get key at dashboard.decodo.com) | | Google Gemini API | Essential | AI-powered lead analysis and scoring | | Google Sheets | Essential | Lead database and outreach tracking | | Telegram Bot (optional) | Optional | Real-time error notifications | Installation Steps Import the JSON file to your n8n instance Configure credentials: Decodo API: Create HTTP Header Auth credential with header name Authorization and value Basic [YOUR_API_KEY] get from Decodo dashboard Google Gemini API: Add your Google AI API key in the "2.5 Flash" node credentials Google Sheets OAuth2: Authenticate with your Google account (both "Save to Google Sheets" and "Save Outreach To Sheets" nodes) Telegram (optional): Add bot token and replace YOUR-CHAT-ID in "Send Error Notification" node Update environment-specific values: In "Set Search Parameters" node: Update searchQuery (e.g., "Italian restaurants in Miami"), country, targetLanguage, and resultsLimit In both Google Sheets nodes: Select your destination spreadsheet and sheet name Customize settings: Adjust lead score threshold in "Filter Hot Leads" (default: ≥7) Modify AI prompt in "Lead Enrichment" node to match your value proposition Customize outreach email template in "Prepare Outreach Message" node Test execution: Start with resultsLimit: 5 to verify all connections work Check Google Sheets for properly formatted data Verify AI enrichment produces actionable insights Technical Details Core Nodes | Node | Purpose | Key Configuration | |------|---------|-------------------| | Decodo Maps Scraper | Fetches Google Maps listings via API | Set target: google_maps, adjust page_to based on resultsLimit | | Parse & Normalize Data | Extracts business data from HTML | Custom JavaScript handles multiple response formats | | Lead Enrichment (AI Chain) | Analyzes leads with Gemini 2.5 Flash | Structured output parser ensures JSON compliance | | Filter Hot Leads | Isolates high-quality prospects | Combines lead score ≥7 + contact info validation | | Save to Google Sheets | Stores all enriched leads | Uses appendOrUpdate with id as matching column | | Save Outreach To Sheets | Updates hot leads with messages | Marks leads as "HOT" category for prioritization | Customization Options Basic Adjustments Search Parameters:** Modify searchQuery, country, targetLanguage in "Set Search Parameters" to target different markets (supports all Google Maps locales) Lead Scoring Threshold:** Change filter condition from ≥7 to ≥6 for broader lead pool or ≥8 for ultra-qualified prospects Batch Size:** Adjust "Split Into Batches" to process 10-50 items per cycle (lower = more reliable, higher = faster execution) Advanced Enhancements Email Automation:** Connect "Prepare Outreach Message" to Gmail/SendGrid nodes for automatic campaign sends (medium complexity) CRM Integration:** Add HubSpot/Salesforce nodes after enrichment to sync leads directly (requires CRM API credentials) Multi-Channel Outreach:** Branch hot leads to LinkedIn automation tools or SMS providers (high complexity, needs additional services) Custom Scoring Models:** Modify AI prompt to prioritize industry-specific signals (e.g., verified badges for healthcare, delivery options for restaurants) Troubleshooting Common Issues | Problem | Cause | Solution | |---------|-------|----------| | "No valid leads extracted" error | Decodo response format changed or empty results | Check Decodo API response in "Parse & Normalize Data" execution logs; verify search query returns results in Google Maps manually | | AI enrichment produces invalid JSON | Gemini output doesn't match schema | Review "Result Parser" schema; add retry logic or simplify AI prompt to reduce complexity | | Google Sheets "matching column not found" | Spreadsheet missing "id" column header | Ensure Sheet1 has headers: id, businessName, category, address, phone, website, rating, reviewCount, valueProposition, painPoints, outreachHook, leadScore, engagementStrategy, googleMapsUrl, scrapedAt, enrichedAt, outreachMessage, status | | Timeout on large batches | Processing 100+ leads exceeds execution limits | Reduce resultsLimit to 25-50; run workflow multiple times with different queries | Use Case Examples Scenario 1: Digital Marketing Agency Prospecting Challenge: Agency needs 200 qualified restaurant leads monthly for web design services, spending 40 hours on manual research Solution: Configure workflow with query "restaurants in [city]" filtered by ratings ≥4.0 and missing professional websites (AI scoring detects this) Result: Generated 312 leads in 8 hours across 3 cities; 89 scored ≥8 (hot prospects); closed 14 clients in first month at $2,500 average contract value Scenario 2: SaaS Company Market Entry Challenge: Booking software startup targeting salons/spas in new geographic market with zero existing contacts Solution: Ran workflow with "beauty salons in Denver" + "day spas in Denver"; AI identified pain points like "manual appointment booking" and "no online presence" Result: 156 leads enriched in 2 days; personalized outreach hooks increased demo booking rate from 2% (cold template) to 11%; secured 8 pilot customers in 3 weeks Scenario 3: Local Service Provider Lead Generation Challenge: POS system reseller needs to identify retail stores still using cash registers, wasting days driving to scout locations Solution: Configured workflow for "retail stores in [neighborhood]" with AI analyzing reviews for mentions of "cash only" or payment friction Result: Identified 47 high-probability prospects in 90 minutes; field sales team prioritized top 15 leads (score ≥9), closed 6 deals worth $32K total revenue Credits & Links Created by: Khaisa Studio Category: Sales & CRM | Tags: lead-generation, google-maps, ai-enrichment, sales-automation, prospecting Need custom workflows? Contact us Connect with the creator: Portfolio • Workflows • LinkedIn • Medium • Threads
by Jitesh Dugar
Jotform Lead Qualification & Distribution System Transform lead chaos into systematic qualification and instant routing - achieving 5-minute response times, 300% conversion increase, and eliminating sales team conflicts through AI-powered BANT scoring and intelligent territory assignment. What This Workflow Does Revolutionizes lead management with AI-driven qualification and automated distribution to the right sales rep: 📝 Intelligent Lead Capture - Jotform collects complete lead profile including budget, timeline, and pain points 🤖 AI BANT Scoring - GPT-4 evaluates leads across Budget, Authority, Need, Timeline (0-100 score) 🎯 Smart Routing - Automatically assigns leads based on score, territory, industry expertise, and workload 💼 Instant CRM Creation - Creates detailed contact records in HubSpot/Salesforce with full context 📧 Dual Notifications - Sales rep gets detailed brief, lead receives professional confirmation 📊 Complete Tracking - Google Sheets logging enables performance analysis and conversion metrics 🔥 Priority Tiering - Hot leads (75+) go to senior reps, warm to mid-level, cold to SDRs 💡 Pre-Written Talking Points - AI provides conversation starters based on lead pain points 🚀 Zero Manual Work - End-to-end automation from form submission to first contact Key Features AI Lead Qualification Engine: GPT-4 analyzes every lead using BANT framework with 25-point scoring per category (Budget, Authority, Need, Timeline) Intelligent Territory Routing: Matches leads to sales reps based on geography, industry expertise, deal size capacity, and current workload Real-Time CRM Integration: Creates fully populated contact records in HubSpot, Salesforce, or Pipedrive with AI insights Instant Rep Notifications: Beautiful HTML emails with complete lead profile, BANT breakdown, talking points, and recommended next steps Lead Confirmation Emails: Professional auto-responses set expectations and introduce assigned account executive Conversion Probability Scoring: AI estimates likelihood of close based on BANT signals and pain severity Deal Value Estimation: Automatically calculates potential deal size based on company size and budget range Red Flag Detection: AI identifies concerns (budget constraints, wrong decision-maker, competitor lock-in) Competitor Vulnerability Assessment: Evaluates how easily lead can switch from current solution Opportunity Size Classification: Tags leads as Small/Medium/Large/Enterprise for proper resource allocation 24-Hour SLA Monitoring: Hourly checks identify uncontacted leads and escalate to sales management Complete Audit Trail: Every lead logged to Google Sheets with timestamps, scores, and assignments for analytics Perfect For B2B SaaS Companies: Fast-growing software companies with high lead volume (100+ leads/month) Technology Services: IT consulting, MSPs, and technology solution providers Enterprise Sales Teams: Organizations with complex products requiring senior rep expertise Professional Services: Law firms, accounting firms, consulting practices with territory-based teams Manufacturing: Industrial equipment sales with industry-specific expertise requirements Healthcare Tech: Medical software and equipment sales with compliance considerations Financial Services: Wealth management, insurance, and fintech with regulatory requirements Marketing Agencies: Digital marketing and advertising agencies qualifying client prospects What You'll Need Required Integrations Jotform - Lead capture form (free tier works) Create your form for free on Jotform using this link OpenAI API - GPT-4 for AI BANT scoring (~$0.20-0.40 per lead) Gmail - Automated notifications to sales reps and leads Google Sheets - Lead tracking database and analytics CRM System - HubSpot, Salesforce, or Pipedrive (via API) Optional Integrations Slack - Real-time lead notifications to sales channel Calendar Integration - Auto-schedule follow-up calls Quick Start Import Template - Copy JSON and import into n8n Add OpenAI Credentials - Set up OpenAI API key (GPT-4 required for best BANT analysis) Create Jotform Lead Capture Form: Company Name (q3_companyName) Contact Name (q4_contactName) Email (q5_email) Phone (q6_phone) Company Size (q7_companySize) - dropdown: 1-10, 11-50, 51-200, 201-500, 500+ Budget Range (q8_budgetRange) - dropdown: <$10K, $10K-$25K, $25K-$50K, $50K-$100K, $100K+ Timeline (q9_timeline) - dropdown: Immediate, 1-3 months, 3-6 months, 6+ months Industry (q10_industry) - dropdown or text Current Solution (q11_currentSolution) - text area Pain Points (q12_painPoints) - text area Configure Gmail - Add Gmail OAuth2 credentials (same for all Gmail nodes) Setup Sales Team Routing: Edit "Intelligent Routing Logic" node Update salesTeam object with your actual sales reps Configure territories, industries, and deal size thresholds Configure CRM Integration: Choose your CRM (HubSpot shown, easily adapted for Salesforce/Pipedrive) Add CRM API credentials Map custom fields as needed Setup Google Sheets: Create spreadsheet with "Lead_Tracking" sheet Replace YOUR_GOOGLE_SHEET_ID in workflow (3 places) Columns auto-populate on first submission Customize Email Templates: Update company name, phone, website URLs Adjust branding colors if desired Set Up Escalation: Update sales manager email in escalation node Adjust 24-hour SLA threshold if needed Test Workflow - Submit test lead through Jotform Go Live - Embed form on website, share link, add to email signatures Customization Options Lead Scoring Thresholds: Adjust what constitutes Hot (75+), Warm (50-74), Cold (25-49) Territory Configuration: Add/modify territories, states, countries for rep assignment Industry Expertise: Define which reps specialize in which industries Multi-Level Routing: Add VP or director assignment for enterprise deals Custom BANT Weights: Adjust importance of Budget vs Authority vs Need vs Timeline Qualification Disqualification: Auto-reject leads below minimum score Round-Robin vs Workload: Choose between even distribution or capacity-based assignment Integration Flexibility: Swap HubSpot for Salesforce, Pipedrive, Zoho, or custom CRM Follow-Up Sequences: Add automated email nurture campaigns for different tiers Calendar Booking: Include Calendly/Chili Piper links for instant meeting scheduling Lead Source Tracking: Add UTM parameters and campaign tracking Industry-Specific Qualifying: Custom questions and scoring for different verticals Multi-Touch Attribution: Track which marketing channels produce best leads Competitor Intelligence: Add fields to track which competitor they're considering Expected Results 5-minute response time - From form submission to rep contact (vs 48+ hours manual) 300% conversion increase - Faster response + better qualification = 3x more deals Zero lead conflicts - Automated assignment eliminates sales team arguments 95% SLA compliance - 24-hour escalation ensures no leads fall through cracks 40% time savings - Reps spend time selling, not qualifying or cherry-picking leads 85% accurate routing - AI + territory logic assigns to optimal rep first time 60% reduction in unqualified meetings - BANT scoring filters out poor-fit prospects 100% lead visibility - Complete tracking from inquiry to close in Google Sheets 50% manager time savings - Automated monitoring vs manual lead assignment 2x rep productivity - Only work high-quality, properly matched leads Use Cases SaaS Company (Series B, 50 Sales Reps) Scenario: Lead submits form requesting project management software for 200-person engineering team. Budget: $50K-$100K annually. Timeline: 1-3 months. Current solution: Jira. Pain: Poor cross-team visibility. AI BANT Analysis: Budget: 23/25 (has budget, validated by company size) Authority: 22/25 (VP Engineering, decision-maker) Need: 24/25 (critical pain, expanding team needs better tools) Timeline: 20/25 (moderate urgency, current fiscal quarter) Total Score: 89/100 - HOT LEAD** Automated Response: 9:14 AM: Form submitted 9:14 AM: CRM contact created with full profile 9:15 AM: Sarah Johnson (Senior AE, specializes in Tech/Engineering tools) receives detailed notification 9:15 AM: Lead receives confirmation email introducing Sarah 9:17 AM: Sarah calls lead (3-minute response time) 9:45 AM: Discovery meeting scheduled for tomorrow 10:30 AM: Sarah updates CRM status to "Qualified Opportunity" Result: Lead converts to $85K annual contract. 3-minute response time impressed prospect (competitor took 2 days). Total sales cycle: 18 days vs 45-day average. Professional Services Firm (8 Consultants) Scenario: Small business owner (25 employees) inquires about IT consulting. Budget: <$10K. Timeline: 6+ months. Current solution: "We handle it ourselves." Pain: "Sometimes things break." AI BANT Analysis: Budget: 8/25 (insufficient budget for typical engagement) Authority: 18/25 (owner, but budget-constrained) Need: 12/25 (low pain severity, reactive not proactive) Timeline: 5/25 (no urgency, exploratory inquiry) Total Score: 43/100 - COLD LEAD** Red Flags**: Below minimum deal size, no immediate pain, DIY mentality Automated Response: Assigned to Emily Brown (SDR) for nurture track Lead receives confirmation with educational resources Emily sends follow-up email with free IT assessment offer Lead added to quarterly newsletter nurture campaign No immediate sales rep time wasted on low-probability lead Result: 6 months later, business experiences server crash. Remembers firm from newsletter. Submits new request with "Immediate" timeline and $25K budget. This time routes to senior consultant, converts to $40K managed services contract. Enterprise Software (Global Sales Team) Scenario: Fortune 500 procurement manager submits RFP for enterprise data platform. Budget: $500K+. Timeline: Immediate (Q1 deadline). 5,000 employees. Industry: Healthcare. Current: Legacy Oracle system. AI BANT Analysis: Budget: 25/25 (enterprise budget, board-approved) Authority: 20/25 (procurement, but mentions C-suite sponsorship) Need: 25/25 (critical: compliance requirements, legacy system EOL) Timeline: 25/25 (urgent: Q1 deadline 8 weeks away) Total Score: 95/100 - ENTERPRISE HOT LEAD** Key Insight**: Competitor vulnerability HIGH (legacy system, compliance pressure) Automated Response: Assigned to Michael Chen (Senior AE, Healthcare + Enterprise specialist) Sales VP automatically CC'd on notification (deal size >$250K) CRM tags: "Enterprise", "Healthcare", "RFP", "Q1 Deadline" Michael's calendar checked, existing demo moved to prioritize this lead Michael calls within 8 minutes (prospect answered, impressed) Enterprise demo scheduled for next day with solutions engineer Legal and compliance teams looped in proactively Result: Won $650K 3-year contract. 8-minute response time + pre-qualified insights helped beat 4 competitors. Sales cycle: 6 weeks (vs 6-month average for enterprise deals). Manufacturing Sales (Regional Reps) Scenario: Plant manager in Texas requests quote for industrial equipment. Company size: 200 employees. Budget: $25K-$50K. Timeline: 3-6 months. Industry: Automotive. Current: 10-year-old machinery, frequent breakdowns. AI BANT Analysis: Budget: 20/25 (has capital budget, needs approval) Authority: 19/25 (plant manager, recommends to CFO) Need: 22/25 (high: downtime costs, efficiency losses) Timeline: 18/25 (planned capital purchase, budget cycle timing) Total Score: 79/100 - HOT LEAD** Talking Points**: Focus on ROI from reduced downtime, payback period Automated Response: Territory-based routing assigns to Jessica Martinez (Southwest US, Manufacturing) Email highlights equipment efficiency ROI calculator Lead receives PDF product catalog automatically Jessica calls within 12 minutes, schedules site visit for next week Technical specialist added to meeting invite automatically Result: $42K equipment sale + $8K annual maintenance contract. Jessica's quick response and ROI-focused approach (from AI talking points) won deal over competitor who took 3 days to respond. Marketing Agency (Qualifying Client Fit) Scenario: E-commerce startup (2 employees) requests full-service digital marketing. Budget: <$10K monthly. Timeline: Immediate. Current: Doing it themselves. Pain: "Need more customers." AI BANT Analysis: Budget: 12/25 (below agency minimum of $15K monthly) Authority: 22/25 (founder, decision-maker) Need: 18/25 (need is real, but unrealistic expectations) Timeline: 20/25 (urgent, but may not understand scope) Total Score: 72/100 - WARM LEAD** Red Flags**: Budget too low, unrealistic expectations, startup risk Automated Response: Assigned to David Williams (Mid-Level AE) AI recommends: "Qualify budget realism, educate on agency pricing" David calls, explains pricing, suggests DIY consulting option ($5K) Lead appreciates transparency, opts for consulting package now Agreed to revisit full-service when reaches $100K MRR Result: $5K consulting engagement (profitable given rep level). Client reaches $100K MRR 8 months later, upgrades to $20K monthly retainer. Honesty during qualification built trust and long-term relationship. Pro Tips Response Time is King: Every minute delayed reduces conversion by 10%. Use mobile notifications for reps. BANT Customization: Adjust scoring weights based on your sales cycle. Enterprise may weight Authority higher, transactional sales may weight Timeline higher. Territory Conflicts: Use round-robin within territories to prevent cherry-picking. Track conversion rates by rep. Lead Source Attribution: Add hidden fields to Jotform to track UTM parameters and campaign sources. Continuous Improvement: Monthly review of Google Sheets data to refine AI scoring thresholds. Rep Accountability: Use 24-hour escalation data to identify training needs or workload issues. Disqualification Criteria: Add automatic rejection for competitors, students, or leads outside serviceable areas. Integration Expansion: Connect to calendar systems (Calendly, Chili Piper) for instant meeting booking. Lead Nurture Tracks: Route cold leads to marketing automation (HubSpot sequences, Mailchimp campaigns). A/B Testing: Try different form fields and AI prompts to optimize qualification accuracy. Mobile Optimization: Ensure Jotform is mobile-friendly for leads submitting from phones. Follow-Up Sequences: Add automated day 2, day 7, day 30 follow-ups for non-responsive leads. Competitive Intelligence: Track which competitors are mentioned most, adjust positioning accordingly. Budget Realism Check: AI can identify when stated budget doesn't match company size/needs. Multi-Product Routing: For companies with multiple product lines, route based on interest. Learning Resources This workflow demonstrates advanced automation: AI Agents for Complex Qualification: Multi-dimensional BANT scoring with natural language understanding Dynamic Routing Algorithms: JavaScript-based logic for territory, expertise, and workload balancing CRM API Integration: Creating fully populated contact records with custom fields Conditional Email Formatting: HTML templates with dynamic content based on lead tier Scheduled Monitoring: Cron-based checking for SLA compliance and escalation Data Aggregation: Complete lead pipeline tracking for business intelligence Code Node Efficiency: Custom JavaScript for complex routing logic beyond visual nodes Multi-Output Branching: Parallel execution for CRM, notifications, and tracking Error Handling: Graceful failure modes for API timeouts or missing data Performance Optimization: Minimizing API calls while maximizing data capture Business Impact Metrics Lead Response Time: Track average time from submission to first contact (target: <5 minutes) Conversion Rate by Tier: Compare close rates for Hot vs Warm vs Cold leads to validate scoring Rep Performance: Measure conversion rates by sales rep to identify training needs or star performers Lead Source ROI: Calculate which marketing channels produce highest-scoring leads SLA Compliance: Track % of leads contacted within 24 hours (target: >95%) Revenue Per Lead: Compare deal sizes for AI-qualified leads vs manual qualification Time to Close: Measure if faster response and better qualification shortens sales cycles Assignment Accuracy: Track how often leads need re-assignment (target: <10%) Manager Escalations: Monitor frequency of 24-hour SLA breaches by rep Cost Per Lead Processed: Calculate ROI of automation vs manual lead distribution Ready to Transform Your Lead Management? Import this template and turn lead chaos into systematic qualification and instant routing with AI-powered BANT scoring! 🎯✨ Questions or customization? The workflow includes detailed sticky notes explaining each component's logic and decision criteria. Template Compatibility ✅ n8n version 1.0+ ✅ Works with n8n Cloud and Self-Hosted ✅ Fully customizable routing logic ✅ Integrates with any CRM via API
by Adam Goodyer
Shorts Creation v10 (Telegram Filming) — n8n Template Description How it works This workflow is a fully automated YouTube Shorts production pipeline. It takes the structured output from a video digestion workflow (transcript, key moments, metadata) and produces finished, rendered vertical shorts complete with AI-generated avatar narration, AI-generated B-roll video clips, dynamic multi-layout compositions, social media copy, and a lead magnet document — all uploaded to Google Drive and tracked in Google Sheets. It's designed to be called as a sub-workflow — triggered by a parent workflow that provides video analysis data (transcript, key moments, visual analysis, metadata). The full pipeline: Stage 1 — Extract & Prepare The workflow receives pre-analysed video data (transcript, sections, B-roll clips, metadata) from the parent workflow via the Execute Workflow Trigger. A Code node extracts and structures the key snippets, B-roll timestamps, and video context ready for AI processing. Stage 2 — Short-Form Concept Ideation (Gemini AI Agent) A Gemini-powered AI agent analyses the transcript, key moments, and video overview to generate 3 unique short-form concepts per video. Each concept includes a hook, body structure, CTA, full avatar script, and a lead magnet deliverable prompt. The agent uses structured output parsing to guarantee clean JSON. Concepts are fed with real examples from top-performing creators for style reference. Stage 3 — Loop Through Concepts The workflow loops through each concept and for each one runs the full production pipeline in parallel: Stage 4 — HeyGen Avatar Generation Each concept's full script is sent to HeyGen's API to generate a vertical (1080×1920) AI avatar video. The workflow polls HeyGen's status endpoint until rendering is complete, then captures the avatar video URL. Stage 5 — AI B-Roll Generation (Replicate — Seedance 1 Lite) While the avatar renders, the workflow generates AI video B-roll clips using ByteDance's Seedance 1 Lite model on Replicate. The AI Video Director determines what B-roll is needed, and prompts are sent to Replicate to generate 2-second vertical clips at 24fps and 720p. Multiple clips are generated and aggregated. Stage 6 — AI Video Director (Gemini AI Agent) A Gemini-powered AI Video Director creates a beat-by-beat storyboard with dynamic layout transitions. It generates a RenderScript specifying layout types (avatar full-frame for hooks/CTAs, split-screen for demos, picture-in-picture overlays for focus moments), transition effects, and timing. The effects library provides scroll-stopping transitions like RGB glitch, accent flash, zoom shake, and whip pan. Stage 7 — Creatomate Rendering The Creatomate Template Builder Code node converts the AI Director's storyboard into a Creatomate-compatible render payload — assembling avatar video, B-roll clips, transitions, text overlays, and effects into a single 1080×1920 composition. The render is sent to Creatomate's API, polled until complete, then downloaded. Stage 8 — Upload & Social Copy The finished video is uploaded to Google Drive and shared. An OpenAI-powered Social Media Copywriter generates platform-optimised titles, descriptions, hashtags, and captions for YouTube Shorts, Instagram Reels, and TikTok. Everything is logged to a Google Sheets tracker. Stage 9 — Lead Magnet Document Generation In parallel, a Gemini-powered Document Generator creates a downloadable lead magnet (actionable guide, template, checklist, etc.) based on the CTA promise from each concept. The document is converted to HTML and uploaded as a Google Doc, shared publicly, and linked in the tracker sheet — ready to use as a content magnet in video descriptions. Setup guide Required accounts & API keys | Service | What it does | Sign up | |---------|-------------|---------| | HeyGen | AI avatar video generation (talking head narration) | https://heygen.com | | Replicate | AI video B-roll generation (Seedance 1 Lite by ByteDance) | https://replicate.com | | Creatomate | Video composition rendering (assembles final short) | https://creatomate.com | | Google AI Studio (Gemini) | Powers 4 AI agents (concept ideation, video direction, output parsing, document generation) | https://aistudio.google.com | | OpenAI | Social media copywriting (titles, descriptions, hashtags) | https://platform.openai.com | | Google Cloud | Google Drive (video storage) + Google Sheets (tracking) + Google Docs (lead magnets) | https://console.cloud.google.com | Replicate model This workflow uses Seedance 1 Lite by ByteDance for AI-generated B-roll video clips: https://replicate.com/bytedance/seedance-1-lite n8n credentials to configure | Credential type | Used by | |----------------|---------| | HeyGen API Key (HTTP Header Auth) | Avatar generation + status polling | | Replicate API Token (HTTP Header Auth) | AI B-roll video generation | | Creatomate API Key (HTTP Header Auth) | Video render + status polling | | Google Gemini API Key | Concept ideation, video direction, structured parsing, document generation | | OpenAI API Key | Social media copywriting | | Google Drive OAuth2 | Video upload, Google Doc creation, file sharing | | Google Sheets OAuth2 | Shorts tracker logging | Google Workspace setup Google Sheets — Create a spreadsheet called shorts_tracker with a sheet named Shorts Tracker. Columns should include: Created Date, YouTube Title, Short Title, Concept Type, YouTube Short Title, YouTube Description, Instagram Caption, TikTok Caption, Hashtags, Google Drive URL, Magnet URL. Google Drive — Create a folder for rendered shorts. Update the Upload to Google Drive node with your folder ID. Google Docs — Lead magnet documents are auto-created and shared via the Google Drive API. Steps Import the workflow into n8n Configure all credential sets (HeyGen, Replicate, Creatomate, Gemini, OpenAI, Google OAuth2) Set up your Google Sheets tracker and Drive folder Update the HeyGen avatar IDs in the "HeyGen - Generate Full Avatar" node to match your HeyGen avatars Connect this as a sub-workflow — it expects to be called by a parent workflow (like the Video Digestion Workflow) via the Execute Workflow Trigger The parent workflow passes in: source video data, transcript, sections, key moments, visual analysis, and video overview What this workflow produces (per video) For each source video, the workflow generates 3 unique shorts, and for each short: ✅ Finished rendered vertical video (1080×1920 MP4) uploaded to Google Drive ✅ AI avatar narration with hook, body, and CTA ✅ AI-generated B-roll video clips ✅ Dynamic layouts with scroll-stopping transitions ✅ Platform-optimised copy (YouTube, Instagram, TikTok) ✅ Lead magnet Google Doc with shareable link ✅ Full tracking row in Google Sheets Nodes used (44 total) Execute Workflow Trigger Code nodes (x4 — snippet extraction, effects library, Creatomate template builder, HTML converter) AI Agents (x4 — Gemini-powered concept ideator, video director, document generator + structured output parsers) OpenAI node (social media copywriter) Google Gemini Chat Models (x5) HeyGen API (x2 — generate + poll status) Replicate API (AI B-roll generation) Creatomate API (x2 — render + poll status) Google Drive (x2 — upload + share) Google Sheets (x2 — tracker logging) HTTP Request (Google Docs creation) Set/Edit Fields, Split In Batches, Split Out, Merge, Aggregate, Wait, If nodes Example Reels: Example 1 Example 2 Built by @adamgoodyer — The Anti-Guru Technical Educator. Real workflows, real implementation, no fluff.
by folorunso victor
AI-Powered Cold Outreach & Follow-Up Automation (with Do...While variant) Automate the full cold email lifecycle — from intelligently crawling a prospect's website, to AI-writing a personalised email, verifying the address, creating a Gmail draft, and managing up to 5 context-aware follow-ups — all tracked in Google Sheets. Good to know This template contains two complete, identical workflows side by side.** The only difference is how the async scrape polling loop is built. Choose the version that suits your setup, then delete the other. Version A (left) — Standard. Uses built-in n8n nodes only. Works on n8n Cloud and any self-hosted instance with no extra setup. Version B (right) — Do...While. Uses the n8n-nodes-do-while community node to replace 5 nodes with 2. Requires installation under Settings → Community Nodes → n8n-nodes-do-while. Firecrawl batch scraping is billed per page. Test with a single domain first to understand your usage before running at scale. Gmail drafts are created — not sent automatically. Review and send manually. This is intentional so you stay in control of what goes out. The workflow stops following up after 5 attempts per lead (follow_ups < 5). Leads marked unsubscribed are permanently excluded. How it works Cold Email Branch (runs first, one lead at a time): Reads all rows from a Google Sheets lead database and filters for leads with status = pending and follow_ups = 0. Crawls the prospect's website sitemap using Firecrawl to discover all URLs. Groq (ultra-fast LLM) filters the URL list down to the 10 most strategically useful pages — removing sitemaps, legal pages, RSS feeds, and other non-business content. Firecrawl batch-scrapes all selected pages simultaneously and returns scraped markdown. Because Firecrawl scraping is asynchronous, the workflow polls for job completion rather than waiting blindly. Version A: polls using a SplitInBatches → Get Status → IF → Wait → Set loop (5 nodes, built-in only). Version B: polls using Get Status → Do...While (2 nodes, community node). The Do...While node has a built-in 5-second wait between iterations and a 30-iteration hard cap (≈ 2.5 min max) that exits gracefully instead of timing out. All scraped page markdown is aggregated into one payload and passed to a Gemini AI agent, which reads the business, writes a personalised cold email, and extracts the best contact email it found in the content. If the AI found a contact email, it is immediately verified with VerifiEmail. If no email was found in the scraped content, a Firecrawl AI Agent actively navigates the site (contact pages, footers, mailto links) to find one — then verifies that too. If the email passes verification, a Gmail draft is created. If no valid email can be found at all, the lead is marked no_email in the sheet so it is never retried, preventing wasted API calls. On success, the sheet row is updated: status = emailed, follow_ups = 0, email = <found address>. Follow-Up Branch (runs automatically after cold emails complete): Re-reads the lead database and filters for leads with status = emailed, a non-empty email, and follow_ups < 5. Fetches the full Gmail conversation thread for each lead so the AI has full context. A Gemini AI agent — enhanced with per-contact window memory (keyed to email address) — reads the entire conversation history and writes a context-aware follow-up reply. If the conversation suggests no follow-up is needed (e.g., a positive reply was received), the agent sets skip: true and the workflow moves on without creating a draft. A Gmail draft is created in the same thread as the original email, so replies are properly threaded. The sheet increments follow_ups by 1 after each successful draft. How to use Choose your version. Decide whether you want Version A (standard, built-in nodes) or Version B (Do...While, community node). If you choose Version B, install the community node first: Settings → Community Nodes → install n8n-nodes-do-while. Then delete all the nodes from the version you are not using. Set up your Google Sheet. Create a sheet with these columns in order: domain, niche, region, email, status, follow_ups. Add your prospect domains, set status = pending and follow_ups = 0 for each new lead. Connect all credentials. Add credentials for: Google Sheets (OAuth2), Gmail (OAuth2), Firecrawl API, Groq API, Google Gemini API, and VerifiEmail API. Update the sheet ID. Open any Google Sheets node and update the documentId to point to your spreadsheet. Customise the AI prompts. Open the ✍️ Write Cold Email agent node and update the system prompt with your name, company, offer, and tone. Do the same for ✍️ Write Follow-Up Email. Test with one lead. Add a single row with status = pending and run the workflow manually. Verify the scraping, email generation, verification, and draft creation all work before adding more leads. Requirements Firecrawl** account for website crawling, scraping, and AI agent Groq** account for fast URL filtering Google Gemini** account for AI email generation (cold + follow-up) VerifiEmail** account for email deliverability checking Google Sheets** (OAuth2) for the lead database Gmail** (OAuth2) for creating drafts and reading threads (Version B only) n8n-nodes-do-while community node installed Customising this workflow Swap any LLM.** Groq is used for URL filtering (fast, cheap) and Gemini for email writing (creative). Both can be replaced with any model your n8n instance supports — simply swap the model sub-node attached to each chain or agent node. Change the follow-up limit.** The filter node checks follow_ups < 5. Update this number to control how many times the workflow will attempt to follow up before stopping. Add a scheduler trigger.** Replace or supplement the Manual Trigger with a Schedule Trigger to run the workflow automatically — for example, every weekday morning to queue up the day's drafts. Add a webhook for new leads.** Instead of manually adding rows, connect a form, CRM webhook, or Apollo/Hunter.io export to append rows directly to your Google Sheet, then let the workflow pick them up automatically on its next run. Adjust the scraping depth.** The AI URL filter is set to keep a maximum of 10 pages. For large or complex sites where you need more context, increase this limit in the 🤖 AI: Filter Strategic URLs node's prompt. Understanding the Do...While node (Version B).** The n8n-nodes-do-while community node is a true while loop for n8n — it repeatedly executes connected nodes until a condition you define evaluates to true. In this workflow it replaces the classic SplitInBatches + IF + Wait + Set polling pattern. The node is wired so that Get Crawl Status runs first (do), then the condition $json.data?.status !== 'scraping' is checked (while). If still scraping, it waits 5 seconds and loops; if done, it exits to the Aggregate node. The maxIterations: 30 cap ensures the loop never runs for more than 2.5 minutes regardless of scrape duration.
by Sona Labs
Automatically identify ICP matches by enriching basic company records with Sona Enrich data—combining web scraping, AI analysis, and the structured attributes that define your ideal customer. Import company domains from a Google Sheet, automatically analyze their websites with AI, enrich them with firmographic data via Sona Enrich, and sync the results to HubSpot—so you can quickly discover and target your ideal customers. How it works Step 1: Data Input & Web Scraping Reads company domains from your Google Sheet Scrapes each website's content via HTTP requests Extracts and cleans HTML content Removes navigation, footers, and noise Step 2: AI Analysis Sends cleaned content to OpenAI Chat Model Extracts structured company intelligence (industry, positioning, features, personas) Captures and analyzes pricing, pros/cons, and value propositions Aggregates all AI results into standardized format Advanced users: You can modify the data that's generated and then add custom fields to HubSpot Step 3: HubSpot Preparation Creates custom fields in HubSpot CRM Prepares AI-extracted data for import Splits aggregated data into individual company records Ready for batch processing Step 4: Enrich & Sync to HubSpot Loops through each company one by one Enriches with the Sona API (firmographics, revenue, employees, funding, and more) Creates company record in HubSpot Formats and populates all custom fields Combines AI insights + Sona data in one complete profile What you'll get The workflow enriches each company record with: Web-Scraped Intelligence**: Business descriptions, features, and positioning directly from their website AI-Analyzed Insights**: Value propositions, target personas, pricing models, and competitive advantages interpreted by AI Firmographic Data**: Company size, employee count, revenue estimates, headquarters location, and more via Sona Enrich Technographic Data**: Technology stack, platforms, and tools the company uses Industry Classification**: Precise industry categorization and market type (B2B/B2C) Funding & Growth**: Investment rounds, funding status, and growth indicators Custom HubSpot Properties**: All data automatically mapped and synced to your CRM for immediate use Why use this Complete intelligence gathering**: Combines three powerful data sources (web scraping, AI, and Sona enrichment) for maximum insight depth Personalize at scale**: Leverage actual company intelligence to craft relevant, informed outreach that resonates Intelligent segmentation**: Build precise account lists by industry, tech stack, business model, or company size Accelerate research**: Eliminate hours of manual company investigation—save 15-30 minutes per prospect Improve conversion**: Engage prospects with context-rich conversations that demonstrate deep understanding Enhanced lead scoring**: Build sophisticated scoring models with comprehensive firmographic and technographic signals Automated updates**: Keep HubSpot records current with scheduled enrichment runs (daily/weekly) Setup instructions Before you start, you'll need: Google Sheet with company websites (column named "Website Domain") OpenAI API key for AI analysis (sign up here) Sona API credentials (get access here) Get an app token from HubSpot by creating a legacy app: Go to HubSpot Settings > Integrations > Legacy Apps Click Create Legacy App Select Private (for one account) In the scopes section, enable the following permissions: crm.schemas.companies.write crm.objects.companies.write crm.schemas.companies.read Click Create Copy the access token from the Auth tab n8n cloud or self-hosted instance Configuration steps: Prepare your data: Create a Google Sheet with a "Website Domain" column and add 2-3 test companies (e.g., example.com) Connect Google Sheets: In the "Get row(s) in sheet" node, authenticate and select your spreadsheet and sheet name Configure web scraping: Update the HTTP Request node with your preferred scraping method or data source URL Set up AI Agent: Add your OpenAI API key and customize the extraction prompt to define which company fields you want (industry, personas, features, etc.) Create HubSpot custom fields: Review the "Create Custom HubSpot Fields" node and adjust property names to match your CRM structure Add Sona credentials: In the "Sona Enrich" node within the loop, authenticate with your Sona API key Connect HubSpot: Authenticate in both "Create a Company" nodes using your HubSpot API key or OAuth2 Map enriched data: In the "Format Custom Properties" node, configure how Sona and AI data maps to your HubSpot fields Test with sample data: Run the workflow with 2-3 test companies and verify records appear correctly in HubSpot with all custom properties populated Add error handling: Configure notifications for failed enrichments or API errors (optional but recommended) Scale and automate: Process your full company list, then optionally add a Schedule Trigger for automatic daily or weekly enrichment
by Mychel Garzon
Quick overview This workflow runs every Monday, pulls the last 7 days of posts from LinkedIn, X (Twitter), and Instagram, normalizes engagement metrics, logs raw post data to Google Sheets, calculates a weighted engagement rate, generates strategy recommendations with OpenAI (GPT-4o), and emails an HTML report. How it works A schedule trigger fires every Monday at 9 AM and passes execution to the WES Config node, which defines the engagement weights used across the entire pipeline: likes (1), comments (3), shares (5), saves (4).Runs every Monday at 9:00 AM and sets the engagement weights used for scoring (likes, comments, shares, saves). LinkedIn posts, X tweets, and Instagram media from the last 7 days are fetched in parallel. LinkedIn and X results are merged first, then combined with Instagram into a single unified stream.Fetches up to 100 recent items in parallel from LinkedIn UGC posts, X (Twitter) search results, and Instagram user media. Each post is normalized into a shared schema: platform, date, likes, comments, shares, saves, impressions, text, and URL. Posts older than 7 days and empty items are filtered out before anything is calculated.Merges the three streams, normalizes each item into a unified schema, and filters out empty items and posts older than 7 days. The Weighted Engagement Score is calculated for each post and aggregated into platform rankings, best and worst performers, total impressions, and an overall average engagement rate for the week.Logs each normalized post to Google Sheets in batches, capturing any sheet write errors without stopping the run. GPT-4o receives the aggregated stats and generates 3 actionable strategy recommendations in clean HTML format, ready to be embedded directly into the email report.Calculates weekly analytics using a Weighted Engagement Score (WES), including total posts, impressions coverage, platform rankings, and best/worst posts by engagement rate. Normalized posts are written to Google Sheets in batches of 50 with date, platform, content preview, impressions, total engagement, and URL. Sheet write errors are captured per batch without crashing the loop.Sends the weekly performance summary to OpenAI (GPT-4o) to generate three actionable strategy recommendations in HTML. Once both the Sheets logging and AI insights branches complete, all data is merged into a single payload and sent as a formatted HTML email report with key metrics, platform rankings, and AI recommendations.Combines the analytics, any Google Sheets logging errors, and the AI output, then emails a formatted weekly HTML report. Setup Set three environment variables in your n8n instance: LINKEDIN_OWNER_URN (your LinkedIn person or organization URN), TWITTER_SEARCH_QUERY (the search query or handle to monitor, e.g. from:yourusername), and ANALYTICS_SPREADSHEET_ID (the Google Sheets document ID where raw posts should be logged). Connect your LinkedIn OAuth2 credential to the Get LinkedIn Posts node, your X (Twitter) OAuth2 credential to the Search Tweets node, and your Instagram credential to the Get media node. Connect your OpenAI credential to the AI Strategy Insights node and your Google Sheets credential to the Log Raw Posts to Sheets node. Open the Email Weekly Report node and update the fromEmail and toEmail fields to match your sender and recipient addresses. Connect your SMTP or email credentials to the node. Open the WES Config node and adjust the four weight values to reflect your team's engagement priorities. The defaults are likes 1, comments 3, shares 5, and saves 4. Requirements LinkedIn OAuth2 account with access to your organization or personal post feed X (Twitter) OAuth2 account with search access Instagram account connected via the Instagram community node OpenAI API key with access to GPT-4o Google Sheets document with a Sheet1 tab ready to receive raw post data SMTP or email credential configured for report delivery Customization Adjust the four weight values in the WES Config node to prioritize the engagement signals that matter most to your team, increasing the share weight, for example, emphasizes content virality over conversation. Modify the GPT-4o prompt in the AI Strategy Insights node to request different output formats, focus on specific platforms, or ask for more or fewer recommendations. Change the schedule in the Every Monday 9 AM node to run on a different day or frequency, daily, biweekly, or monthly, reporting all work with the same pipeline. Extend the Google Sheets columns in the Log Raw Posts to Sheets node to capture additional normalized fields, such as raw WES score per post or stock count per platform. Add a Slack or Teams notification node after the Email Weekly Report node to ping a channel when the report has been sent successfully.
by Muhammad Farooq Iqbal
This n8n template demonstrates how to create consistent character videos using AI image and video generation. The workflow generates photorealistic videos featuring the same character across different poses, locations, and outfits, maintaining perfect character consistency throughout cinematic transitions. Use cases are many: Create consistent character content for social media, generate cinematic videos for brand campaigns, produce lifestyle content with the same character, automate video content creation for TikTok/Instagram, create character-based storytelling videos, or scale video production with consistent visual identity! Good to know The workflow maintains perfect character consistency across frames using reference images Uses multiple AI services: GPT-4o for prompt generation, Google Nano Banana Edit for image generation, and Veo 3.1 for video creation Features 100 unique locations (beaches, cities, cafes, rooftops, etc.) and 15 different poses KIE.AI pricing: Check current rates for Veo 3.1 and Nano Banana Edit models Processing time: ~5-10 minutes per complete video (depends on AI service queue) Output format: 9:16 aspect ratio videos optimized for TikTok/Instagram Automatically generates social media content (titles, descriptions, hashtags) using GPT-4o Includes AI disclosure labels for TikTok compliance How it works Location & Pose Selection: Randomly selects one location from 100 options and 3 unique poses from 15 options AI Story Creation: GPT-4o generates cinematic prompts for first frame, last frame, and video motion while maintaining character identity from reference images Start Frame Generation: Google Nano Banana Edit creates the first frame image with character in initial pose, location, and outfit End Frame Generation: Nano Banana Edit generates the final frame using start frame as reference, changing only pose/expression while maintaining consistency Video Generation: Veo 3.1 creates smooth cinematic video transition between frames with natural character movement Content Creation: GPT-4o generates engaging title, description, and hashtags for social media Auto-Publishing: Automatically posts to TikTok (with AI disclosure) and Instagram, plus sends previews via Telegram The workflow ensures the same character appears in both frames with identical facial features, hair, skin tone, and overall appearance, while only pose and expression change. The video features dynamic camera movements (arc shots, dolly pushes, crane rises, etc.) for cinematic quality. How to use Setup Credentials: Configure OpenAI API, KIE.AI API, Blotato API, and Telegram Bot credentials Add Reference Images: Update the 5 reference image URLs in the "Create Start Frame" node with your character images Configure Social Media: Set up Blotato accounts for TikTok and Instagram posting Set Telegram Chat ID: Replace YOUR_TELEGRAM_CHAT_ID with your Telegram chat ID for previews Deploy Workflow: Import the template and activate the workflow Trigger Generation: Use the schedule trigger (default: every 6 hours) or replace with manual/webhook trigger Receive Content: Get previews via Telegram and published posts on TikTok & Instagram Pro tip: The workflow uses 5 reference images to maintain character consistency. For best results, use clear, high-quality photos of your character from different angles. The workflow automatically handles character identity preservation across all generated content. Requirements OpenAI API** account for GPT-4o prompt generation and social media content creation KIE.AI API** account for Veo 3.1 video generation and Google Nano Banana Edit image generation Blotato API** account for TikTok and Instagram posting automation Telegram Bot** setup for preview delivery (optional but recommended) n8n** instance (cloud or self-hosted) Reference Images:** 5 high-quality images of your character (URLs or hosted images) Customizing this workflow Character Variations: Modify the reference images to create videos with different characters while maintaining the same workflow structure. Location Customization: Edit the location pool in the "Code in JavaScript" node to add or modify locations (currently 100 options). Pose Library: Expand or customize the pose library in the JavaScript code node (currently 15 poses with detailed guidance). Social Media Platforms: Add more platforms by duplicating the Blotato nodes and configuring additional accounts (YouTube, Facebook, etc.). Content Style: Adjust GPT-4o prompts in "Story Creator Agent" and "Title Description" nodes to change content tone, style, or language. Scheduling: Replace the schedule trigger with webhook, form, or manual trigger based on your needs. Video Settings: Modify Veo 3.1 parameters (aspect ratio, watermark, seeds) in the "Veo 3.1" node for different output formats. Batch Processing: Add loops to generate multiple videos with different location/pose combinations automatically.
by Omer Fayyaz
This workflow automatically captures, enriches, scores, and routes website leads in real-time, scheduling high-intent prospects for demos within minutes instead of hours—dramatically improving conversion rates by eliminating response delays. What Makes This Different: Real-Time Lead Processing** - Captures and processes leads instantly from website forms with zero delay Intelligent Fit Scoring** - Automatically scores leads 0-100 based on company size, seniority, and revenue Dual-Track Routing** - High-intent leads (60+) get fast-track treatment, others follow standard nurture Live Calendar Integration** - Shows actual available Calendly slots, not fake placeholders Automated Sales Alerts** - Posts rich lead details to Slack with booking links instantly Smart Follow-Up** - Sends fallback email if sales team doesn't respond within 10 minutes Complete CRM Automation** - Creates HubSpot contacts and deals automatically with enriched data Full Audit Trail** - Logs everything to Google Sheets for analytics and reporting Key Benefits of Instant Lead Response: Speed** - Minutes from form submission to scheduled demo, not hours or days Conversion** - Respond while leads are hot, dramatically improving booking rates Automation** - Zero manual work—enrichment, scoring, routing, and follow-up all automatic Intelligence** - Data-driven scoring ensures sales focuses on best-fit prospects Accountability** - Complete logging shows response times and follow-up actions Scalability** - Handles unlimited lead volume without adding sales admin work Who's it for This template is designed for B2B SaaS companies, sales teams, and revenue operations professionals who need to convert website leads faster. It's perfect for organizations that lose deals due to slow response times, want to prioritize high-intent prospects, need to automate CRM data entry, or want to ensure no hot lead falls through the cracks while sales is busy. How it works / What it does This workflow creates an end-to-end lead-to-meeting pipeline that automatically processes inbound leads and schedules high-intent prospects for demos. The system: Receives lead submissions via webhook from website forms or chat widgets Normalizes data from different form providers into a standard format Enriches contact information using Clearbit to get company size, revenue, job title, and industry Calculates fit score (0-100) based on company metrics: size (40 pts), seniority (30 pts), revenue (30 pts) Routes intelligently - High-intent leads (60+) → fast track | Standard leads → nurture channel Creates CRM records - Automatically creates/updates HubSpot contact and deal with enriched data Fetches real availability - Gets actual available Calendly demo slots via API (next 7 days) Alerts sales team - Posts formatted message to Slack with lead details and booking links Monitors response - Waits 10 minutes and checks if sales replied in Slack thread Sends fallback email - Automatically emails lead with self-service booking link if no response Logs everything - Records all data to Google Sheets for reporting and analytics Key Innovation: Smart Follow-Up Automation - Unlike basic lead capture workflows, this system ensures accountability by automatically following up with leads if the sales team is unavailable, preventing lost opportunities while maintaining a professional response time. How to set up 1. Configure API Credentials Add the following credentials in n8n: Clearbit (Lead Enrichment) Create account at clearbit.com Generate API key from Settings → API Add as "Clearbit API" credential in n8n HubSpot (CRM Integration) Create private app in HubSpot Settings → Integrations → Private Apps Grant scopes: crm.objects.contacts.write, crm.objects.deals.write Copy app token Add as "HubSpot App Token" credential in n8n Calendly (Calendar Availability) Create OAuth app at calendly.com/integrations/api_webhooks Configure OAuth2 credentials in n8n Set environment variable: CALENDLY_USER_URI with your user URI Get this from: https://api.calendly.com/users/me (returns your user URI) Slack (Team Notifications) Create Slack app at api.slack.com/apps Add Bot Token Scopes: channels:read, chat:write, channels:history Install app to workspace and copy Bot User OAuth Token Add as "Slack API" credential in n8n Update channel names in nodes: change "hot-leads" and "leads" to your actual channel names SendGrid (Email Fallback) Create account at sendgrid.com Generate API key from Settings → API Keys Verify sender email address Add as "SendGrid API" credential in n8n Update "from" email in "Send Fallback Email" node Google Sheets (Activity Logging) Create Google Cloud project and enable Sheets API Configure OAuth2 credentials in n8n Create a Google Sheet with columns matching the workflow Replace YOUR_GOOGLE_SHEET_ID in "Log to Google Sheets" node with your actual sheet ID 2. Customize Fit Scoring Logic Edit the "Calculate Fit Score" node to match your ideal customer profile: Default Scoring: Company size 50-5,000 employees = 40 points Executive/Director seniority = 30 points Annual revenue ≥ $1M = 30 points Total possible:* 100 points | *High-intent threshold:** 60+ points To Customize: Adjust company size ranges based on your target market Change seniority requirements (C-level, VP, Manager, etc.) Modify revenue thresholds Update the 60-point threshold for high-intent routing 3. Set Up Webhook Endpoint Get Webhook URL: Activate the workflow Copy webhook URL from "Lead Form Webhook" node URL format: https://your-n8n-instance.com/webhook/demo-request Configure Form Provider: Point your website form POST request to the webhook URL Send JSON body with fields: email, name, company, phone, utm_source, utm_campaign, page_url, message Or map your existing form fields to these names in "Normalize Lead Data" node Example Form Integration: // HTML Form fetch('https://your-n8n.com/webhook/demo-request', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ email: 'lead@company.com', name: 'John Doe', company: 'Acme Inc', phone: '+1234567890', utm_source: 'google', page_url: window.location.href }) }) 4. Test the Workflow Initial Test: Activate the workflow Submit test lead via webhook (use Postman or curl) Verify Clearbit enrichment returns data Check HubSpot for created contact and deal Confirm Slack notification appears in correct channel Verify Google Sheet receives log entry Response Test: Wait 10 minutes after Slack notification Check if "Check Slack Replies" detects no response Verify fallback email sends via SendGrid Confirm lead receives booking email with Calendly link Calendly Test: Verify "Get Calendly Event Types" finds your Demo event Check "Get Available Demo Slots" returns actual time slots Confirm booking URLs work and pre-fill time selection 5. Monitor and Optimize Key Metrics to Track: Time from form submission to Slack notification (target: <30 seconds) Sales response rate within 10 minutes Fallback email send rate (lower is better) High-intent lead conversion rate (booked → closed) Average fit score of closed deals Optimization Tips: Adjust fit score weights based on actual conversion data Tune the 60-point threshold for high-intent routing Customize Slack message format for your team's workflow Modify wait time (10 minutes) based on team availability Add custom fields to Google Sheet for additional tracking Requirements n8n Instance: n8n Cloud or self-hosted (v1.0+) Code node execution enabled Webhook functionality active External Services: Clearbit** - Enrichment API (paid service, free trial available) HubSpot** - CRM with API access (free tier available) Calendly** - Scheduling platform with API access (paid plans) Slack** - Workspace with bot integration capability SendGrid** - Email API (free tier: 100 emails/day) Google Sheets** - Google account with Sheets API enabled Technical Requirements: Public webhook endpoint (HTTPS) Environment variable support for sensitive data OAuth2 authentication capability Minimum 256MB RAM for code node execution Data Privacy: Ensure GDPR/CCPA compliance for lead data storage Review data retention policies for all connected services Configure appropriate data handling in Google Sheets Add privacy policy link to email templates Tips and best practices Fit Scoring: Start with default scoring, then optimize based on actual conversion data Review monthly: which scores convert best? Adjust weights accordingly Consider adding industry filters for vertical-specific targeting Test different thresholds (50, 60, 70) to find optimal balance Lead Response: Keep 10-minute wait time during business hours Consider longer wait for after-hours leads (use schedule trigger) Customize Slack urgency based on fit score (🔥 for 80+, ⚡ for 60-79) Add @mentions in Slack for specific team members based on lead attributes Calendar Management: Use dedicated "Demo" event type in Calendly for consistent detection Ensure event name includes "demo" (case-insensitive) for workflow to find it Set appropriate buffer times between meetings in Calendly settings Review availability regularly to maintain high slot count Error Handling: All critical nodes have onError: continueRegularOutput to prevent workflow stops Monitor execution logs daily for failed enrichments or CRM errors Set up n8n error workflow to alert on consistent failures Keep fallback booking URL updated in case Calendly API fails Performance: Webhook responds immediately (within 2 seconds) even while processing continues Clearbit enrichment can take 3-5 seconds—this is expected Consider batching Google Sheets updates if processing >100 leads/day Monitor n8n resource usage; Code nodes can be memory-intensive Privacy and Compliance: Add unsubscribe link to fallback emails Include data handling disclosure in form Set Google Sheet permissions appropriately (team only) Review Clearbit's data sources for compliance requirements Configure data retention in HubSpot to match your policy Customization Ideas: Add SMS notification for ultra-high fit scores (90+) Integrate with territory routing (route to specific sales rep by region) Add lead source scoring (paid > organic > referral) Create separate tracks for different product lines Build competitor mention detection in form messages Add qualification questions that influence fit score
by Ravi Patel
Enterprise AI Outreach Automation Description This n8n template demonstrates how to build a complete AI-powered outbound email system using Google Sheets, Gmail, Gemini, and website scraping. The workflow is designed to help you move from basic lead data to personalized cold outreach without manually researching each company or writing each email yourself. You only need to add a few lead details such as first name, last name, email, and website in your Google Sheet. From there, the workflow scrapes the lead’s website, cleans the text, analyzes the business with Gemini, generates outreach context like pain points and growth signals, creates a six-email sequence, sends the first message, schedules follow-ups, and updates the lead record automatically. The workflow also includes protections for working hours and daily sending limits. It has a separate Gmail reply-monitoring branch that detects responses, marks leads as active or replied, and stops unnecessary future follow-ups by updating the lead sheet. Good to know This workflow uses two Gemini-powered AI steps: one to generate business research from website content and another to generate the six-email sequence, so usage cost will depend on your Gemini plan and token usage. The workflow also depends on website scraping through a Puppeteer node connected to a Browserless endpoint, so you need a working scraping setup before activating the template. It is also built around a Google Sheets structure that stores lead details, email content, send dates, send status fields, thread IDs, notes, and service information. For best results, keep the sheet columns aligned with the workflow mappings before you start using it. How it works A scheduled trigger starts the new lead flow and first passes through a working-hours protection check so emails are only processed during allowed business hours. The workflow reads leads from Google Sheets and filters for rows where the lead status is blank, which means only fresh leads are processed first. The lead website is scraped with Puppeteer, then a code node removes noisy HTML, scripts, duplicate lines, and low-value content so the AI receives cleaner business text. Gemini analyzes the cleaned website text and returns structured data such as company summary, industry, target audience, pain points, growth signals, automation opportunities, email angle, and a personalized opening line. That research is written back to the lead sheet, after which the workflow reads your service data from a separate sheet so the offer can be matched to the lead context. A second Gemini step generates a full six-email sequence, with only Email 1 receiving a subject line and follow-ups designed to be sent in the same Gmail thread. The parsed email content is cleaned and formatted, a random wait is applied before sending, Email 1 is sent through Gmail, and tracking fields such as thread ID, send dates, sent flags, sequence step, and follow-up dates are updated in Google Sheets. A separate scheduled branch handles Email 2 to Email 6 by checking lead status, sequence step, send dates, working hours, and daily limits before sending the next follow-up reply in the existing Gmail thread. Another Gmail Trigger branch monitors replies, extracts reply details, updates the lead record, and marks the lead so follow-ups stop once a response is received. How to use Add new leads to your main Google Sheet with at least First Name, Last Name, Email, and Website. Add your services, offers, or solution descriptions to the services sheet so the workflow can align outreach messaging with what you actually sell. Connect your Google Sheets, Gmail, and Gemini credentials in n8n, and configure your Browserless or Puppeteer scraping setup. Review the mapped sheet columns carefully, especially the fields for subject lines, email bodies, send timestamps, sent-status flags, thread IDs, notes, and sequence steps. Activate the workflow to allow the scheduled lead-processing flow, follow-up flow, and Gmail reply-monitoring flow to run automatically. Requirements Google Sheets account for lead storage, service data, tracking fields, and daily limit control. Gmail account for sending the first email, replying in existing threads, and detecting incoming replies. Gemini account for website analysis and AI email sequence generation. Puppeteer node plus a working Browserless or compatible scraping endpoint for website extraction. Customising this workflow You can adapt this template to different outreach styles by changing the prompts in the “Generate Website Summary” and “Generate Email” nodes. The current setup focuses on B2B personalized outreach with a six-step sequence, but you can easily change the tone, CTA style, email lengths, service positioning, or follow-up intervals to fit agencies, consultants, SaaS founders, recruiters, or niche lead generation campaigns. You can also adjust the sheet logic to support additional statuses, separate campaigns, multiple sender accounts, or different daily sending caps for new emails and follow-ups. Since the workflow already tracks sent counts, send windows, sequence stages, and reply updates, it provides a strong base for scaling into a more advanced outreach system. Optional “Try it out” section Try It Out This n8n template is a complete AI-powered cold email outreach system for teams that want to automate lead research, email writing, follow-up scheduling, and reply tracking. You only need to provide basic lead details in Google Sheets, and the workflow handles the rest automatically. It researches each company website, creates personalized outreach context, generates a full six-email sequence, sends emails through Gmail, updates tracking fields, and stops follow-ups once a reply is detected.
by isaWOW
Description Set up your keyword schedule once in a Google Sheet and the workflow publishes daily Facebook posts automatically every morning at 6AM. For each keyword scheduled for today, it generates a headline and post content with GPT-4o-mini, creates a professional 1280x704 image with Ideogram, publishes the photo and caption directly to your Facebook Page, and logs the live post URL back to your sheet. Built for SEO agencies and social media managers who want consistent daily Facebook publishing across multiple clients without any manual work. What This Workflow Does Reads today's keywords from Google Sheets** — Filters rows where the Work Day column matches today's day so only today's scheduled content is published Loops through each keyword independently** — Processes one row at a time so every keyword gets its own unique post, image, and log entry Generates a headline and post content with GPT-4o-mini** — Writes a 6–8 word informational headline, plain text paragraphs under 50 words, and an image generation prompt — all grounded in your provided title and content Creates a professional image with Ideogram** — Generates a realistic 1280x704 business-appropriate image in TURBO mode based on the AI-written image prompt Publishes directly to the Facebook Page** — Posts the image and caption to your Facebook Page via the Facebook Graph API with no manual step needed Logs the live post URL back to Google Sheets** — Appends a timestamp, Domain ID, link type, and the live Facebook post URL to your log sheet after every successful post Respects Facebook rate limits** — Waits exactly 1 minute between each post to prevent rate limiting errors when publishing multiple keywords in the same run Setup Requirements Tools Needed n8n instance (self-hosted or cloud) Google Sheets with a keyword schedule sheet and a log sheet OpenAI account with GPT-4o-mini API access Ideogram account with API access Facebook Page with a Page Access Token Credentials Required Google Sheets OAuth2 (used in 2. Google Sheets — Read Today Keywords and 10. Google Sheets — Log Posted URL) OpenAI API key Ideogram API key (pasted directly into 7. HTTP — Generate Image Ideogram) Facebook Page Access Token (pasted directly into 9. HTTP — Post to Facebook) > ⚠️ Google Sheets OAuth2 appears in 2 steps — connect it in both 2. Google Sheets — Read Today Keywords and 10. Google Sheets — Log Posted URL Estimated Setup Time: 20–25 minutes Step-by-Step Setup Import the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import Prepare your keyword schedule sheet — Open your Google Sheet → ensure the keyword tab has these columns: Work Day, Keyword, Landing Page, Title, Content, Critical Instructions, Domain ID — fill Work Day with short day names like Mon, Tue, Wed, Thu, Fri Connect Google Sheets for reading — Open node 2. Google Sheets — Read Today Keywords → click the credential dropdown → add Google Sheets OAuth2 → sign in with your Google account → authorize access → select your spreadsheet and the keyword tab Update the Sheet ID and tab in node 2 — In node 2. Google Sheets — Read Today Keywords, select your actual spreadsheet from the document dropdown and your keyword tab from the sheet dropdown — the current values point to a sample sheet Connect OpenAI — Open node 5. OpenAI — GPT-4o-mini Model → click the credential dropdown → add your OpenAI API key → test the connection Add your Ideogram API key — Open node 7. HTTP — Generate Image Ideogram → find the header value field that currently says REPLACE_WITH_IDEOGRAM_API_KEY → replace it with your actual Ideogram API key — get it from your Ideogram account settings Add your Facebook Page Access Token — Open node 9. HTTP — Post to Facebook → find the access_token body parameter that says REPLACE_WITH_FB_PAGE_ACCESS_TOKEN → replace it with your actual Page Access Token — get this from Facebook Developers → your app → Graph API Explorer → select your page → generate a Page Access Token. Also update the Page ID in the URL (628386143694589) to your actual Facebook Page ID Connect Google Sheets for logging — Open node 10. Google Sheets — Log Posted URL → click the credential dropdown → select the same Google Sheets OAuth2 credential → select your spreadsheet and your log tab Update the Sheet ID and log tab in node 10 — In node 10. Google Sheets — Log Posted URL, select your actual spreadsheet and the log tab — ensure the log tab has columns: Timestamp, Domain ID, Link Type, Live URLs Activate the workflow — Toggle the workflow to Active — it will run automatically every morning at 6AM How It Works (Step by Step) Step 1 — Schedule: Daily 6AM This step fires the workflow automatically every morning at 6AM. No manual trigger is needed. Once the workflow is active, it runs on its own every day including weekends. Step 2 — Google Sheets: Read Today Keywords Your keyword schedule sheet is read and filtered to only return rows where the Work Day column matches today's short day name (Mon, Tue, Wed, etc.). This uses today's actual day of week calculated at runtime so Monday only publishes Monday rows, Tuesday only publishes Tuesday rows, and so on. Step 3 — Split: Loop Over Each Row The filtered rows are processed one at a time using a loop. When a row is available it moves forward to content generation. When all rows have been processed the loop exits cleanly and the workflow ends. This ensures each keyword gets its own independent post — if one fails, the others continue. Step 4 — AI Agent: Generate Post Content GPT-4o-mini receives the keyword, landing page, title, content, and any critical instructions from the current row. It writes three outputs: a 6–8 word informational headline with no special characters, plain text post content in paragraphs of maximum 50 words with no links or generic intro/conclusion phrases, and a professional image generation prompt avoiding logos and brand references. The first 250 characters of the headline plus content must stand alone as a complete Twitter-ready summary. Step 5 — OpenAI: GPT-4o-mini Model This is the language model powering both the content generation and the output parser. It runs with default settings to produce natural, informational social copy. Step 6 — Parser: Structured Post Output This step enforces the exact three-field schema that GPT-4o-mini must return: Headline, Content, and image prompt. It validates and auto-fixes the output format so the fields are always clean and correctly structured before the image generation step. Step 7 — HTTP: Generate Image Ideogram The AI-generated image prompt is sent to the Ideogram v3 API. The image is generated at 1280x704 resolution in TURBO mode for fast delivery. A URL for the generated image is returned. If Ideogram fails, the step continues without stopping the full loop so remaining keywords still get published. Step 8 — Code: Prepare Post Data The headline, content, and landing page URL are assembled into the final post text formatted as: headline, then two line breaks, then content paragraphs, then Read more: [landing page URL]. The Domain ID from the sheet row is also extracted here for logging. The Ideogram image URL is carried forward for the Facebook post. Step 9 — HTTP: Post to Facebook The assembled caption and image URL are posted to the Facebook Page via the Graph API v23. The post is published as a photo post with the caption attached. The Facebook API returns a post ID on success. If the post fails, the step continues so the loop does not break on a single failed post. Step 10 — Google Sheets: Log Posted URL A new row is appended to your log sheet with four values: the current timestamp in MM-DD HH:mm:ss format, the Domain ID from the keyword row, the link type label "Social Sharing Fb", and the live Facebook post URL constructed from the post ID returned by Facebook. If the Facebook post failed, the Live URLs field will be empty for that row. Step 11 — Wait: 1 Minute Rate Limit The workflow pauses for exactly 1 minute before looping back to process the next keyword row. This prevents Facebook from rate limiting the Page when multiple posts are published in the same run. After the 1-minute wait, the loop returns to step 3 to pick up the next row. Key Features ✅ Day-of-week scheduling from a spreadsheet — Your entire week's content plan lives in one Google Sheet — the workflow reads only today's rows automatically without any configuration changes ✅ Full loop with rate limit control — Every keyword runs through content, image, post, and log in sequence with a 1-minute gap between posts — no manual spacing needed ✅ Twitter-ready first 250 characters — The prompt enforces a standalone summary in the first 250 characters so you can repurpose the same content for Twitter without any editing ✅ Professional images at no extra setup — Ideogram generates a unique 1280x704 business image for every post based on AI-written prompts — no Canva, no stock photos ✅ Error continuity on failure — All three external API steps (Ideogram, Facebook, and Google Sheets log) are set to continue on error so one failing post never breaks the entire day's run ✅ Live URL logged automatically — The exact Facebook post URL is written back to your sheet immediately after publishing so your reporting is always up to date ✅ Domain ID tracking per post — Every log row includes the Domain ID from your sheet so agencies managing multiple clients can filter and report by client Customisation Options Change the publish time — In node 1. Schedule — Daily 6AM, change the trigger hour from 6 to any other hour to publish at a different time — for example set to 8 for 8AM or 18 for 6PM. Add more columns to the keyword sheet — In node 4. AI Agent — Generate Post Content, you can reference additional columns from your sheet (e.g. Brand Voice, Tone, Target Audience) by adding them to the prompt context — just make sure the column headers exist in your sheet. Change the image resolution or style — In node 7. HTTP — Generate Image Ideogram, change the resolution value from 1280x704 to 1024x1024 for a square image suited to Instagram, or change rendering_speed from TURBO to DEFAULT for higher quality rendering. Post to a different Facebook Page — In node 9. HTTP — Post to Facebook, replace the Page ID in the URL (628386143694589) with your own Page ID — find your Page ID by going to your Facebook Page → About → Page Transparency, or from Facebook Developers. Add a Slack notification after each post — After node 10. Google Sheets — Log Posted URL, add a Slack step that posts the headline and live Facebook URL to a #social-posting channel so your team gets notified in real time when each post goes live. Troubleshooting Workflow not triggering at 6AM: Confirm the workflow is Active — inactive workflows do not run on a schedule Check that your n8n instance is running at 6AM — self-hosted instances that are turned off will not fire scheduled workflows To test immediately, click on node 1. Schedule — Daily 6AM and use the manual Execute option No keywords being read from Google Sheets: Confirm the Google Sheets OAuth2 credential in node 2. Google Sheets — Read Today Keywords is connected and not expired — re-authorize if needed Check that the Work Day column in your sheet uses the exact short day name format that matches your system locale — the workflow uses en-US format which produces Mon, Tue, Wed, Thu, Fri, Sat, Sun Confirm the correct spreadsheet and tab are selected in node 2 — if the node still points to the sample Sheet ID, no rows will return Ideogram not generating images: Confirm REPLACE_WITH_IDEOGRAM_API_KEY in node 7. HTTP — Generate Image Ideogram has been replaced with your actual Ideogram API key in the Api-Key header field Check the execution log of node 7 for the API error response — a 401 means wrong key, a 400 means invalid prompt format If Ideogram fails, the post will still attempt to publish but with an empty image URL — Facebook will reject a photo post with no image URL, so the post will not go live for that keyword Facebook post not publishing: Confirm REPLACE_WITH_FB_PAGE_ACCESS_TOKEN in node 9. HTTP — Post to Facebook has been replaced with a valid Page Access Token — not a User Access Token Page Access Tokens expire — if posting worked before and stopped, regenerate a long-lived Page Access Token from Facebook Developers → Graph API Explorer Confirm the Page ID in the URL of node 9 matches your actual Facebook Page ID — an incorrect Page ID returns a permission error Google Sheets log not updating: Confirm the Google Sheets OAuth2 credential in node 10. Google Sheets — Log Posted URL is connected — this is a separate connection from the read step Check that your log tab has the exact column headers: Timestamp, Domain ID, Link Type, Live URLs If the Facebook post failed, the post ID is empty and the Live URLs field will log as blank — this is expected behavior, not a logging error Support Need help setting this up or want a custom version built for your team or agency? 📧 Email: info@isawow.com 🌐 Website: https://isawow.com/
by gotoHuman
💼 Lead Outreach Agent This AI workflow helps you quickly react to new leads with an initial personalized outreach. A great start of your lead nurturing sequence to avoid loosing precious leads that could turn into paying customers. Most importantly it uses gotoHuman so you can review the AI-analysis and the AI-generated editable email draft before it is sent out in your name. How it works We receive a new form submission incl. the email address and company name of the prospect and extract the website URL from the address. We proceed only for company email addresses. We scrape the website using Firecrawl and summarize it with OpenAI Our AI agent runs an analysis based on the lead information and documents describing our own company and the defined Ideal Customer Profiles. It also fetches previously approved examples from gotoHuman so you're effectively creating a self-learning agent. It responds with the analysis and the drafted outreach email. Human Approval in gotoHuman. Allows editing the drafted email. We can now send our email including any edits made during the review and be sure that we are using high-quality content instead of AI slop. How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up your credentials for the different services In gotoHuman, select and create the pre-built review template "Lead Outreach Agent" or import the ID: T873fI1Xli5nt3eh33Rj Select this template in the gotoHuman node Requirements You need accounts for gotoHuman (Human Supervision) OpenAI (AI Agent) Typeform (Lead Form Submissions) Firecrawl (Website Scraping) Gmail Google Docs (Company Wiki) How to customize Replace the Typeform trigger with any other way you might receive or find new leads Provide the AI Sales Agent with more context to properly analyze the lead and create better personalized emails. Consider adding tools that allow the agent to fetch more infos about the prospect's company or personal profile, or to find out more about your specific product/service offerings and how your sales pitches look like.
by Trung Tran
Decodo Scraper API Workflow Template (n8n Automation Amazon Book Purchase Report) Watch the demo video below: > This workflow demos how to use Decodo Scraper API to crawl any public web page (headless JS, device emulation: mobile/desktop/tablet), extract structured product data from the returned HTML, generate a purchase-ready report, and automatically deliver it as a Google Doc + PDF to Slack/Drive. Who’s it for Creators / Analysts** who need quick product lists (books, gadgets, etc.) with prices/ratings. Ops & Marketing teams** building weekly “top picks” reports. Engineers** validating the Decodo Scraper API + LLM extraction pattern before scaling. How it works / What it does Trigger – Manually run the workflow. Edit Fields (manual) – Provide inputs: targetUrl (e.g., an Amazon category/search/listing page) deviceType (desktop | mobile | tablet) Optional: maxItems, notes, reportTitle, reportOwner Scraper API Request (HTTP Request → POST) Calls Decodo Scraper API with: URL to crawl, headless JS enabled Device emulation (UA + viewport) Optional waitFor / executeJS to ensure late-loading content is captured HTML Response Parser (Code/Function or HTML node) Pulls the HTML string from Decodo response and normalizes it (strip scripts/styles, collapse whitespace). Product Analyzer Agent (LLM + Structured Output Parser) Prompts an LLM to extract structured “book” objects from the HTML: The Structured Output Parser enforces a strict JSON schema and drops malformed items. Build 📚 Book Purchase Report (Code/LLM) Converts the JSON array into a Markdown (or HTML) report with: Executive summary (top picks, average price/rating) Table of items (rank, title, author, price, rating, link) “Recommended to buy” shortlist (rules configurable) Notes / owner / timestamp Configure Google Drive Folder (manual) Choose/create a Drive folder for output artifacts. Create Document File (Google Docs API) Creates a Doc from the generated Markdown/HTML. Convert Document to PDF (Google Drive export) Exports the Doc to PDF. Upload report to Slack Sends the PDF (and/or Doc link) to a chosen Slack channel with a short summary. How to set up 1 Prerequisites n8n** (self-hosted or Cloud) Decodo Scraper API** key OpenAI (or compatible) API key** for the Analyzer Agent Google Drive/Docs** credentials (OAuth2) Slack** Bot/User token (files:write, chat:write) 2 Environment variables (recommended) DECODO_API_KEY OPENAI_API_KEY DRIVE_FOLDER_ID (optional default) SLACK_CHANNEL_ID 3 Nodes configuration (high level) Edit Fields (Set node) Scraper API Request (HTTP Request → POST) HTML Response Parser (Code node) Product Analyzer Agent Build Book Purchase Report (Code/LLM) Create Document File Convert to PDF Upload to Slack Requirements Decodo**: Active API key and endpoint access. Be mindful of concurrency/rate limits. Model**: GPT-4o/4.1-mini or similar for reliable structured extraction. Google**: OAuth client (Docs/Drive scopes). Ensure n8n can write to the target folder. Slack**: Bot token with files:write + chat:write. How to customize the workflow Target site: Change targetUrl to any **public page (category, search, or listing). For other domains (not Amazon), tweak the LLM guidance (e.g., price/label patterns). Device emulation**: Switch deviceType to mobile to fetch mobile-optimized markup (often simpler DOMs). Late-loading pages**: Adjust waitFor.selector or use waitUntil: "networkidle" (if supported) to ensure full content loads. Client-side JS**: Extend executeJS if you need to interact (scroll, click “next”, expand sections). You can also loop over pagination by iterating URLs. Extraction schema**: Add fields (e.g., discount_percent, bestseller_badge, prime_eligible) and update the Structured Output schema accordingly. Filtering rules**: Modify recommendation logic (e.g., min ratings count, price bands, languages). Report branding**: Add logo, cover page, footer with company info; switch to HTML + inline CSS for richer Docs formatting. Destinations**: Besides Slack & Drive, add Email, Notion, Confluence, or a database sink. Scheduling: Add a **Cron trigger for weekly/monthly auto-reports.