by Billy Christi
Who is this for? This workflow is perfect for: HR professionals** seeking to automate employee and department management Startups and SMBs** that want an AI-powered HR assistant on Telegram Internal operations teams** that want to simplify onboarding and employee data tracking What problem is this workflow solving? Managing employee databases manually is error-prone and inefficient—especially for growing teams. This workflow solves that by: Enabling natural language-based HR operations directly through Telegram Automating the creation, retrieval, and deletion of employee records in Airtable Dynamically managing related data such as departments and job titles Handling data consistency and linking across relational tables automatically Providing a conversational interface backed by OpenAI for smart decision-making What this workflow does Using Telegram as the interface and Airtable as the backend database, this intelligent HR workflow allows users to: Chat in natural language (e.g. “Show me all employees” or “Create employee: Sarah, Marketing…”) Interpret and route requests via an AI Agent that acts as the orchestrator Query employee, department, and job title data from Airtable Create or update records as needed: Add new departments and job titles automatically if they don’t exist Create new employees and link them to the correct department and job title Delete employees based on ID Respond directly in Telegram, providing user-friendly feedback Setup View & Copy the Airtable base here: 👉 Employee Database Management – Airtable Base Template Telegram Bot: Set up a Telegram bot and connect it to the Telegram Trigger node Airtable: Prepare three Airtable tables: Employees with links to Departments and Job Titles Departments with Name & Description Job Titles with Title & Description Connect your Airtable API key and base/table IDs into the appropriate Airtable nodes Add your OpenAI API key to the AI Agent nodes Deploy both workflows: the main chatbot workflow and the employee creation sub-workflow Test with sample messages like: “Create employee: John Doe, john@company.com, Engineering, Software Engineer” “Remove employee ID rec123xyz” How to customize this workflow to your needs Switch databases**: Replace Airtable with Notion, PostgreSQL, or Google Sheets if desired Enhance security**: Add authentication and validation before allowing deletion Add approval flows**: Integrate Telegram button-based approvals for sensitive actions Multi-language support**: Expand system prompts to support multiple languages Add logging**: Store every user action in a log table for auditability Expand capabilities**: Integrate payroll, time tracking, or Slack notifications Extra Tips This is a two-workflow setup. Make sure the sub-workflow is deployed and accessible from the main agent. Use Simple Memory per chat ID to preserve context across user queries. You can expand the orchestration logic by adding more tools to the main agent—such as “Get active employees only” or “List employees by job title.”
by Incrementors
🛒 Lead Workflow: Yelp & Trustpilot Scraping + OpenAI Analysis via BrightData > Description: Automated lead generation workflow that scrapes business data from Yelp and Trustpilot based on location and category, analyzes credibility, and sends personalized outreach emails using AI. > ⚠️ Important: This template requires a self-hosted n8n instance to run. 📋 Overview This workflow provides an automated lead generation solution that identifies high-quality prospects from Yelp and Trustpilot, analyzes their credibility through reviews, and sends personalized outreach emails. Perfect for digital marketing agencies, sales teams, and business development professionals. ✨ Key Features 🎯 Smart Location Analysis** AI breaks down cities into sub-locations for comprehensive coverage 🛍 Yelp Integration** Scrapes business details using BrightData's Yelp dataset ⭐ Trustpilot Verification** Validates business credibility through review analysis 📊 Data Storage** Automatically saves results to Google Sheets 🤖 AI-Powered Outreach** Generates personalized emails using Claude AI 📧 Automated Sending** Sends emails directly through Gmail integration 🔄 How It Works User Input: Submit location, country, and business category through a form AI Location Analysis: Gemini AI identifies sub-locations within the specified area Yelp Scraping: BrightData extracts business information from multiple locations Data Processing: Cleans and stores business details in Google Sheets Trustpilot Verification: Scrapes reviews and company details for credibility check Email Generation: Claude AI creates personalized outreach messages Automated Outreach: Sends emails to qualified prospects via Gmail 📊 Data Output | Field | Description | Example | |---------------|----------------------------------|----------------------------------| | Company Name | Business name from Yelp/Trustpilot | Best Local Restaurant | | Website | Company website URL | https://example-restaurant.com | | Phone Number | Business contact number | (555) 123-4567 | | Email | Business email address | demo@example.com | | Address | Physical business location | 123 Main St, City, State | | Rating | Overall business rating | 4.5/5 | | Categories | Business categories/tags | Restaurant, Italian, Fine Dining | 🚀 Setup Instructions ⏱️ Estimated Setup Time: 10–15 minutes Prerequisites n8n instance (self-hosted or cloud) Google account with Sheets access BrightData account with Yelp and Trustpilot datasets Google Gemini API access Anthropic API key for Claude Gmail account for sending emails Step 1: Import the Workflow Copy the JSON workflow code In n8n: Workflows → + Add workflow → Import from JSON Paste JSON and click Import Step 2: Configure Google Sheets Integration Create two Google Sheets: Yelp data: Name, Categories, Website, Address, Phone, URL, Rating Trustpilot data: Company Name, Email, Phone Number, Address, Rating, Company About Copy Sheet IDs from URLs In n8n: Credentials → + Add credential → Google Sheets OAuth2 API Complete OAuth setup and test connection Update all Google Sheets nodes with your Sheet IDs Step 3: Configure BrightData Set up BrightData credentials in n8n Replace API token with: BRIGHT_DATA_API_KEY Verify dataset access: Yelp dataset: gd_lgugwl0519h1p14rwk Trustpilot dataset: gd_lm5zmhwd2sni130p Test connections Step 4: Configure AI Models Google Gemini (Location Analysis)** Add Google Gemini API credentials Configure model: models/gemini-1.5-flash Claude AI (Email Generation)** Add Anthropic API credentials Configure model: claude-sonnet-4-20250514 Step 5: Configure Gmail Integration Set up Gmail OAuth2 credentials in n8n Update "Send Outreach Email" node Test email sending Step 6: Test & Activate Activate the workflow Test with sample data: Country: United States Location: Dallas Category: Restaurants Verify data appears in Google Sheets Check that emails are generated and sent 📖 Usage Guide Starting a Lead Generation Campaign Access the form trigger URL Enter your target criteria: Country: Target country Location: City or region Category: Business type (e.g., restaurants) Submit the form to start the process Monitoring Results Yelp Data Sheet:** View scraped business information Trustpilot Sheet:** Review credibility data Gmail Sent Items:** Track outreach emails sent 🔧 Customization Options Modifying Email Templates Edit the "AI Generate Email Content" node to customize: Email tone and style Services mentioned Call-to-action messages Branding elements Adjusting Data Filters Modify rating thresholds Set minimum review counts Add geographic restrictions Filter by business size Scaling the Workflow Increase batch sizes Add delays between requests Use parallel processing Add error handling 🚨 Troubleshooting Common Issues & Solutions 1. BrightData Connection Failed Cause: Invalid API credentials or dataset access Solution: Verify credentials and dataset permissions 2. No Data Extracted Cause: Invalid location or changed page structure Solution: Verify location names and test other categories 3. Gmail Authentication Issues Cause: Expired OAuth tokens Solution: Re-authenticate and check permissions 4. AI Model Errors Cause: API quota exceeded or invalid keys Solution: Check usage limits and API key Performance Optimization Rate Limiting:** Add delays Error Handling:** Retry failed requests Data Validation:** Check for malformed data Memory Management:** Process in smaller batches 📈 Use Cases & Examples 1. Digital Marketing Agency Lead Generation Goal:** Find businesses needing marketing Target:** Restaurants, retail stores Approach:** Focus on good-rated but low-online-presence businesses 2. B2B Sales Prospecting Goal:** Find software solution clients Target:** Growing businesses Approach:** Focus on recent positive reviews 3. Partnership Development Goal:** Find complementary businesses Target:** Established businesses Approach:** Focus on reputation and satisfaction scores ⚡ Performance & Limits Expected Performance Processing Time:** 5–10 minutes/location Data Accuracy:** 90%+ Success Rate:** 85%+ Daily Capacity:** 100–500 leads Resource Usage API Calls:** ~10–20 per business Storage:** Minimal (Google Sheets) Execution Time:** 3–8 minutes/10 businesses Network Usage:** ~5–10MB/business 🤝 Support & Community Getting Help n8n Community Forum:** community.n8n.io Docs:** docs.n8n.io BrightData Support:** Via dashboard Contributing Share improvements Report issues and suggestions Create industry-specific variations Document best practices > 🔒 Privacy & Compliance: Ensure GDPR/CCPA compliance. Always respect robots.txt and terms of service of scraped sites. 🎯 Ready to Generate Leads! This workflow provides a complete solution for automated lead generation and outreach. Customize it to fit your needs and start building your pipeline today! For any questions or support, please contact: 📧 info@incrementors.com or fill out this form: Contact Us
by Ranjan Dailata
Notice Community nodes can only be installed on self-hosted instances of n8n. Who this is for The Legal Case Research Extractor is a powerful automated workflow designed for legal tech teams, researchers, law firms, and data scientists focused on transforming unstructured legal case data into actionable, structured insights. This workflow is tailored for: Legal Researchers automating case law data mining Litigation Support Teams handling large volumes of case records LawTech Startups building AI-powered legal research assistants Compliance Analysts extracting case-specific insights AI Developers working on legal NLP, summarization, and search engines What problem is this workflow solving? Legal case data is often locked in semi-structured or raw HTML formats, scattered across jurisdiction-specific websites. Manually extracting and processing this data is tedious and inefficient. This workflow automates: Extraction of legal case data via Bright Data's powerful MCP infrastructure Parsing of HTML into clean, readable text using Google Gemini LLM Structuring and delivering the output through webhook and file storage What this workflow does Input Set the Legal Case Research URL node is responsible for setting the legal case URL for the data extraction. Bright Data MCP Data Extractor Bright Data MCP Client For Legal Case Research node is responsible for the legal case extraction via the Bright Data MCP tool - scrape_as_html Case Extractor Google Gemini based Case Extractor is responsible for producing a paginated list of cases Loop through Legal Case URLs Receives a collection of legal case links to process Each URL represents a different case from a target legal website Bright Data MCP Scraping Utilizes Bright Data’s scrape_as_html MCP mode Retrieves raw HTML content of each legal case Google Gemini LLM Extraction Transforms raw HTML into clean, structured text Performs additional information extraction if required (e.g., case summary, court, jurisdiction etc.) Webhook Notification Sends extracted legal case content to a configurable webhook URL Enables downstream processing or storage in legal databases Binary Conversion & File Persistence Converts the structured text to binary format Saves the final response to disk for archival or further processing Pre-conditions Knowledge of Model Context Protocol (MCP) is highly essential. Please read this blog post - model-context-protocol You need to have the Bright Data account and do the necessary setup as mentioned in the Setup section below. You need to have the Google Gemini API Key. Visit Google AI Studio You need to install the Bright Data MCP Server @brightdata/mcp You need to install the n8n-nodes-mcp Setup Please make sure to setup n8n locally with MCP Servers by navigating to n8n-nodes-mcp Please make sure to install the Bright Data MCP Server @brightdata/mcp on your local machine. Sign up at Bright Data. Create a Web Unlocker proxy zone called mcp_unlocker on Bright Data control panel. Navigate to Proxies & Scraping and create a new Web Unlocker zone by selecting Web Unlocker API under Scraping Solutions. In n8n, configure the Google Gemini(PaLM) Api account with the Google Gemini API key (or access through Vertex AI or proxy). In n8n, configure the credentials to connect with MCP Client (STDIO) account with the Bright Data MCP Server as shown below. Make sure to copy the Bright Data API_TOKEN within the Environments textbox above as API_TOKEN=<your-token> How to customize this workflow to your needs Target New Legal Portals Modify the legal case input URLs to scrape from different state or federal case databases Customize LLM Extraction Modify the prompt to extract specific fields: case number, plaintiff, case summary, outcome, legal precedents etc. Add a summarization step if needed Enhance Loop Handling Integrate with a Google Sheet or API to dynamically fetch case URLs Add error handling logic to skip failed cases and log them Improve Security & Compliance Redact sensitive information before sending via webhook Store processed case data in encrypted cloud storage Output Formats Save as PDF, JSON, or Markdown Enable output to cloud storage (S3, Google Drive) or legal document management systems
by Jay Emp0
🤖 MCP Personal Assistant Workflow Description This workflow integrates multiple productivity tools into a single AI-powered assistant using n8n, acting as a centralized control hub to receive and execute tasks across Google Calendar, Gmail, Google Drive, LinkedIn, Twitter, and more. ✅ Key Capabilities AI Agent + Tool Use**: Built using n8n's AI Agent and MCP system, enabling intelligent multi-step reasoning. Tool Integration**: Google Calendar: schedule, update, delete events Gmail: search, draft, send emails Google Drive: manage files and folders LinkedIn & Twitter: post updates, send DMs Utility tools: fetch date/time, search URLs Discord Input**: Accepts prompts via n8n_discord_trigger_bot repo link 🛠 Setup Instructions Timezone Configuration: Go to Settings > Default Timezone in n8n. Set to your local timezone (e.g., Asia/Jakarta). Ensure all Date & Time nodes explicitly use the same zone to avoid UTC-related bugs. Tool Authentication: Replace all OAuth credentials for: Gmail Google Drive Google Calendar Twitter LinkedIn Use your own accounts when copying this workflow. Platform Adaptability: While designed for Discord, you can replace the Discord trigger with any other chat or webhook service. Example: Telegram, Slack, WhatsApp Webhook, n8n Form Trigger, etc. 📦 Strengths Great for document retrieval, email summarization, calendar scheduling, and social posting. Reduces the need for tab-switching across multiple platforms. Tested with a comprehensive checklist across categories like: Calendar Gmail Google Drive Twitter LinkedIn Utility tools Cross-tool actions (Refer to discordGPT prompt checklist for prompt coverage.) ⚠️ Limitations ❌ Binary Uploads: AI agents & MCP server currently struggle with binary payloads. Uploading files to Gmail, Google Drive, or LinkedIn may fail due to format serialization issues. Binary operations (upload/post) are under development and will be fixed in future iterations. ❌ Date Bugs: If timezone settings are incorrect, event times may default to UTC, leading to misaligned calendar events. 🔬 Testing Use the provided prompt checklist for full coverage of: ✅ Core feature flows ✅ Edge cases (e.g., invalid dates, nonexistent users) ✅ Cross-tool chains (e.g., Google Drive → Gmail → LinkedIn) ✅ MCP Assistant Test Prompt Checklist 📅 Google Calendar [X] "Schedule a meeting with Alice tomorrow at 10am. and send an invite to alice@wonderland.com" [X] "Create an event called 'Project Sync' on Friday at 3pm with Bob and Charlie." [X] "Update the time of my call with James to next Monday at 2pm." [X] "Delete my meeting with Marketing next Wednesday." [x] "What is my schedule tommorow ? " 📧 Gmail [x] "Show me unread emails from this week." [x] "Search for emails with subject: invoice" [X] "Reply to the latest email from john@company.com saying 'Thanks, noted!'" [X] "Draft an email to info@a16z.com with subject 'Emp0 Fundraising' and draft the body of the email with an investment opportunity in Emp0, scrape this site https://Emp0.com to get to know more about emp0.com" [X] "Send an email to hi@cursor.com with subject 'Feature request' and cc sales@cursor.com" [ ] "Send an email to recruiting@openai.com , write about how you like their product and want to apply for a job there and attach my latest CV from Google Drivce" 🗂 Google Drive [ ] "Upload the PDF you just sent me to my Google Drive." [X] "Create a folder called 'July Reports' inside Emp0 shared drive." [X] "Move the file named 'Q2_Review.pdf' to 'Reports/2024/Q2'." [X] "Share the folder 'Investor Decks' with info@a16z.com as viewer." [ ] "Download the file 'Wayne_Li_CV.pdf' and attach it in Discord." [X] "Search for a file named 'Invoice May' in my Google Drive." 🖼 LinkedIn [X] "Think of a random and inspiring quote. Post a text update on LinkedIn with the quote and end with a question so people will answer and increase engagement" [ ] "Post this Google Drive image to LinkedIn with the caption: 'Team offsite snapshots!'" [X] "Summarize the contents of this workflow and post it on linkedin with the original url https://n8n.io/workflows/5230-content-farming-ai-powered-blog-automation-for-wordpress/" 🐦 Twitter [X] "Tweet: 'AI is eating operations. Fast.'" [X] "Send a DM to @founderguy: 'Would love to connect on what you’re building.'" [X] "Search Twitter for keyword: 'founder advice'" 🌐 Utilities [X] "What time is it now?" [ ] "Download this PDF: https://ontheline.trincoll.edu/images/bookdown/sample-local-pdf.pdf" [X] "Search this URL and summarize important tech updates today: https://techcrunch.com/feed/" 📎 Discord Attachments [ ] "Take the image I just uploaded and post it to LinkedIn." [ ] "Get the file from my last message and upload it to Google Drive." 🧪 Edge Cases [X] "Schedule a meeting on Feb 30." [X] "Send a DM to @user_that_does_not_exist" [ ] "Download a 50MB PDF and post it to LinkedIn" [X] "Get the latest tweet from my timeline and email it to myself." 🔗 Cross-tool Flows [ ] "Get the latest image from my Google Drive and post it on LinkedIn with the caption 'Another milestone hit!'" [ ] "Find the latest PDF report in Google Drive and email it to investor@vc.com." [ ] "Download an image from this link and upload it to my Google Drive: https://example.com/image.png" [ ] "Get the most recent attachment from my inbox and upload it to Google Drive." Run each of these in isolated test cases. For cross-tool flows, verify binary serialization integrity. 🧠 Why Use This Workflow? This is an always-on personal assistant that can: Process natural language input Handle multi-step logic Execute commands across 6+ platforms Be extended with more tools and memory If you want to interact with all your work tools from a single prompt—this is your base to start. 📎 Repo & Credits Discord bot trigger: n8n_discord_trigger_bot Creator: Jay (Emp₀)
by Lucas Perret
Who this is for This workflow is for sales people who want to quickly and efficiently follow up with their leads What this workflow does This workflow starts every time a new reply is received in lemlist. It then classifies the response using openAI and creates the correct follow up task. The follow-up tasks currently include: Slack alerts when a lead for each new replies Tag interested leads in lemlist Unsubscription of leads when they request it The Slack alerts include: Lead email address Sender email address Reply type (positive, not interested...etc) A preview of the reply Setup To set this template up, simply follow the stickies steps in it How to customize this workflow to your needs Adjust the follow up tasks to your needs Change the Slack notification to your needs ...
by Kumar Shivam
Complete AI Product Description Generator Transforms product images into high-converting copy with GPT-4o Vision + Claude 3.5 The Shopify AI Product Description Factory is a production-grade n8n workflow that converts product images and metadata into refined, SEO-aware descriptions—fully automated and region-agnostic. It blends GPT-4o vision for visible attribute extraction, Claude 3.5 Sonnet for premium copy, Perplexity research for verified brand context, Google Sheets for orchestration and audit trails, plus automated daily sales analytics enrichment. Link-header pagination and structured output enforcement ensure reliable scale. To refine according to your usecase connect via my profile @connect Key Advantages Vision-first copywriting Uses gpt-4o to identify only visible physical attributes (closure, heel, materials, sole) from product images—no guesses. Premium copy generation anthropic/claude-3.5-sonnet crafts concise, benefit-led descriptions with consistent tone, length control, and clean formatting. Research-assisted accuracy perplexityTool verifies vendor/brand context from official sources to avoid speculation or fabricated claims. Pagination you can trust Automates Shopify REST pagination via Link headers and persists page_info for resumable runs. Google Sheets orchestration Centralized staging, status tracking, and QA in Products, with ProcessingState for batch/page markers, and Error_log for diagnostics. Bulletproof error feedback errorTrigger + AI diagnosis logs clear, non-technical and technical explanations to Error_log for fast recovery. Automated sales analytics Daily sales tracking automatically captures and enriches total sales data for comprehensive business intelligence and performance monitoring. How It Works Intake and filtering httpRequest fetches /admin/api/2024-04/products.json?limit=200&{page_info} code filters only items with: Image present Empty body_html The currSeas:SS2025 tag Extracts tag metadata such as x-styleCode, country_of_origin, and gender when available Pagination controller code parses Link headers for rel="next" and extracts page_info googleSheets updates ProcessingState with page_info_next and increments the batch number for resumable polling Generation pipeline googleSheets pulls rows with Status = Ready for AI Description; limit throttles batch size openAi Analyze image (model gpt-4o) returns strictly visible features lmChatOpenRouter (Claude 3.5) composes the SEO description, optionally blending verified vendor context from perplexityTool outputParserStructured guarantees strict JSON: product_id, product_title (normalized), generated_description, status googleSheets writes results back to Products for review/publish Sales analytics enrichment Schedule Trigger** runs daily at 2:01 PM to capture previous day's sales httpRequest fetches paid orders from Shopify REST API with date range filtering splitOut and summarize nodes calculate total daily sales Automatic Google Sheets logging with date stamps and totals Zero-sale days are properly recorded for complete analytics continuity Reliability and insight errorTrigger routes failures to an AI agent that explains the root cause and appends a concise note to Error_log. What's Inside (Node Map) Data + API httpRequest (Shopify REST 2024-04 for products and orders) googleSheets (multiple sheet operations) googleSheetsTool (error logging) AI models openAi (gpt-4o vision analysis) lmChatOpenRouter (anthropic/claude-3.5-sonnet for content generation) AI Agent** (intelligent error diagnosis) Analytics & Processing splitOut (order data processing) summarize (sales totals calculation) set nodes (data field mapping) Tools and guards perplexityTool (brand research) outputParserStructured (JSON validation) memoryBufferWindow (conversation context) Control & Scheduling scheduleTrigger (multiple time-based triggers) cron (periodic execution) limit (batch size control) if (conditional logic) code (custom filtering and pagination logic) Observability errorTrigger + AI diagnosis to Error_log Processing state tracking Sales analytics logging Content & Compliance Rules Locale-agnostic copy**; brand voice is configurable per store Only image-verifiable attributes** (no guesses); clean HTML suitable for Shopify themes Optional normalization rules (e.g., color/branding cleanup, title sanitization) Style code inclusion supported when x-styleCode is present Gender-aware content generation when gender tag is present Strict JSON output** and schema consistency for safe downstream publishing Setup Steps Core integrations Shopify Access Token** — Products read + Orders read (REST 2024-04) OpenAI API** — gpt-4o vision OpenRouter API** — Claude Sonnet (3.5) Perplexity API** — vendor/market verification via perplexityTool Google Sheets OAuth** — Products, ProcessingState, Error_log, Sales analytics Configure sheets ProcessingState** with fields: batch number page_info_next Products** with: Product ID Product Title Product Type Vendor Image url Status country of origin x_style_code gender Generated Description Error_log** with: timestamp Reason of Error Sales Analytics Sheet** with: Date Total Sales Workflow Capabilities Discovery and staging Auto-paginate Shopify; stage eligible products in Sheets with reasons and timestamps. Vision-grounded copywriting Descriptions reflect only visible attributes plus verified brand context; concise, mobile-friendly structure with gender-aware tone. Metadata awareness Auto-injects x-styleCode, country_of_origin, and gender when present; natural SEO for brand and product type. Sales intelligence Automated daily sales tracking with Melbourne timezone support, handles zero-sale days, and maintains complete historical records. Error analytics Layman + technical diagnosis logged to Error_log to shorten MTTR. Safe output Structured JSON via outputParserStructured for predictable row updates. Credentials Required Shopify Access Token** (Products + Orders read permissions) OpenAI API Key** (GPT-4o vision) OpenRouter API Key** (Claude Sonnet) Perplexity API Key** Google Sheets OAuth** Ideal For E-commerce teams** scaling compliant, on-brand product copy with comprehensive sales insights Agencies and SEO specialists** standardizing image-grounded descriptions with performance tracking and analytics Stores** needing resumable pagination, auditable content operations, and automated daily sales reporting in Sheets Advanced Features Dual-workflow architecture**: Content generation + Sales analytics in one system Link-header pagination with page_info persistence in ProcessingState Title/content normalization (e.g., color removal) configurable per brand Gender-aware copywriting** based on product tags Memory windows (memoryBufferWindow) to keep multi-step prompts consistent Melbourne timezone support** for accurate daily sales cutoffs Zero-sales handling** ensures complete analytics continuity Structured Output enforcement for downstream safety AI-powered error diagnosis** with technical and layman explanations Time & Scheduling (Universal) The workflow includes two independent schedules: Content Generation**: Every 5 minutes (configurable) for product processing Sales Analytics**: Daily at 2:01 PM Melbourne time for previous day's sales For globally distributed teams, schedule triggers and timestamps can be standardized on UTC to avoid regional drift. Pro Tip Start with small batches (limit set to 10 or fewer) to validate both copy generation and sales tracking flows. The workflow handles dual operations independently - content generation failures won't affect sales analytics and vice versa. Monitor the Error_log sheet for any issues and use the ProcessingState sheet to track pagination progress.
by Khairul Muhtadin
Tesseract - Money Mate Workflow Description Disclaimer: This template requires the n8n-nodes-tesseractjs community node, which is only available on self-hosted n8n instances. You’ll need a self-hosted n8n setup to use this workflow. Who is this for? This workflow is designed for individuals, freelancers, or small business owners who want an easy way to track expenses using Telegram. It’s ideal for anyone looking to digitize receipts—whether from photos or text messages—using free tools, without needing advanced technical skills. What problem does this workflow solve? Manually entering receipt details into a spreadsheet or app is time-consuming and prone to mistakes. This workflow automates the process by extracting information from receipt images or text messages sent via Telegram, categorizing expenses, and sending back a clear, formatted summary. It saves time, reduces errors, and makes expense tracking effortless. What this workflow does The workflow listens for messages sent to a Telegram bot, which can be either text descriptions of expenses or photos of receipts. If a photo is sent, Tesseract (an open-source text recognition tool) extracts the text. If text is sent, it’s processed directly. An AI model (LLaMA via OpenRouter) analyzes the input, categorizes it into expense types (e.g., Food & Beverages, Household, Transport), and creates a structured summary including store name, date, items, total, and category. The summary is then sent back to the user’s Telegram chat. Setup Instructions Follow these step-by-step instructions to set up the workflow. No advanced technical knowledge is required, but you’ll need a self-hosted n8n instance. Set Up a Self-Hosted n8n Instance: If you don’t have n8n installed, follow the n8n self-hosting guide to set it up. You can use platforms like Docker or a cloud provider (e.g., DigitalOcean, AWS). Ensure your n8n instance is running and accessible via a web browser. Install the Tesseract Community Node: In your n8n instance, go to Settings > Community Nodes in the sidebar. Click Install a Community Node, then enter n8n-nodes-tesseractjs in the search bar. Click Install and wait for confirmation. This node enables receipt image processing. If you encounter issues, check the n8n community nodes documentation for troubleshooting. Create a Telegram Bot: Open Telegram and search for @BotFather to start a new bot. Send /start to BotFather, then /newbot to create your bot. Follow the prompts to name your bot (e.g., “MoneyMateBot”). BotFather will provide a Bot Token (e.g., 23872837287:ExampleExampleExample). Copy this token. In n8n, go to Credentials > Add Credential, select Telegram API, and paste the token. Name the credential (e.g., “MoneyMateBot”) and save. Set Up OpenRouter for AI Processing: Sign up for a free account at OpenRouter. In your OpenRouter dashboard, generate an API Key under the API section. In n8n, go to Credentials > Add Credential, select OpenRouter API, and paste the API key. Name it (e.g., “OpenRouter Account”) and save. The free tier of OpenRouter’s LLaMA model is sufficient for this workflow. Import and Configure the Workflow: Download the workflow JSON file (provided separately or copy from the source). In n8n, go to Workflows > Import Workflow and upload the JSON file. Open the imported workflow (“Tesseract - Money Mate”). Ensure the Telegram Trigger and Send Expense Summary nodes use the Telegram credential you created. Ensure the AI Analyzer node uses the OpenRouter credential. Save the workflow. Test the Workflow: Activate the workflow by toggling the Active switch in n8n. In Telegram, find your bot (e.g., @MoneyMateBot) and send /start. Test with a sample input (see “Example Inputs” below). Check the n8n workflow execution panel to ensure data flows correctly. If errors occur, double-check credentials and node connections. Activate for Continuous Use: Once tested, keep the workflow active in n8n. Your bot will now process any text or image sent to it via Telegram. Example Inputs/Formats To help the workflow process your data accurately, use clear and structured inputs. Below are examples of valid inputs: Text Input Example: Send a message to your Telegram bot like this: Bought coffee at Starbucks, Jalan Sudirman, yesterday. Total Rp 50,000. 2 lattes, each Rp 25,000. Expected Output: hello [Your Name] Ini Rekap Belanjamu 📋 Store: Starbucks 📍 Location: Jalan Sudirman 📅 Date: 2025-05-26 🛒 Items: Latte: Rp 25,000 Latte: Rp 25,000 💸 Total: Rp 50,000 📌 Category: Food & Beverages Image Input Example: Upload a photo of a receipt to your Telegram bot. The receipt should contain: Store name (e.g., “Alfamart”) Address (e.g., “Jl. Gatot Subroto, Jakarta”) Date and time (e.g., “27/05/2025 14:00”) Items with prices (e.g., “Bread Rp 15,000”, “Milk Rp 20,000”) Total amount (e.g., “Total: Rp 35,000”) Expected Output: hello [Your Name] Ini Rekap Belanjamu 📋 Store: Alfamart 📍 Location: Jl. Gatot Subroto, Jakarta 📅 Date: 2025-05-27 14:00 🛒 Items: Bread: Rp 15,000 Milk: Rp 20,000 💸 Total: Rp 35,000 📌 Category: Household Tips for Images: Ensure the receipt is well-lit and text is readable. Avoid blurry or angled photos for better Tesseract accuracy. How to Customize This Workflow Change Expense Categories: In the **AI Categorizer node, edit the prompt to include custom categories (e.g., add “Entertainment” or “Utilities” to the list: Food & Beverages, Household, Transport). Modify Response Format: In the **Format Summary Message node, adjust the JavaScript code to change how the summary looks (e.g., add emojis, reorder fields). Save to a Database: Add a node (e.g., Google Sheets or PostgreSQL) after the **Format Summary Message node to store summaries. Support Other Languages: In the **AI Categorizer node, update the prompt to handle additional languages (e.g., Spanish, Mandarin) by specifying them in the instructions. Add Error Handling: Enhance the **Check Invalid Input node to catch more edge cases, like invalid dates. All Free, End-to-End This workflow is 100% free! It leverages: Telegram Bot API**: Free via BotFather. Tesseract**: Open-source text recognition. LLaMA via OpenRouter**: Free tier available for AI processing. Enjoy automating your expense tracking without any cost! Made by: khmuhtadin Need a custom? contact me on LinkedIn or Web
by Jimleuk
This n8n template demonstrates a simple approach to using AI to automate the generation of blog content which aligns to your organisation's brand voice and style by using examples of previously published articles. In a way, it's quick and dirty "training" which can get your automated content generation strategy up and running for very little effort and cost whilst you evaluate our AI content pipeline. How it works In this demonstration, the n8n.io blog is used as the source of existing published content and 5 of the latest articles are imported via the HTTP node. The HTML node is extract the article bodies which are then converted to markdown for our LLMs. We use LLM nodes to (1) understand the article structure and writing style and (2) identify the brand voice characteristics used in the posts. These are then used as guidelines in our final LLM node when generating new articles. Finally, a draft is saved to Wordpress for human editors to review or use as starting point for their own articles. How to use Update Step 1 to fetch data from your desired blog or change to fetch existing content in a different way. Update Step 5 to provide your new article instruction. For optimal output, theme topics relevant to your brand. Requirements A source of text-heavy content is required to accurately breakdown the brand voice and article style. Don't have your own? Maybe try your competitors? OpenAI for LLM - though I recommend exploring other models which may give subjectively better results. Wordpress for blog but feel free to use other preferred publishing platforms. Customising this workflow Ideally, you'd want to "train" your agent on material which is similar to your output ie. your social media post may not get the best results from your blog content due to differing formats. Typically, this brand voice extraction exercise should run once and then be cached somewhere for reuse later. This would save on generation time and overall cost of the workflow.
by Incrementors
Description Submit up to 3 YouTube video URLs using a simple form and the workflow handles everything automatically. It fetches each video's title, channel, views, and duration from YouTube, submits each video to WayinVideo for accurate speaker-labeled transcription, then sends the transcript to GPT-4o-mini for a 6-field analysis tailored to your niche. Every video is logged to Google Sheets and a single Gmail report arrives sorted by relevance score when all videos are processed. Built for content marketers, SEO strategists, and research teams who want structured intelligence from YouTube videos — not just auto-captions. What This Workflow Does Fetches real YouTube metadata** — Pulls title, channel name, view count, duration, and publish date from the YouTube Data API for each video submitted Transcribes with speaker labels** — Submits each video to WayinVideo for accurate transcription grouped by speaker, not just a flat block of auto-captions Falls back to video description** — If the transcript is empty or too short, the workflow automatically uses the video description so the analysis never fails silently Scores each video for your niche** — GPT-4o-mini rates every video from 1–10 on relevance to your specific industry so you know which videos are worth acting on Identifies competitor content gaps** — For every video, GPT surfaces one thing the video did not cover that would make it more useful for your niche — ready to use as a content brief Logs every video to Google Sheets** — Appends a 15-column row per video with metadata, summary, key topics, best quote, target audience, and relevance score Sends one Gmail report sorted by relevance** — All analyzed videos arrive in a single email ranked from most to least relevant to your niche Setup Requirements Tools Needed n8n instance (self-hosted or cloud) Google Cloud account with YouTube Data API v3 enabled WayinVideo account with API access OpenAI account with GPT-4o-mini API access Google Sheets (one sheet with a tab named YouTube Intelligence) Gmail account (the account you want to receive the report) Credentials Required YouTube Data API key (pasted into 2. Set — Config Values) WayinVideo API key (pasted into 2. Set — Config Values) OpenAI API key Google Sheets OAuth2 Gmail OAuth2 Estimated Setup Time: 15–20 minutes Step-by-Step Setup Import the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import Get your YouTube Data API key — Go to console.cloud.google.com → create or open a project → enable the YouTube Data API v3 → go to Credentials → Create API Key → copy the key Get your WayinVideo API key — Log in to your WayinVideo account → go to Account Settings → copy your API key Fill in Config Values — Open node 2. Set — Config Values → replace all placeholders: | Field | What to enter | |---|---| | PASTE_YOUR_YOUTUBE_DATA_API_KEY_HERE | Your YouTube Data API key from step 2 | | PASTE_YOUR_WAYINVIDEO_API_KEY_HERE | Your WayinVideo API key from step 3 | | PASTE_YOUR_GOOGLE_SHEET_ID_HERE | The ID from your Google Sheet URL (the string between /d/ and /edit) | | PASTE_YOUR_EMAIL_HERE | The email address where the Gmail report should be sent | | PASTE_YOUR_NAME_HERE | Your name for the email greeting and sign-off | | yourNiche | Your industry or focus area (default: SEO and digital marketing) — change to match your niche e.g. personal injury law, medical aesthetics, e-commerce | Connect OpenAI — Open node 14. OpenAI — GPT-4o-mini Model → click the credential dropdown → add your OpenAI API key → test the connection Create your Google Sheet tab — Open your Google Sheet → add a tab named exactly YouTube Intelligence → add these 15 column headers in row 1: Date, Video URL, Title, Channel, Views, Duration, Published, Summary, Key Topics, Best Quote, Target Audience, Relevance Score, Content Gap, Submitted By, Logged At Connect Google Sheets — Open node 17. Google Sheets — Log Video Analysis → click the credential dropdown → add Google Sheets OAuth2 → sign in with your Google account → authorize access Connect Gmail — Open node 20. Gmail — Send Intelligence Report → click the credential dropdown → add Gmail OAuth2 → sign in with the Gmail account that matches your email address → authorize access Activate the workflow — Toggle the workflow to Active → copy the Form URL from node 1. Form — YouTube Video Intelligence → open it in a browser to submit your first videos How It Works (Step by Step) Step 1 — Form: YouTube Video Intelligence You open the form URL in a browser and paste up to 3 YouTube video URLs. Only Video 1 is required — Videos 2 and 3 can be left blank. Your name is optional. Submitting the form starts the workflow. Step 2 — Set: Config Values Your YouTube API key, WayinVideo API key, Google Sheet ID, recipient email, sender name, niche, and all three video URLs are stored here. Today's date is auto-generated. Your name is also captured from the form. Step 3 — Code: Extract Video IDs The three URL fields are filtered — any blank entries or non-YouTube links are removed. Valid YouTube URLs (both youtube.com/watch?v= and youtu.be/ formats) are parsed to extract the video ID. Each valid video becomes its own separate entry so the rest of the workflow processes each video independently. If no valid YouTube URLs are found, the workflow stops with a clear error. Step 4 — HTTP: Fetch YouTube Metadata A request is sent to the YouTube Data API v3 for each video ID. It retrieves the video's snippet (title, channel, description, publish date), statistics (view count), and content details (duration in ISO 8601 format). If the video is private or does not exist, the workflow stops with an error for that video. Step 5 — Code: Process Video Metadata The ISO 8601 duration (e.g. PT1H23M45S) is converted into a readable format (e.g. 1h 23m 45s). The view count is formatted with comma separators (e.g. 1,234,567). The publish date is formatted as day-month-year. All metadata is packaged for the transcription step. Step 6 — HTTP: Submit Transcription Task Each video URL is submitted to the WayinVideo transcription API with the target language set to English. WayinVideo returns a task ID confirming the transcription job was accepted and is processing. Step 7 — Code: Save Transcript Task ID The WayinVideo task ID is saved along with all video metadata. A poll counter is initialized at zero to track how many times the transcript status has been checked. Step 8 — Wait: 45 Seconds The workflow pauses for 45 seconds before checking the transcription status for the first time, giving WayinVideo time to begin processing. Step 9 — HTTP: Poll Transcript Results A GET request checks the WayinVideo results endpoint using the task ID. It returns the current status and, once complete, the full transcript with speaker labels and text segments. Step 10 — Code: Check Transcript Status The poll counter is incremented and the status is evaluated. If SUCCEEDED, the transcript segments are grouped by speaker into readable text (e.g. Speaker A: text here). The transcript is capped at 5,000 characters. If the transcript is empty or under 50 characters, the workflow uses the video description as a fallback with a clear label. FAILED throws an error and stops. Still processing continues the loop. If 15 polls pass without success (approximately 11 minutes), the workflow times out. Step 11 — IF: Transcript Ready? This is the transcription gate. If the transcript is ready (YES path), the workflow moves to AI analysis. If still processing (NO path), the workflow routes to 12. Set — Still Processing Loop Back which carries all the video data forward and loops back to 8. Wait — 45 Seconds for another cycle. Step 12 — Set: Still Processing Loop Back This step preserves all video metadata and config values while looping back to the wait step. This is necessary because the wait step resets the context — all fields are explicitly re-set here so nothing is lost between polling cycles. Step 13 — AI Agent: Analyze Video GPT-4o-mini receives the video metadata and transcript. It returns six structured fields: a 3–4 sentence summary of what the video covers, an array of 5 key topics, the single most memorable quote from the transcript, a one-sentence description of who the video is best for, a relevance score from 1–10 for your specific niche, and one content gap the video missed that would be valuable for your niche audience. Step 14 — OpenAI: GPT-4o-mini Model This is the language model powering the analysis. It runs at temperature 0.2 for consistent, factual output and is capped at 600 tokens to keep analyses concise and costs low. Step 15 — Parser: Structured Video Analysis This step enforces the exact six-field schema GPT-4o-mini must return. It validates that all required fields are present and correctly typed before results move forward. Step 16 — Code: Prepare Results The AI output is merged with all video metadata. The relevance score is formatted as "X out of 10 — High/Medium/Low" using the labels High (8–10), Medium (5–7), and Low (1–4). The key topics array is joined as a comma-separated string for the sheet column. A logged-at timestamp is generated. Step 17 — Google Sheets: Log Video Analysis One row is appended to your YouTube Intelligence tab with all 15 columns populated. Step 18 — IF: Last Video? After each video is logged, this check reads the isLastVideo flag. If true (YES path — all videos processed), the workflow moves to build and send the Gmail report. If false (NO path — more videos still processing), the workflow routes to 21. Set — More Videos and continues. Step 19 — Code: Build Gmail Report All processed video results are collected and sorted by relevance score from highest to lowest. The email subject includes the number of videos analyzed and today's date. The body includes a full breakdown for each video: title, channel, view count, duration, publish date, URL, relevance score, summary, key topics, best quote, target audience, and content gap. Step 20 — Gmail: Send Intelligence Report The complete report is sent to your email address. One email covers all videos, sorted by relevance, with no attribution footer. Key Features ✅ Real YouTube metadata — Title, channel, views, duration, and publish date are pulled directly from the YouTube Data API — not scraped or guessed ✅ Speaker-labeled transcription — WayinVideo groups the transcript by speaker so GPT receives structured dialogue, not a wall of undifferentiated text ✅ Transcript fallback to description — If WayinVideo returns an empty transcript, the video description is used automatically so no video analysis ever fails silently ✅ Niche-specific relevance scoring — You set your niche once in Config Values and every video is scored on how useful it is specifically for that industry ✅ Content gap per video — Every analysis includes one thing the video missed — ready to use as a content brief or competitive edge ✅ Retry loop with 11-minute timeout — The workflow polls every 45 seconds for up to 15 attempts before stopping — long videos never hang the workflow indefinitely ✅ Gmail report sorted by relevance — All videos arrive ranked from most to least relevant so you always know which one to act on first ✅ Permanent research library in Sheets — Every video you submit is logged permanently — over time you build a searchable database of analyzed YouTube content sorted by niche relevance Customisation Options Change your niche between submissions — In node 2. Set — Config Values, update yourNiche before each batch submission to score videos against a different industry — useful for agencies analyzing videos for multiple client verticals in one workflow instance. Increase the polling timeout for very long videos — In node 10. Code — Check Transcript Status, change pollCount >= 15 to pollCount >= 25 to allow up to approximately 19 minutes for transcription — useful for videos over 60 minutes long. Add a Slack notification when the report is ready — After node 20. Gmail — Send Intelligence Report, add a Slack step that posts the top-scoring video title, relevance score, and the content gap to a #content-team or #research channel so your team sees the headline insight immediately. Filter to only high-relevance videos in the email — In node 19. Code — Build Gmail Report, add a filter before sorting: const sorted = [...allItems].filter(v => v.rawScore >= 7).sort(...) to include only videos scoring 7 or above in the email — keeping the report focused on the most actionable content. Log to a separate sheet tab per niche — In node 2. Set — Config Values, make sheetName dynamic by appending your niche value (e.g. YouTube Intelligence — SEO) so different niche batches automatically log to their own dedicated tabs. Troubleshooting Form submission not starting the workflow: Confirm the workflow is Active — inactive workflows do not receive form submissions Copy the Form URL fresh from node 1. Form — YouTube Video Intelligence after activating Make sure at least one URL is a valid YouTube link — node 3. Code — Extract Video IDs filters out any URL that does not contain youtube.com or youtu.be YouTube API returning no video data: Confirm PASTE_YOUR_YOUTUBE_DATA_API_KEY_HERE in node 2. Set — Config Values is replaced with your actual API key Make sure the YouTube Data API v3 is enabled in your Google Cloud project — go to console.cloud.google.com → APIs and Services → Library → search YouTube Data API v3 → Enable Private, unlisted, or deleted videos will return no results — the workflow throws an error for these and stops cleanly WayinVideo transcription timing out or failing: If the polling loop times out after 15 polls (approximately 11 minutes), check your WayinVideo dashboard to see if the job is still processing or failed on their end Confirm PASTE_YOUR_WAYINVIDEO_API_KEY_HERE in node 2. Set — Config Values is your actual WayinVideo API key Very long videos (over 90 minutes) may exceed the 11-minute timeout — increase the poll limit in node 10. Code — Check Transcript Status from 15 to 20 for longer content OpenAI not generating the analysis: Confirm the API key is connected in node 14. OpenAI — GPT-4o-mini Model and your account has available credits Check the execution log of node 13. AI Agent — Analyze Video for the raw GPT response If the schema parser in node 15. Parser — Structured Video Analysis is throwing errors, GPT returned an unexpected format — re-run the submission to see if the issue is consistent Google Sheets not logging rows or Gmail not arriving: Confirm the Google Sheets OAuth2 credential in node 17. Google Sheets — Log Video Analysis is connected and not expired Check that PASTE_YOUR_GOOGLE_SHEET_ID_HERE is replaced with the actual sheet ID from the URL — not the full URL Confirm the tab is named YouTube Intelligence exactly and all 15 column headers in row 1 match exactly For Gmail, confirm the OAuth2 credential in node 20. Gmail — Send Intelligence Report is connected and check your spam folder on the first send Support Need help setting this up or want a custom version built for your team or agency? 📧 Email: info@incrementors.com 🌐 Website: https://www.incrementors.com/
by WeblineIndia
AI Proposal Comparison & Gap Analysis Workflow for Salesforce CRM This workflow automatically analyzes newly uploaded proposals by comparing them with past winning proposals using AI. It extracts proposal content, identifies the client, fetches reference data from Google Sheets and generates actionable insights. These insights are saved in Salesforce and shared on Slack for team visibility. Quick Implementation Steps Connect Google Drive, Google Sheets, Salesforce, Slack and Groq AI credentials in your n8n account. Set your Google Drive folder to monitor proposal uploads. Ensure your Google Sheet contains winning proposals with status = Won. Activate the workflow. Upload a proposal file to trigger analysis automatically. What It Does This workflow automates the process of analyzing business proposals by leveraging AI and historical data. When a new proposal file is uploaded to a specific Google Drive folder, the workflow downloads and extracts its content. It then identifies the client name using a simple pattern from the text. At the same time, the workflow fetches past winning proposals from a Google Sheets database filtered by status. Both the current and past proposals are combined and sent to an AI model for comparison. The AI generates concise insights highlighting missing elements, weak positioning, pricing gaps and improvement suggestions. Finally, the insights are formatted and stored in Salesforce as an Opportunity record. A notification is sent to Slack, ensuring the team is informed and can act quickly to improve proposal quality. Who It's For Sales teams managing multiple proposals Business development professionals Proposal review and strategy teams Organizations using Salesforce CRM Teams looking to improve win rates using AI Requirements n8n account (self-hosted or cloud) Google Drive account (with folder for proposals) Google Sheets account (with winning proposals data) Salesforce account (Opportunity access enabled) Slack workspace (channel for notifications) Groq API credentials (for AI model access) How It Works & Set Up 1. Setup Google Drive Trigger Configure New Proposal Upload Trigger Select the folder where proposals will be uploaded Event: fileCreated 2. Download and Extract Proposal Use Download Proposal node to fetch file Use Read Proposal Text node to extract content 3. Extract Client Information Use Extract Client Info (Code node) Extract clientName using regex from text Store full proposal as currentProposal 4. Fetch Winning Proposals Configure Get Winning Proposal Data (Knowledge Base) Connect Google Sheet Filter where status = Won 5. Combine Data Use Combine Proposal Data (Merge node) Combine current proposal and past proposal 6. AI Analysis Use AI Proposal Gap Analyzer Provide prompt to compare proposals Generate structured insights (8–10 bullet points) 7. Format Output Use Format Analysis Output Map clientName and analysisSummary 8. Save to Salesforce Use Save Insights to Salesforce Create Opportunity Add insights in description 9. Prepare Final Output Use Prepare Final Output (Merge node) 10. Add Delay (Optional Control) Use Wait for Save node (2 seconds delay) 11. Send Slack Notification Use Send Notification to Slack Send formatted message with insights How To Customize Nodes Extract Client Info:** Modify regex if proposal format changes Google Sheets Node:** Change filter or add more columns AI Prompt:** Customize output format or analysis depth Salesforce Node:** Change stage, fields or object type Slack Node:** Update message format or channel Wait Node:** Adjust delay time if needed Add-ons Add email notification (Gmail node) Store results in Google Sheets for history Add error handling with IF node Add multiple proposal comparison logic Integrate dashboard (Notion, Airtable, etc.) Use Case Examples Improving proposal quality before client submission Training new sales team members using past wins Automating proposal review workflows Identifying common gaps in losing proposals Tracking proposal insights in CRM There can be many more use cases depending on how you extend this workflow. Troubleshooting Guide | Issue | Possible Cause | Solution | | --------------------------- | ------------------------------ | ----------------------------------------- | | No trigger on file upload | Incorrect folder selected | Verify Google Drive folder ID | | Client name not extracted | Proposal format mismatch | Update regex in Code node | | No data from Google Sheets | Filter mismatch (status = Won) | Check column name and values | | AI output empty | Prompt or input missing | Verify merged data structure | | Salesforce error | Invalid credentials or field | Check API credentials and field mapping | | Slack message not sent | Wrong channel or auth issue | Reconnect Slack credentials | | Workflow stops before Slack | Wait node misconfigured | Ensure correct connection after Wait node | Need Help? If you need assistance setting up this workflow, customizing nodes or adding advanced features, we’re here to help. Whether it's integrating additional tools, improving AI analysis or building custom automation workflows tailored to your business needs, feel free to reach out to our n8n developers at WeblineIndia. Get expert help to scale your automation and build powerful AI-driven workflows efficiently.
by Avkash Kakdiya
Quick overview This workflow receives inbound leads via webhook, validates and normalizes the data, scores and routes the lead to a sales rep, checks for duplicates and upserts the contact in HubSpot, drafts an outreach email with OpenAI, notifies the rep via Slack and Gmail, and logs the result to Google Sheets. How it works Receives a POST webhook request with inbound lead details. Validates required fields (like name and email) and returns a 400 JSON response if the payload is invalid. Normalizes lead fields (name, email, company, region, source, and company size), calculates a lead score and tier, and assigns the lead to a rep based on region and tier. Searches HubSpot for an existing contact by the lead data and flags the lead as a duplicate when a match is found. If the lead is new, requests an outreach email draft from the OpenAI Chat Completions API; otherwise, posts a duplicate warning to Slack. Upserts the contact in HubSpot for hot/warm leads or logs the cold lead to HubSpot, then notifies the assigned rep in Slack and emails them the AI draft via Gmail. Appends a routing log row to Google Sheets and returns a JSON webhook response with the assigned rep, tier, and duplicate status. Setup Configure the Webhook trigger URL (POST /inbound-lead) in your form, landing page, or source system to send the required lead fields. Add HubSpot OAuth2 credentials for searching and creating/updating contacts. Add Slack OAuth2 credentials and set the target channel/workspace used by the Slack notification and duplicate warning steps. Add Gmail OAuth2 credentials for sending the outreach draft to the assigned rep. Add an OpenAI API key via HTTP Header Auth (Bearer token) and confirm the model name in the OpenAI request. Add a Google Sheets Service Account credential, replace REPLACE_WITH_YOUR_SHEET_ID, and ensure the target sheet (e.g. Sheet1) has matching columns for the appended log fields.
by Incrementors
Description Submit up to 3 landing page URLs using a simple form and the workflow audits each one automatically. For every page, GPT-4o-mini scrapes the content, scores it across five dimensions, identifies the top conversion issue, and generates five specific page fixes. Every result is logged to Google Sheets and pages that score below your alert threshold trigger an automatic Gmail alert with the full breakdown. Built for marketing managers, agency owners, and growth teams who need structured, repeatable conversion audits without spending hours reviewing pages manually. What This Workflow Does Scrapes and cleans each page automatically** — Fetches the raw HTML for every URL submitted, strips all scripts and styles, and prepares clean text for AI analysis Scores pages across five CRO dimensions** — GPT-4o-mini rates each page on overall conversion potential, CTA strength, trust score, and message clarity on a 1–10 scale Generates a letter grade per page** — Assigns A+ through F based on the overall score so you can rank pages at a glance Produces five page-specific fixes** — Every fix references actual content from the page and is scoped to be doable within 1–2 days — no generic advice Runs each page independently** — All three pages are processed as separate audits so one slow page never blocks the others Logs every audit to Google Sheets** — Appends a 14-column row per page with all scores, top issue, quick win, fix list, and priority label Sends Gmail alerts only for low-scoring pages** — Pages below your score threshold get an immediate email with the full audit breakdown — pages that pass trigger no email Setup Requirements Tools Needed n8n instance (self-hosted or cloud) OpenAI account with GPT-4o-mini API access Google Sheets (one sheet with a tab named CRO Audit Dashboard) Gmail account (the account you want alerts sent from) Credentials Required OpenAI API key Google Sheets OAuth2 Gmail OAuth2 Estimated Setup Time: 10–15 minutes Step-by-Step Setup Import the workflow — Open n8n → Workflows → Import from JSON → paste the workflow JSON → click Import Fill in Config Values — Open node 2. Set — Config Values → replace all four placeholders: | Field | What to enter | |---|---| | PASTE_YOUR_GOOGLE_SHEET_ID_HERE | The ID from your Google Sheet URL (the string between /d/ and /edit) | | PASTE_YOUR_EMAIL_ADDRESS_HERE | The email address where CRO alerts should be sent | | PASTE_YOUR_NAME_HERE | Your name for the email sign-off | | scoreThreshold | Leave as 6 — pages scoring 5 or below get an alert. Change to 7 for stricter alerting or 5 for looser alerting | Connect OpenAI — Open node 7. OpenAI — GPT-4o-mini Model → click the credential dropdown → add your OpenAI API key → test the connection Create your Google Sheet tab — Open your Google Sheet → add a tab named exactly CRO Audit Dashboard → add these 14 column headers in row 1: Date, Page URL, Page Name, CRO Score, Grade, Top Issue, Quick Win, CTA Strength, Trust Score, Message Clarity, Priority, Fix List, Audited By, Logged At Connect Google Sheets — Open node 10. Google Sheets — Log CRO Audit → click the credential dropdown → add Google Sheets OAuth2 → sign in with your Google account → authorize access Connect Gmail — Open node 12. Gmail — Send CRO Alert → click the credential dropdown → add Gmail OAuth2 → sign in with the Gmail account you want to send alerts from → authorize access Activate the workflow — Toggle the workflow to Active → copy the Form URL from node 1. Form — Multi-Page CRO Audit → open it in a browser to submit your first audit How It Works (Step by Step) Step 1 — Form: Multi-Page CRO Audit You open the form URL in a browser and fill in your name, up to three page URLs with their names, and the business type (e.g. SaaS, Law Firm, E-commerce). Only Page 1 URL and name are required — Pages 2 and 3 are optional. Submitting the form starts the workflow. Step 2 — Set: Config Values Your Google Sheet ID, alert email, sender name, score threshold, and all form inputs are stored here. Each page URL and name is mapped to its own variable. The business type and auditor name are also captured here for use in the AI prompt and the sheet log. Step 3 — Code: Build Pages List The three possible page URLs are filtered to remove any blank entries. Only URLs that start with http are kept. If no valid URLs are found, the workflow stops with a clear error. Each valid page is then output as its own separate entry so every page runs through the full audit pipeline independently. This means if you submit 3 pages, the scraping, AI analysis, sheet logging, and Gmail alert steps run 3 times — once per page. Step 4 — HTTP: Scrape Landing Page For each page, an HTTP request fetches the raw HTML content with a 15-second timeout. The response is returned as plain text for the cleaning step. Step 5 — Code: Clean HTML to Text The raw HTML is cleaned by removing all script blocks, style blocks, and HTML comments. Tag closings for structural elements like divs, paragraphs, and headings are converted to line breaks to preserve readability. All remaining HTML tags are stripped, common HTML entities are decoded, and extra whitespace is collapsed. The result is capped at 4,000 characters — if the page is longer, a truncation note is added so the AI knows content was cut off. If the page returns less than 100 characters, the workflow throws an error rather than sending near-empty content to the AI. Step 6 — AI Agent: CRO Audit GPT-4o-mini receives the business type, page name, page URL, and cleaned page content. It returns nine structured fields: an overall score from 1–10, a letter grade, a CTA strength score, a trust score, a message clarity score, the single biggest conversion problem on the page, the fastest single fix to improve conversions, five page-specific improvements each doable in 1–2 days, and a priority label (CRITICAL, HIGH, MEDIUM, or LOW). Step 7 — OpenAI: GPT-4o-mini Model This is the language model powering the audit. It runs at temperature 0.3 for consistent, factual scoring and is capped at 800 tokens to keep each audit concise and costs predictable. Step 8 — Parser: Structured CRO Output This step enforces the exact nine-field schema GPT-4o-mini must return. It validates that all required fields are present and correctly typed before results move forward, preventing malformed AI output from reaching your sheet. Step 9 — Code: Prepare Audit Results The AI output is merged with all page metadata. Sub-scores are formatted as "X out of 10" for readability. The fix list is formatted as a numbered list — pipe-separated for the sheet column and line-separated for the email. A needsAlert flag is set to true if the overall score is below your configured threshold. The email subject and full email body are also assembled here, including all scores, the top issue, quick win, and all five fixes. Step 10 — Google Sheets: Log CRO Audit One row is appended to your CRO Audit Dashboard tab with all 14 columns populated. The Sheet log and the Gmail alert step both run at the same time — logging never delays the email. Step 11 — IF: Score Below Threshold? This is the alert gate. If the page score is below your threshold (YES path), the Gmail alert fires immediately. If the page passed the threshold (NO path), the workflow routes to 13. Set — No Alert Needed and ends silently for that page — no email is sent. Step 12 — Gmail: Send CRO Alert A plain-text alert email is sent to your configured address. It includes the page name, URL, overall score, grade, priority level, top issue, fastest fix, all five specific improvements, and the three sub-scores for CTA strength, trust, and message clarity. Step 13 — Set: No Alert Needed This step handles pages that passed the threshold. It sets a brief log message confirming the page scored above the threshold and no email was sent. Key Features ✅ Batch audit up to 3 pages in one submission — Submit multiple URLs at once and each page gets its own independent audit without you having to run the workflow three times ✅ Letter grade for instant ranking — A+ through F grades let you sort pages by quality at a glance without interpreting raw scores ✅ Four sub-scores per page — CTA strength, trust score, and message clarity give you a breakdown of why a page scored the way it did ✅ Five page-specific fixes every time — Every fix references actual content from that specific page, not generic CRO advice — each one is scoped to 1–2 days of work ✅ Configurable alert threshold — Change one number in Config Values to define what counts as a failing score — lower for stricter monitoring, higher for looser ✅ Structured output enforced — A schema parser validates all nine AI fields before anything reaches your sheet — no broken rows or missing scores ✅ Sheet logs and Gmail run simultaneously — Both outputs fire at the same time so your dashboard is always current and alerts are never delayed ✅ Silent pass for healthy pages — Pages above the threshold log to Sheets and stop — no noise, no email clutter for pages that are already performing well Customisation Options Lower the threshold for more aggressive alerting — In node 2. Set — Config Values, change scoreThreshold from 6 to 8 so any page scoring 7 or below triggers an email — useful for agencies running CRO campaigns where even average pages need attention. Add a Slack notification alongside Gmail — After node 9. Code — Prepare Audit Results, add an IF check for needsAlert === true and connect a Slack node to also post the page name, score, and top issue to a #cro-alerts channel so your team sees issues in real time without checking email. Increase the character limit for longer pages — In node 5. Code — Clean HTML to Text, change .substring(0, 4000) to 6000 or 8000 if your pages are content-heavy and you want GPT to see more of the page — note this will slightly increase OpenAI token usage per audit. Expand to 5 pages per submission — In node 3. Code — Build Pages List, add two more page objects following the same pattern as pages 1–3, and add corresponding fields to the form in node 1. Form — Multi-Page CRO Audit and Config Values in node 2. Send a weekly CRO summary email — Add a separate Schedule trigger that fires every Monday, reads the CRO Audit Dashboard sheet, counts pages by priority label from the past 7 days, and sends a weekly digest showing how many CRITICAL, HIGH, MEDIUM, and LOW pages were found. Troubleshooting Form submission not starting the workflow: Confirm the workflow is Active — inactive workflows do not receive form submissions Copy the Form URL fresh from node 1. Form — Multi-Page CRO Audit after activating — URLs copied before activation will not work Make sure at least one URL starts with http — node 3. Code — Build Pages List filters out any blank or invalid URLs Page scraping returning empty or very short content: Some pages block automated HTTP requests and return a 403 error or a redirect — check the execution log of node 4. HTTP — Scrape Landing Page for the response Try adding a User-Agent header to node 4: Name = User-Agent, Value = Mozilla/5.0 (compatible; n8n-bot/1.0) to bypass basic bot detection If the page uses JavaScript rendering (e.g. React or Vue), the HTML may be empty — these pages require a headless browser and cannot be scraped with a simple HTTP request OpenAI not generating audit results: Confirm the API key is connected in node 7. OpenAI — GPT-4o-mini Model and your account has available credits Check the execution log of node 6. AI Agent — CRO Audit for the raw GPT response If the schema parser in node 8. Parser — Structured CRO Output is throwing an error, the AI returned an unexpected format — re-run the audit to see if the issue is consistent Google Sheets not logging rows: Confirm the Google Sheets OAuth2 credential in node 10. Google Sheets — Log CRO Audit is connected and not expired — re-authorize if needed Check that PASTE_YOUR_GOOGLE_SHEET_ID_HERE in node 2. Set — Config Values has been replaced with your actual sheet ID from the URL Confirm the tab is named CRO Audit Dashboard exactly — capitalization must match sheetName in Config Values Verify all 14 column headers in row 1 match exactly: Date, Page URL, Page Name, CRO Score, Grade, Top Issue, Quick Win, CTA Strength, Trust Score, Message Clarity, Priority, Fix List, Audited By, Logged At Gmail alert not arriving for low-scoring pages: Confirm the Gmail OAuth2 credential in node 12. Gmail — Send CRO Alert is connected and authorized Check that PASTE_YOUR_EMAIL_ADDRESS_HERE in node 2. Set — Config Values has been replaced with your actual email address Check the execution log of node 11. IF — Score Below Threshold? to confirm the needsAlert value is true for the pages that should trigger an alert — if false, the score may be at or above the threshold Check your spam or promotions folder — automated Gmail OAuth2 messages sometimes land there on first send Support Need help setting this up or want a custom version built for your team or agency? 📧 Email: info@incrementors.com 🌐 Website: https://www.incrementors.com/