by Akshay Chug
Quick overview This workflow polls Gmail every 15 minutes for unread invoice or receipt emails, uses Anthropic Claude (Sonnet) to extract key financial fields, logs new documents to Google Sheets, sends optional Slack alerts for overdue or high-value invoices, and marks processed emails as read. How it works Runs every 15 minutes and triggers on unread emails in Gmail. Prepares the email metadata and body text (and any available attachment text) and sets configuration values like the Google Sheets target and Slack threshold. Sends the combined email content to Anthropic Claude Sonnet to classify the document and extract structured invoice/receipt fields as JSON. Parses the AI response, normalizes amounts and dates, and flags items as overdue or high value based on your threshold. Checks Google Sheets for an existing entry with the same invoice number to avoid duplicates. Appends new invoice/receipt records to the Google Sheets log and posts a Slack message when an alert condition is met. Marks the Gmail email as read after logging (and after any Slack alert) to keep the inbox clean. Setup Connect your Gmail account in both the Gmail trigger and the “Mark as read” action. Add an Anthropic (Claude) API credential and ensure the Claude Sonnet model is available in your account. Connect your Google Sheets account, set the target spreadsheet ID and sheet name, and create columns that match the fields being appended (for example: Timestamp, From, Subject, Invoice Type, Vendor Name, Invoice Number, Invoice Date, Due Date, Currency, Subtotal, Tax, Total Amount, Payment Status, Line Items, Confidence, Email ID). (Optional) Connect your Slack account and set the Slack channel ID, then set the high-value threshold amount used to trigger alerts. Review the Gmail polling interval and unread-only filter to match how you want invoices and receipts to be picked up.
by Manav Desai
WhatsApp RAG Chatbot with Supabase, Gemini 2.5 Flash, and OpenAI Embeddings This n8n template demonstrates how to build a WhatsApp-based AI chatbot that answers user questions using document retrieval (RAG) powered by Supabase for storage, OpenAI embeddings for semantic search, and Gemini 2.5 Flash LLM for generating high-quality responses. Use cases are many: Turn your WhatsApp into a knowledge assistant for FAQs, customer support, or internal company documents — all without coding. Good to know The workflow uses OpenAI embeddings for both document embeddings and query embeddings, ensuring accurate semantic search. Gemini 2.5 Flash LLM** is used to generate user-friendly answers from the retrieved context. Messages are processed in real-time and sent back directly to WhatsApp. Workflow is modular — you can split document ingestion and query handling for large-scale setups. Supabase and WhatsApp API credentials must be configured before running. How it works Trigger: A new WhatsApp message triggers the workflow via webhook. Message Check: Determines if the message is a query or a document upload. Document Handling: Fetch file URL from WhatsApp. Convert binary to text. Generate embeddings with OpenAI and store them in Supabase. Query Handling: Generate query embeddings with OpenAI. Retrieve relevant context from Supabase. Pass context to Gemini 2.5 Flash LLM to compose a response. Response: Send the answer back to the user on WhatsApp. Optional: Add Gmail node to forward chat logs or daily summaries. How to use Configure WhatsApp Business API webhook for incoming messages. Add your Supabase and OpenAI credentials in n8n’s credentials manager. Upload documents via WhatsApp to populate the Supabase vector store. Ask queries — the bot retrieves context and answers using Gemini 2.5 Flash. Requirements WhatsApp Business API** (or Twilio WhatsApp Sandbox) Supabase account** (vector storage for embeddings) OpenAI API key** (for generating embeddings) Gemini API access** (for LLM responses) Customising this workflow Swap WhatsApp with Telegram, Slack, or email for different chat channels. Extend ingestion to other sources like Google Drive or Notion. Adjust the number of retrieved documents or prompt style in Gemini for tone control. Add a Gmail output node to send logs or alerts automatically.
by Akshay
Overview This project is an AI-powered hotel receptionist built using n8n, designed to handle guest queries automatically through WhatsApp. It integrates Google Gemini, Redis, MySQL, and Google Sheets via LangChain to create an intelligent conversational system that understands and answers booking-related questions in real time. A standout feature of this workflow is its AI model-switching system — it dynamically assigns users to different Gemini models, balancing traffic, improving performance, and reducing API costs. How It Works WhatsApp Trigger The workflow starts when a hotel guest sends a message through WhatsApp. The system captures the message text, contact details, and session information for further processing. Redis-Based Model Management The workflow checks Redis for a saved record of the user’s previously assigned AI model. If no record exists, a Model Decider node assigns a new model (e.g., Gemini 1 or Gemini 2). Redis then stores this model assignment for an hour, ensuring consistent routing and controlled traffic distribution. Model Selector The Model Selector routes each user’s request to the correct Gemini instance, enabling parallel execution across multiple AI models for faster response times and cost optimization. AI Agent Logic The LangChain AI Agent serves as the system’s reasoning core. It: Interprets guest questions such as: “Who checked in today?” “Show me tomorrow’s bookings.” “What’s the price for a deluxe suite for two nights?” Generates safe, read-only SQL SELECT queries. Fetches the requested data from the MySQL database. Combines this with dynamic pricing or promotions from Google Sheets, if available. Response Delivery Once the AI Agent formulates an answer, it sends a natural-sounding message back to the guest via WhatsApp, completing the interaction loop. Setup & Requirements Prerequisites Before deploying this workflow, ensure the following: n8n Instance** (local or hosted) WhatsApp Cloud API** with messaging permissions Google Gemini API Key** (for both models) Redis Database** for user session and model routing MySQL Database** for hotel booking and guest data Google Sheets Account** (optional, for pricing or offer data) Step-by-Step Setup Configure Credentials Add all API credentials in n8n → Settings → Credentials (WhatsApp, Redis, MySQL, Google). Prepare Databases MySQL Tables Example: bookings(id, guest_name, room_type, check_in, check_out) rooms(id, type, rate, status) Ensure the MySQL user has read-only permissions. Set Up Redis Create Redis keys for each user: llm-user:<whatsapp_id> = { "modelIndex": 0 } TTL: 3600 seconds (1 hour). Connect Google Sheets (Optional) Add your sheet under Google Sheets OAuth2. Use it to manage room rates, discounts, or seasonal offers dynamically. WhatsApp Webhook Configuration In Meta’s Developer Console, set the webhook URL to your n8n instance. Select message updates to trigger the workflow. Testing the Workflow Send messages like “Who booked today?” or a voice message. Confirm responses include real data from MySQL and contextual replies. Key Features Text & voice support** for guest interactions Automatic AI model-switching** using Redis Session memory** for context-aware conversations Read-only SQL query generation** for database safety Google Sheets integration** for live pricing and availability Scalable design** supporting multiple LLM instances Example Guest Queries | Guest Query | AI Response Example | |--------------|--------------------| | “Who checked in today?” | “Two guests have checked in today: Mr. Ahmed (Room 203) and Ms. Priya (Room 410).” | | “How much is a deluxe room for two nights?” | “A deluxe room costs $120 per night. The total for two nights is $240.” | | “Do you have any discounts this week?” | “Yes! We’re offering a 10% weekend discount on all deluxe and suite rooms.” | | “Show me tomorrow’s check-outs.” | “Three check-outs are scheduled tomorrow: Mr. Khan (101), Ms. Lee (207), and Mr. Singh (309).” | Customization Options 🧩 Model Assignment Logic You can modify the Model Decider node to: Assign models based on user load, region, or priority level. Increase or decrease TTL in Redis for longer model persistence. 🧠 AI Agent Prompt Adjust the system prompt to control tone and response behavior — for example: Add multilingual support. Include upselling or booking confirmation messages. 🗂️ Database Expansion Extend MySQL to include: Staff schedules Maintenance records Restaurant reservations Then link new queries in the AI Agent node for richer responses. Tech Stack n8n** – Workflow automation & orchestration Google Gemini (PaLM)** – LLM for reasoning & generation Redis** – Model assignment & session management MySQL** – Booking & guest data storage Google Sheets** – Dynamic pricing reference WhatsApp Cloud API** – Messaging interface Outcome This workflow demonstrates how AI automation can transform hotel operations by combining WhatsApp communication, database intelligence, and multi-model AI reasoning. It’s a production-ready foundation for scalable, cost-optimized, AI-driven hospitality solutions that deliver fast, accurate, and personalized guest interactions.
by Yusuke Yamamoto
Daily AI News Summary & Gmail Delivery This n8n template demonstrates how to build an autonomous AI agent that automatically scours the web for the latest news, intelligently summarizes the top stories, and delivers a professional, formatted news digest directly to your email inbox. Use cases are many: Create a personalized daily briefing to start your day informed, keep your team updated on industry trends and competitor news, or automate content curation for your newsletter. Good to know At the time of writing, costs will depend on the LLM you select via OpenRouter and your usage of the Tavily Search API. Both services offer free tiers to get started. This workflow requires API keys and credentials for OpenRouter, Tavily, and Gmail. The AI Agent's system prompt is configured to produce summaries in Japanese. You can easily change the language and topics by editing the prompt in the "AI News Agent" node. How it works The workflow begins on a daily schedule, which you can configure to your preferred time. A Code node dynamically generates a search query for the current day's most important news across several categories. The AI Agent receives this query. It uses its attached tools to perform the task: It uses the Tavily News Search tool to find relevant, up-to-date articles from the web. It then uses the OpenRouter Chat Model to analyze the search results, identify the most significant stories, and write a summary for each. The agent's output is strictly structured into a JSON format, containing a main title and an array of individual news stories. Another Code node takes this structured JSON data and transforms it into a clean, professional HTML-formatted email. Finally, the Gmail node sends the beautifully formatted email to your specified recipient. How to use Before you start, you must add your credentials for OpenRouter, Tavily, and Gmail in their respective nodes. Customize the schedule in the "Schedule Trigger" node to set the daily delivery time. Change the recipient's email address in the final "Send a message" (Gmail) node. Requirements OpenRouter account (for access to various LLMs) Tavily AI account (for the real-time search API) Google account with Gmail enabled for sending emails via OAuth2 Customising this workflow Change the delivery channel:** Easily swap the final Gmail node for a Slack, Discord, or Telegram node to send the news summary to a team channel. Focus the news topics:** Modify the "Prepare News Query" node to search for highly specific topics, such as "latest advancements in artificial intelligence" or "financial news from the European market." Archive the news:** Add a node after the AI Agent to save the structured JSON data to a database or Google Sheet, allowing you to build a searchable news archive over time.
by Václav Čikl
Description: This sophisticated workflow automates personalized email campaigns for musicians and band managers. The system processes contact databases, analyzes previous Gmail conversation history, and uses AI to generate contextually appropriate emails tailored to different contact categories (venues, festivals, media, playlists). Key Features: Multi-category support**: Bookers, festivals, media, playlist curators Conversation context analysis**: Maintains relationship history from Gmail AI-powered personalization**: Custom prompts for each contact type Multi-language support**: Localized content and prompts Gmail integration**: Automatic draft creation with signatures Bulk processing**: Handle hundreds of contacts efficiently Use Cases: Album/single promotion campaigns Tour booking automation Festival submission management Playlist pitching campaigns Media outreach automation Venue relationship management Perfect For: Independent musicians and bands Music managers and booking agents Record labels with multiple artists PR agencies in music industry Festival organizers (for artist outreach) Required Setup: 1. Credentials & APIs: Gmail OAuth2** (read messages + create drafts permissions) Google Sheets API** (for AutomatizationHelper configuration) OpenAI API** or compatible LLM (for content generation) 2. Required Files: Contact Database** (CSV): Your venue/media/festival contacts AutomatizationHelper** (Google Sheets): Campaign configuration, prompts, links 3. Example Data: 📁 Download Example Files The folder contains: Sample contact database (CSV) AutomatizationHelper template (CSV + Google Sheets) Detailed setup instructions (README) Data Structure: Contact Database Fields: venue_name - Organization name category - booker/festival/media/playlisting email_1 - Primary email (required) email_2 - Secondary email (optional, for CC) active - active/inactive (for filtering) language - EN/DE/etc. (for localization) AutomatizationHelper Fields: LANGUAGE - Language code CATEGORY - Contact type LATEST_SINGLE - Spotify/Apple Music link LATEST_VIDEO - YouTube/Vimeo link EPK - Electronic Press Kit URL SIGNATURE - HTML email signature PROMPT - AI prompt for this category SUBJECT - Email subject template Setup Instructions: Step 1: Prepare Your Data Download example files from the Google Drive folder Replace sample data with your real contacts and band information Customize AI prompts for your communication style Update signature with your contact details Step 2: Configure APIs Set up Gmail OAuth2 credentials in n8n Configure Google Sheets API access Add OpenAI API key for content generation Step 3: Import & Configure Workflow Import the workflow JSON Connect your credentials to respective nodes Update Google Sheets URL in AutomatizationHelper node Test with a small contact sample first Step 4: Customize & Run Adjust AI prompts in AutomatizationHelper for your style Update contact categories as needed Run workflow - drafts will be created in Gmail for review Tips: Start small**: Test with 5-10 contacts first Review drafts**: Always review AI-generated content before sending Update regularly**: Keep your AutomatizationHelper current with latest releases Monitor responses**: Track which prompts work best for different categories Language mixing**: You can have contacts in multiple languages Important Notes: Emails are created as Gmail drafts - manual review recommended Respects Gmail API rate limits automatically Conversation history analysis works best with existing email threads HTML signatures are automatically added (Gmail API limitation workaround) Handles multiple languages simultaneously Maintains conversation context across campaigns Generates unique content for each contact Template Author: Questions or need help with setup? Email: xciklv@gmail.com LinkedIn: https://www.linkedin.com/in/vaclavcikl/
by Bhuvanesh R
The competitive edge, delivered. This Customer Intelligence Engine simultaneously analyzes the web, Reddit, and X/Twitter to generate a professional, actionable executive briefing. 🎯 Problem Statement Traditional market research for Customer Intelligence (CI) is manual, slow, and often relies on surface-level social media scraping or expensive external reports. Service companies, like HVAC providers, struggle to efficiently synthesize vast volumes of online feedback (Reddit discussions, real-time tweets, web articles) to accurately diagnose systemic service gaps (e.g., scheduling friction, poor automated systems). This inefficiency leads to delayed strategic responses and missed opportunities to invest in high-impact solutions like AI voice agents. ✨ Solution This workflow deploys a sophisticated Multisource Intelligence Pipeline that runs on a scheduled or ad-hoc basis. It uses parallel processing to ingest data from three distinct source types (SERP API, Reddit, and X/Twitter), employs a zero-cost Hybrid Categorization method to semantically identify operational bottlenecks, and uses the Anthropic LLM to synthesize the findings into a clear, executive-ready strategic brief. The data is logged for historical analysis while the brief is dispatched for immediate action. ⚙️ How It Works (Multi-Step Execution) 1. Ingestion and Parallel Processing (The Data Fabric) Trigger:** The workflow is initiated either on an ad-hoc basis via an n8n Form Trigger or on a schedule (Time Trigger). Parallel Ingestion:** The workflow immediately splits into three parallel branches to fetch data simultaneously: SERP API: Captures authoritative content and industry commentary (Strategic Context). Reddit (Looping Structure): Fetches posts from multiple subreddits via an Aggregate Node workaround to get authentic user experiences (Qualitative Signal). X/Twitter (HTTP Request): Bypasses standard rate limits to capture real-time social complaints (Sentiment Signal). 2. Analysis and Fusion (The Intelligence Layer) Cleanup and Labeling (Function Nodes):** Each branch uses dedicated Function Nodes to filter noise (e.g., low-score posts) and normalize the data by adding a source tag (e.g., 'Reddit'). Merge:** A Merge Node (Append Mode) fuses all three parallel streams into a single, unified dataset. Hybrid Categorization (Function Node):** A single Function Node applies the Hybrid Categorization Logic. This cost-free step semantically assigns a pain_point category (e.g., 'Call Hold/Availability') and a sentiment_score to every item, transforming raw text into labeled metrics. 3. Dispatch and Reporting (The Executive Output) Aggregation and Split (Function Node):** The final Function Node calculates the total counts, deduplicates the final results, and generates the comprehensive summaryString. Data Logging:* The aggregated counts and metrics are appended to *Google Sheets** for historical logging. LLM Input Retrieval (Function Node):** A final Function Node retrieves the summary data using the $items() helper (the serial route workaround). AI Briefing:* The *Message a model (Anthropic) Node receives the summaryString and uses a strict HTML System Prompt to synthesize the strategic brief, identifying the top pain points and suggesting AI features. Delivery:* The *Gmail Node** sends the final, professional HTML brief to the executive team. 🛠️ Setup Steps Credentials Anthropic:** Configure credentials for the Language Model (Claude) used in the Message a model node. SERP API, Reddit, and X/Twitter:** Configure API keys/credentials for the data ingestion nodes. Google Services:** Set up OAuth2 credentials for Google Sheets (for logging data) and Gmail (for email dispatch). Configuration Form Configuration:** If using the Form Trigger, ensure the Target Keywords and Target Subreddits are mapped correctly to the ingestion nodes. Data Integrity:** Due to the serial route, ensure the Function (Get LLM Summary) node is correctly retrieving the LLM_SUMMARY_HOLDER field from the preceding node's output memory. ✅ Benefits Proactive CI & Strategy:** Shifts market research from manual, reactive browsing to proactive, scheduled data diagnostic. Cost Efficiency:** Utilizes a zero-cost Hybrid Categorization method (Function Node) for intent analysis, avoiding expensive per-item LLM token costs. Actionable Output:** Delivers a fully synthesized, HTML-formatted executive brief, ready for immediate presentation and strategic sales positioning. High Reliability:** Employs parallel ingestion, API workarounds, and serial routing to ensure the complex workflow runs consistently and without failure.
by Rahul Joshi
Quick overview This workflow runs daily to read overdue invoices from Google Sheets, uses OpenAI (GPT-4o-mini) to draft personalized reminder emails and determine escalation level, sends emails via Gmail, posts Slack alerts for no-invoice runs or AI errors, and logs results back to Google Sheets. How it works Runs every 24 hours on a schedule. Reads rows from the “invoices” tab in Google Sheets and, if no invoice value is found, posts a “no overdue invoices” message to Slack. For each invoice, sends the invoice details to OpenAI (GPT-4o-mini) to determine an escalation level, draft an HTML email, and recommend whether to escalate. Parses the AI’s JSON response (falling back to a default reminder if parsing fails) and sends the recovery email to the client via Gmail. If the AI recommends escalation, sends an internal escalation email via Gmail to the legal/AR team with invoice details and the AI summary. Updates the original invoice row in Google Sheets with the escalation level and summary, then appends an audit row to the “Recovery sheet” tab including the email subject, summary, and sent message label ID. If the AI step errors, posts an error alert to Slack and continues processing. Setup Add Google Sheets OAuth2 credentials and replace YOUR_GOOGLE_SHEET_ID, ensuring the “invoices” and “Recovery sheet” tabs and columns (Invoice, Client, Email, Amount, Due Date, Days Overdue, Reminders Sent, plus row_number) match the workflow. Add an OpenAI credential for the GPT-4o-mini model. Add Gmail OAuth2 credentials and set the reply-to address (ar@example.com) and escalation recipient (legal@example.com) to your real emails. Add Slack OAuth2 credentials, replace YOUR_SLACK_CHANNEL_ID, and choose the channel that should receive status and error alerts.
by May Ramati Kroitero
Automated Job Hunt with Tavily — Setup & Run Guide What this template does? Automatically searches for recent job postings (example: “Software Engineering Intern”), extracts structured details from each posting using an AI agent + Tavily, bundles results, and emails a single weekly digest. Estimated setup time: ~30 minutes 1. Required credentials Before you import or run the workflow, create/configure these credentials in your n8n instance: OpenAI (Chat model) — used by the OpenAI Chat Model and Message a model nodes. Add an OpenAI credential (name it e.g. OpenAi account) and paste your OpenAi API key. Tavily API — used by the Search in Tavily node. Add a Tavily credential (name it e.g. Tavily account) and add your Tavily API key. Gmail (OAuth2) — used by the Send a message node to deliver the digest email. Configure Gmail OAuth2 credential and select it for the Gmail node (e.g. Gmail account. 2. Node-by-node configuration (what to check/change) Schedule Trigger Node name: Schedule Trigger Configure interval: daily or weekly (example: weekly, trigger at 08:00). Note: This is the workflow start. Adjust to your preferred cadence. AI Agent Node name: AI Agent Important: First step — set the agent’s prompt / system message. Search in Tavily (Tavily Tool node) Node name: Tavily Query: user-editable field (example default: Roles posted this week for Software Engineering) Advice: keep query under 400 chars; change to target role/location keywords. Options recommended: Search Depth: advanced (optional, better extraction) Max Results: 15 Time Range: week (limit to past week) Include Raw Content: true (fetch full page content for better extraction) Include Domains: indeed.com, glassdoor.com,linkedin.com — prioritize trusted sources Edit Fields / Set (bundle) Node name: Edit Fields (Set) Purpose: Collect the agent output into one field (e.g., $json.output or Response) for downstream processing. Message a Model (OpenAI formatting step) Node name: Message a model Uses OpenAI (the openAiApi credential). This node can be used to reformat or normalize the agent output into consistent blocks if needed. Use the same system rules you used for the agent (the prompt/system message earlier). You can also leave this minimal if the agent already outputs structured blocks. Code Node (Parsing & structuring) Node name: Code Purpose: Split the agent/LLM text into separate job postings and extract fields with regex. Aggregate Node Node name: Aggregate Mode: aggregateAllItemData (this combines all parsed postings into a single data array so the Gmail node can loop over them) Gmail node (Send a message) Node name: Send a message sendTo: set to recipient(s) (e.g., your inbox) subject: e.g. New Jobs for this week! emailType: text (or html if you build HTML content) message (body): use the expression that loops through data and formats every posting. 3. How to test (quick steps) Set credentials in n8n (OpenAI, Tavily, Gmail). Run the Schedule Trigger manually (use the “Execute Workflow” or manually trigger nodes). Inspect the Search in Tavily node output — confirm it returns results. Inspect the AI Agent and Message a model outputs — ensure formatted postings are produced and separated by --- END JOB POSTING ---. Run the Code node — confirm it returns structured items with posting_number, job_title, requirements[], etc. Check Aggregate output: you should see a single item with data array. In Gmail node, run a test send — confirm the email receives one combined message with all postings. 4. Troubleshooting tips Gmail body shows [Array: …]: Avoid dragging the array raw — use the expression that maps data to formatted strings. Code node split error: Occurs when raw is undefined. Ensure previous node returns message.content or adjust to use $input.all() and join contents safely. Missing fields after parsing: Check LLM/agent output labels match the Code node’s regex (e.g., Job Title:). If labels differ, update regex or LLM formatting. 5. Customization ideas Filter by location or remote-only roles, or add keyword filters (seniority, stack). Send results to Google Sheets or Slack instead of/in addition to Gmail. Add an LLM summarization step to create a 1-line highlight per posting.
by gotoHuman
This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: 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 credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.
by Franz
🚀 AI Lead Generation and Follow-Up Template 📋 Overview This n8n workflow template automates your lead generation and follow-up process using AI. It captures leads through a form, enriches them with company data, classifies them into different categories, and sends appropriate follow-up sequences automatically. Key Features: 🤖 AI-powered lead classification (Demo-ready, Nurture, Drop) 📊 Automatic lead enrichment with company data 📧 Intelligent email responses and follow-up sequences 📅 Automated demo scheduling for qualified leads 📝 Complete lead logging in Google Sheets 💬 AI assistant for immediate query responses 🛠️ Prerequisites Before setting up this workflow, ensure you have: n8n Instance: Self-hosted or cloud version OpenAI API Key: For AI-powered features Google Workspace Account with: Gmail access Google Sheets Google Calendar Basic understanding of your Ideal Customer Profile (ICP) ⚡ Quick Start Guide Step 1: Import the Workflow Copy the workflow JSON Import into your n8n instance The workflow will appear with all nodes connected Step 2: Configure Credentials You'll need to set up the following credentials: OpenAI API**: For AI agents and classification Gmail OAuth2**: For sending emails Google Sheets OAuth2**: For lead logging Google Calendar OAuth2**: For demo scheduling Step 3: Create Your Lead Log Sheet Create a Google Sheet with these columns: Date Name Email Company Job Title Message Number of Employees Industry Geography Annual Revenue Technology Pain Points Lead Classification Step 4: Update Configuration Nodes Replace Sheet ID: Update all Google Sheets nodes with your sheet ID Update Email Templates: Customize all email content Set Escalation Email: Replace "your-email@company.com" with your team's email Configure ICP Criteria: Edit the "Define ICP and Lead Criteria" node 🎯 Lead Classification Setup Define Your ICP (Ideal Customer Profile) Edit the "Define ICP and Lead Criteria" node to set your criteria: 📌 ICP Criteria Example: Company Size: 50+ employees Industry: SaaS, Finance, Healthcare, Manufacturing Geography: North America, Europe Pain Points: Manual processes, compliance needs, scaling challenges Annual Revenue: $5M+ ✅ Demo-Ready Criteria: High-intent prospects who meet multiple qualifying factors: Large company size (your threshold) Clear pain points mentioned Urgent timeline Budget authority indicated Specific solution requests 🌱 Nurture Criteria: Prospects with future potential: Meet basic size requirements In target industry General interest expressed Planning future implementation Exploring options ❌ Drop Criteria: Only drop leads that clearly don't fit: Outside target geography Wrong industry (B2C if you're B2B) Too small with no growth Already with competitor Spam or test messages 📧 Email Customization Customize Follow-Up Sequences: Demo-Ready Sequence: Immediate calendar invitation Personalized demo confirmation Meeting reminder (optional) Nurture Sequence: Welcome email with resources Educational content (Day 2) Webinar/event invitation (Day 3) Demo offer (Day 4) Drop Message: Polite acknowledgment Clear explanation Keep door open for future 🔧 Advanced Configuration AI Answer Agent Setup: Update the system prompt with your company information Add common Q&A patterns Set escalation rules Configure language preferences Lead Enrichment Options: Add API keys for additional data sources Configure enrichment fields Set data quality thresholds Enable duplicate detection Calendar Integration: Set available meeting times Configure meeting duration Add buffer times Set timezone handling 📊 Monitoring and Optimization Track Key Metrics: Lead volume by classification Response rates Demo conversion rates Time to first response Enrichment success rate Optimization Tips: Regular Review: Check classification accuracy weekly A/B Testing: Test different email sequences Feedback Loop: Use outcomes to refine ICP criteria AI Training: Update prompts based on results 🎉 Best Practices Start Simple: Begin with basic criteria and refine over time Test Thoroughly: Use test leads before going live Monitor Daily: Check logs for the first week Iterate Quickly: Adjust based on results Document Changes: Keep track of criteria updates 📈 Scaling Your Workflow As your lead volume grows: Add Sub-workflows: Separate complex processes Implement Queuing: Handle high volumes Add CRM Integration: Sync with your sales tools Enable Analytics: Track detailed metrics Set Up Alerts: Monitor for issues
by KPendic
This n8n flow demos basic dev-ops operation task, dns records management. AI agent with light and basic prompt functions like getter and setter for DNS records. In this special case, we are managing remote dns server, via API calls - that are handled on CloudFlare platform side. Use-cases for this flow can be standalone, or you can chain it in your pipe-line to get powerful infrastructure flows for your needs. How it works we created basic agent and gave it a prompt to know about one tool: cf_tool - sub-routine (to itself flow - or it can be separate dedicated one) prompt have defined arguments that are needed for passing them when calling agent, for each action specifically tool it self have basic if switch that is - based of a action call - calling specific CloudFlare API endpoint (and pass down the args from the tool) Requirements For storing and processing of data in this flow you will need: CloudFlare.com API key/token - for retrieving your data (https://dash.cloudflare.com/?to=/:account/api-tokens) OpenAPI credentials (or any other LLM provider) saved - for agent chat (Optional) PostGres table for chat history saving Official CloudFlare api Documentation For full details and specifications please use API documentation from: https://developers.cloudflare.com/api/ Linkedin post Let me know if you found this flow usefull on my Linkedin post > here. tags: #cloudflare, #dns, #domain
by Yaron Been
Build AI-powered pre-call intelligence briefs from LinkedIn profiles Automatically scrape LinkedIn profiles for upcoming sales calls, analyze the data with AI, score prospect readiness, and send structured pre-call briefs to your inbox. This workflow reads upcoming call records from Google Sheets, scrapes each prospect's LinkedIn profile with Bright Data, extracts useful talking points and rapport hooks, and uses GPT-5.5 to generate a structured pre-call intelligence brief. It then applies confidence and readiness thresholds to decide whether to send a full brief, a shorter limited-data brief, or log the result for later review. How it works A schedule trigger runs the workflow automatically. The workflow reads upcoming prospect records from a Google Sheet tab called upcoming_calls. Each LinkedIn profile URL is sent to the Bright Data dataset API for scraping. The Bright Data response is validated to catch empty results, API errors, and async snapshot responses. A code step extracts useful sales context such as: career trajectory role tenure skills and tech affinity education signals recent activity themes rapport hooks GPT-5.5 analyzes the enriched profile data and returns a structured JSON brief with: career trajectory summary recent activity summary 5 tailored talking points likely pain points readiness score recommended approach risk factors self-evaluation metadata The workflow parses the AI response and checks whether confidence is at least 0.7. If confidence is too low, the result is written to a low_confidence_briefs sheet for manual review. If confidence is high enough, the workflow checks whether the readiness score is at least 70. High-readiness prospects receive a full email brief and are logged to the call_briefs sheet. Lower-readiness prospects receive a shorter email brief and are also logged to the call_briefs sheet. Setup Create a Google Sheet with these tabs: upcoming_calls call_briefs low_confidence_briefs The upcoming_calls tab should include at least: url meeting_date our_product alert_email (optional) Then configure the workflow: Replace YOUR_SPREADSHEET_ID in the Google Sheets nodes with your sheet ID. Connect Google Sheets via OAuth2. Add your Bright Data credentials to the HTTP Header Auth used in the LinkedIn scraping node. Connect your OpenAI account in the GPT-5.5 chat model node. Connect Gmail via OAuth2 for sending the brief emails. Optionally set a fallback alert email using the ALERT_EMAIL variable. Requirements Google Sheets OAuth2 credentials Gmail OAuth2 credentials Bright Data account OpenAI API access for GPT-5.5 Notes This is a demo workflow intended for template and educational use. The Bright Data response validator is built to handle empty results, API errors, and async responses gracefully. The AI node is instructed to return raw JSON only, making the output easier to parse and route. The confidence gate helps prevent unreliable AI output from being emailed. The readiness score gate helps prioritize prospects that are more likely to lead to productive calls. You can adjust the confidence threshold (0.7) and readiness threshold (70) to match your process. The Gmail steps currently send plain-text summaries, which makes the workflow easy to customize. Good fit for sales teams founders doing outbound agencies preparing for discovery calls account executives who want better call prep RevOps teams building lightweight pre-call research systems Note: This demo uses the synchronous Bright Data request because it is easier to understand in a template. In real workflows, it is often better to use the async approach. Bright Data’s sync endpoint has a 1 minute timeout, and longer jobs return a snapshot_id instead of final data. A simple way to build the async HTTP node in n8n is to copy Bright Data’s cURL example from your account or docs and convert it into an n8n HTTP Request setup