by Cheng Siong Chin
How It Works This workflow automates cost analysis and budget optimization for enterprises managing complex operational expenses. Designed for CFOs, finance teams, and operations managers, it addresses the challenge of identifying cost inefficiencies and generating actionable recommendations in real-time. The system runs every 15 minutes, monitoring cost metrics and generating AI performance data. The Cost Intelligence Agent aggregates financial data before routing to parallel AI processing. Claude AI executes budget optimization analysis while a specialized cost model identifies spending patterns. Routing engines evaluate optimization strategies, with NVIDIA parsers ensuring standardized outputs. The Optimization Coordinator consolidates insights and routes by severity: critical overruns trigger executive alerts via email and Slack, warnings generate management notifications, while routine optimizations proceed to documentation and historical storage for trend analysis. Setup Steps Configure Schedule Trigger for 15-minute intervals Add Claude API credentials in Workflow Configuration and Budget Alert Tool nodes Set up NVIDIA API keys in Cost Intelligence Agent and Structured Output Parser nodes Connect Gmail authentication and configure finance team distribution lists Integrate Slack workspace credentials and specify budget alert channels Configure storage endpoints in cost history nodes with database connections Prerequisites Claude API access, NVIDIA API credentials, Gmail/Google Workspace account, Slack workspace integration Use Cases Multi-department budget variance analysis, cloud cost optimization, procurement pattern detection Customization Integrate ERP systems, add department-specific rules, customize alert thresholds by category Benefits Reduces overruns 40% through early detection, identifies 15-20% monthly savings
by explorium
Outbound Agent - AI-Powered Lead Generation with Natural Language Prospecting This n8n workflow transforms natural language queries into targeted B2B prospecting campaigns by combining Explorium's data intelligence with AI-powered research and personalized email generation. Simply describe your ideal customer profile in plain English, and the workflow automatically finds prospects, enriches their data, researches them, and creates personalized email drafts. DEMO Template Demo Credentials Required To use this workflow, set up the following credentials in your n8n environment: Anthropic API Type:** API Key Used for:** AI Agent query interpretation, email research, and email writing Get your API key at Anthropic Console Explorium API Type:** Generic Header Auth Header:** Authorization Value:** Bearer YOUR_API_KEY Used for:** Prospect matching, contact enrichment, professional profiles, and MCP research Get your API key at Explorium Dashboard Explorium MCP Type:** HTTP Header Auth Used for:** Real-time company and prospect intelligence research Connect to: https://mcp.explorium.ai/mcp Gmail Type:** OAuth2 Used for:** Creating email drafts Alternative options: Outlook, Mailchimp, SendGrid, Lemlist Go to Settings → Credentials, create these credentials, and assign them in the respective nodes before running the workflow. Workflow Overview Node 1: When chat message received This node creates an interactive chat interface where users can describe their prospecting criteria in natural language. Type:** Chat Trigger Purpose:** Accept natural language queries like "Get 5 marketing leaders at fintech startups who joined in the past year and have valid contact information" Example Prompts:** "Find SaaS executives in New York with 50-200 employees" "Get marketing directors at healthcare companies" "Show me VPs at fintech startups with recent funding" Node 2: Chat or Refinement This code node manages the conversation flow, handling both initial user queries and validation error feedback. Function:** Routes either the original chat input or validation error messages to the AI Agent Dynamic Input:** Combines chatInput and errorInput fields Purpose:** Creates a feedback loop for validation error correction Node 3: AI Agent The core intelligence node that interprets natural language and generates structured API calls. Functionality: Interprets user intent from natural language queries Maps concepts to Explorium API filters (job levels, departments, company size, revenue, location, etc.) Generates valid JSON requests with precise filter criteria Handles off-topic queries with helpful guidance Connected to MCP Client for real-time filter specifications AI Components: Anthropic Chat Model:** Claude Sonnet 4 for query interpretation Simple Memory:** Maintains conversation context (100 message window) Output Parser:** Structured JSON output with schema validation MCP Client:** Connected to https://mcp.explorium.ai/mcp for Explorium specifications System Instructions: Expert in converting natural language to Explorium API filters Can revise previous responses based on validation errors Strict adherence to allowed filter values and formats Default settings: mode: "full", size: 10000, page_size: 100, has_email: true Node 4: API Call Validation This code node validates the AI-generated API request against Explorium's filter specifications. Validation Checks: Filter key validity (only allowed filters from approved list) Value format correctness (enums, ranges, country codes) No duplicate values in arrays Proper range structure for experience fields (total_experience_months, current_role_months) Required field presence Allowed Filters: country_code, region_country_code, company_country_code, company_region_country_code company_size, company_revenue, company_age, number_of_locations google_category, naics_category, linkedin_category, company_name city_region_country, website_keywords has_email, has_phone_number job_level, job_department, job_title business_id, total_experience_months, current_role_months Output: isValid: Boolean validation status validationErrors: Array of specific error messages Node 5: Is API Call Valid? Conditional routing node that determines the next step based on validation results. If Valid:** Proceed to Explorium API: Fetch Prospects If Invalid:** Route to Validation Prompter for correction Node 6: Validation Prompter Generates detailed error feedback for the AI Agent when validation fails. This creates a self-correcting loop where the AI learns from validation errors and regenerates compliant requests by routing back to Node 2 (Chat or Refinement). Node 7: Explorium API: Fetch Prospects Makes the validated API call to Explorium's prospect database. Method:** POST Endpoint:** /v1/prospects/fetch Authentication:** Header Auth (Bearer token) Input:** JSON with filters, mode, size, page_size, page Returns:** Array of matched prospects with prospect IDs based on filter criteria Node 8: Pull Prospect IDs Extracts prospect IDs from the fetch response for bulk enrichment. Input:** Full fetch response with prospect data Output:** Array of prospect_id values formatted for enrichment API Node 9: Explorium API: Contact Enrichment Single enrichment node that enhances prospect data with both contact and profile information. Method:** POST Endpoint:** /v1/prospects/enrich Enrichment Types:** contacts, profiles Authentication:** Header Auth (Bearer token) Input:** Array of prospect IDs from Node 8 Returns: Contacts:** Professional emails (current, verified), phone numbers (mobile, work), email validation status, all available email addresses Profiles:** Full professional history, current role details, company information, skills and expertise, education background, experience timeline, job titles and seniority levels Node 10: Clean Output Data Transforms and structures the enriched data for downstream processing. Node 11: Loop Over Items Iterates through each prospect to generate individualized research and emails. Batch Size:** 1 (processes prospects one at a time) Purpose:** Enable personalized research and email generation for each prospect Loop Control:** Processes until all prospects are complete Node 12: Research Email AI-powered research agent that investigates each prospect using Explorium MCP. Input Data: Prospect name, job title, company name, company website LinkedIn URL, job department, skills Research Focus: Company automation tool usage (n8n, Zapier, Make, HubSpot, Salesforce) Data enrichment practices Tech stack and infrastructure (Snowflake, Segment, etc.) Recent company activity and initiatives Pain points related to B2B data (outdated CRM data, manual enrichment, static workflows) Public content (speaking engagements, blog posts, thought leadership) AI Components: Anthropic Chat Model1:** Claude Sonnet 4 for research Simple Memory1:** Maintains research context Explorium MCP1:** Connected to https://mcp.explorium.ai/mcp for real-time intelligence Output: Structured JSON with research findings including automation tools, pain points, personalization notes Node 13: Email Writer Generates personalized cold email drafts based on research findings. Input Data: Contact info from Loop Over Items Current experience and skills Research findings from Research Email agent Company data (name, website) AI Components: Anthropic Chat Model3:** Claude Sonnet 4 for email writing Structured Output Parser:** Enforces JSON schema with email, subject, message fields Output Schema: email: Selected prospect email address (professional preferred) subject: Compelling, personalized subject line message: HTML formatted email body Node 14: Create a draft (Gmail) Creates email drafts in Gmail for review before sending. Resource:** Draft Subject:** From Email Writer output Message:** HTML formatted email body Send To:** Selected prospect email address Authentication:** Gmail OAuth2 After Creation: Loops back to Node 11 (Loop Over Items) to process next prospect Alternative Output Options: Outlook:** Create drafts in Microsoft Outlook Mailchimp:** Add to email campaign SendGrid:** Queue for sending Lemlist:** Add to cold email sequence Workflow Flow Summary Input: User describes target prospects in natural language via chat interface Interpret: AI Agent converts query to structured Explorium API filters using MCP Validate: API call validation ensures filter compliance Refine: If invalid, error feedback loop helps AI correct the request Fetch: Retrieve matching prospect IDs from Explorium database Enrich: Parallel bulk enrichment of contact details and professional profiles Clean: Transform and structure enriched data Loop: Process each prospect individually Research: AI agent uses Explorium MCP to gather company and prospect intelligence Write: Generate personalized email based on research Draft: Create reviewable email drafts in preferred platform This workflow eliminates manual prospecting work by combining natural language processing, intelligent data enrichment, automated research, and personalized email generation—taking you from "I need marketing leaders at fintech companies" to personalized, research-backed email drafts in minutes. Customization Options Flexible Triggers The chat interface can be replaced with: Scheduled runs for recurring prospecting Webhook triggers from CRM updates Manual execution for ad-hoc campaigns Scalable Enrichment Adjust enrichment depth by: Adding more Explorium API endpoints (technographics, funding, news) Configuring prospect batch sizes Customizing data cleaning logic Output Destinations Route emails to your preferred platform: Email Platforms:** Gmail, Outlook, SendGrid, Mailchimp Sales Tools:** Lemlist, Outreach, SalesLoft CRM Integration:** Salesforce, HubSpot (create leads with research) Collaboration:** Slack notifications, Google Docs reports AI Model Flexibility Swap AI providers based on your needs: Default: Anthropic Claude (Sonnet 4) Alternatives: OpenAI GPT-4, Google Gemini Setup Notes Domain Filtering: The workflow prioritizes professional emails—customize email selection logic in the Clean Output Data node MCP Configuration: Explorium MCP requires Header Auth setup—ensure credentials are properly configured Rate Limits: Adjust Loop Over Items batch size if hitting API rate limits Memory Context: Simple Memory maintains conversation history—increase window length for longer sessions Validation: The AI self-corrects through validation loops—monitor early runs to ensure filter accuracy This workflow represents a complete AI-powered sales development representative (SDR) that handles prospecting, research, and personalized outreach with minimal human intervention.
by Avkash Kakdiya
How it works This workflow triggers when a HubSpot deal stage changes to Closed Won and automatically generates an invoice. It collects deal and contact data, builds a styled invoice, converts it into a PDF, and sends it to the client. The system logs all invoices and alerts the team, then monitors payment status with automated reminders. If payment is delayed, it escalates the issue and handles errors separately. Step-by-step Trigger and data collection** HubSpot - Deal Trigger – Starts workflow on deal stage change. IF - Is Deal Closed Won? – Filters only Closed Won deals. HTTP - Get Deal Details – Fetches deal information. HTTP - Get Deal Associations – Retrieves linked contacts. Code - Extract Contact ID – Extracts and formats data. HTTP - Get Contact Details – Gets customer details. Invoice generation** Code - Build Invoice + HTML – Creates invoice data and HTML layout. Send and store invoice** HTTP - Generate PDF – Converts HTML into PDF. Google Sheets - Log Invoice – Stores invoice records. Notion - Create Invoice Record – Tracks invoice internally. Gmail - Send Invoice Email – Sends invoice to client. Slack - Invoice Sent Alert – Notifies team. Payment tracking and follow-up** Wait - 7 Day Payment Window – Waits before checking payment. HTTP - Recheck Deal Stage – Checks payment status. IF - Payment Received? – Branches based on payment. Gmail - Follow-up Email #1 – Sends reminder if unpaid. Wait - 5 More Days – Adds extra delay. HTTP - Final Payment Check – Verifies final status. Slack - Payment Confirmed – Confirms successful payment. Escalation handling** IF - Still Unpaid? (Escalate) – Detects overdue invoices. Slack - Escalation Alert – Alerts team for action. Notion - Flag as Overdue – Updates record status. Slack - Late Payment Confirmed – Handles delayed payments. Error handling (separate flow)** Error Trigger – Captures workflow failures. Slack - Workflow Error Alert – Sends error notification. Why use this? Fully automates invoicing from deal closure to payment tracking Reduces manual billing work and human errors Improves payment collection with automated reminders Provides clear visibility with logs and team alerts Ensures reliability with built-in error monitoring
by isaWOW
Description Automatically re-engage old or inactive clients by sending AI-personalized follow-up emails using Claude 3.7 Sonnet, Gmail, and Google Sheets — with smart reply detection to avoid messaging clients who are already in active conversation. What this workflow does This workflow runs every day on a schedule and processes your entire old client database automatically. For each client, it checks whether they've replied to any of your emails in the last 30 days. If they have, it pauses automation and flags that client for manual reply. If they haven't, it fetches their last 10 email conversations, pulls scenario-based AI prompts and follow-up message direction templates from your Google Sheet, feeds everything into Claude 3.7 Sonnet to draft a highly personalized re-engagement email, sends it via Gmail, and updates your tracking sheet — all without any manual intervention. Perfect for agencies and freelancers who have past clients sitting idle in their database and want a fully automated, intelligent outreach system that feels human, not spammy. Key Features Smart 30-day reply detection: Before sending any email, the workflow checks the client's most recent email timestamp. If they replied within the last 30 days, automation is skipped and the sheet is flagged as "Reply Manually" so your team knows to handle it personally. Scenario-based AI prompting: Each client in your sheet is tagged with a Scenario. The workflow pulls the exact AI prompt and follow-up message direction that matches that scenario from your Google Sheet, so Claude always writes from the right context and angle. Full conversation context for Claude: Instead of drafting blindly, Claude receives the last 10 email conversations with the client, their original goal when hiring your agency, the detailed reason their contract ended, their industry, industry vertical, and the specific services they used — resulting in emails that feel genuinely personalized. Structured email output: Claude outputs a properly structured JSON with subject line, greeting, body content, and closing — ensuring the email is always cleanly formatted before sending. Live Google Sheets tracking: After every email sent, the workflow increments the email count in your sheet and updates the workflow status, giving you a live dashboard of where each client stands in the re-engagement sequence. Rate limiting built-in: A 1-minute wait between each client prevents Gmail API rate limit errors and ensures smooth processing even for large client lists. Loop-based batch processing: Every client in your database is processed one by one in a controlled loop — no skipped records, no duplicates. How it works Step 1 — Daily trigger fires: The workflow runs automatically every day using a Schedule Trigger. No manual action needed. Step 2 — Loads client database: Reads all rows from the "Database" sheet in your Google Sheet where the "Manually Stop Workflow" column is not flagged, so already-stopped clients are excluded automatically. Step 3 — Loops through each client: Passes each client record one by one into the processing loop using the Split In Batches node. Step 4 — Checks latest email from client: Fetches the single most recent email from the client's address using Gmail's filter by sender. Step 5 — 30-day window check: A JavaScript code node calculates how many days ago that email was sent, checks if it falls within the last 30 days, and formats the date cleanly (e.g., 21-Mar-2026). Step 6 — Routes based on reply status: A Switch node branches the flow: If replied within 30 days → Updates sheet with "Reply Manually" status and the latest email content, then loops back to next client. If no recent reply → Continues to AI email generation path. Step 7 — Parallel data fetching: Three nodes run in parallel — fetching the scenario-specific follow-up message template, the situation-based AI prompt, and the last 10 email conversations with the client from Gmail. Step 8 — Bundles email history: All 10 fetched emails are aggregated into a single text bundle to be passed into Claude as conversation context. Step 9 — Merges all inputs: A Merge node combines the follow-up template, situation prompt, and email conversation bundle into one unified data object. Step 10 — AI drafts the email: Claude 3.7 Sonnet receives the full context — prompt, follow-up direction, conversation history, client's goal, reason for contract ending, industry details, and services used — and drafts a re-engagement email tailored specifically to that client. Step 11 — Structured output parsing: The output is parsed into a clean JSON structure with subject, greeting, content, and closing fields using a Structured Output Parser. Step 12 — Sends email via Gmail: The formatted email is sent directly from your Gmail account to the client. Step 13 — Updates sheet and loops: The "Number of Emails Sent" counter is incremented in your sheet, the workflow waits 1 minute for rate limiting, then loops back to process the next client. Setup Requirements Tools you'll need: Active n8n instance (self-hosted or n8n Cloud) Google Sheets with OAuth access for client database management Gmail account with OAuth credentials Anthropic API key (for Claude 3.7 Sonnet) Estimated setup time: 20–30 minutes Configuration Steps Add credentials in n8n: Google Sheets OAuth API Gmail OAuth2 API Anthropic API (for Claude 3.7 Sonnet) Set up your Google Sheet with these tabs: Tab 1 — Database (main client list) Client Name Email Address Scenario Number of Emails Sent Followup Workflow (Running / Reply Manually) Latest Email from Client Date of Latest Email from Client The goal which client wanted to achieve by hiring an agency Detailed Reason Why Contract Got Ended Client is from Industry of Client's Industry Vertical Specific services they used Manually Stop Workflow (STOP) Tab 2 — Follow-up Messages (message templates) Scenario Number of Emails Sent Followup Message Direction Tab 3 — Situation (AI prompts per scenario) Scenario Prompt Update the Google Sheet ID: Replace all instances of YOUR_GOOGLE_SHEET_ID in the workflow nodes with your actual Google Sheet ID. Update the send email address: In the "Send Re-engagement Email" node, replace YOUR_EMAIL@yourdomain.com with the Gmail address you want to send from. Fill your client database: Add all old/inactive clients with their details, scenario tags, and goals into the Database tab. Create your scenarios and templates: Fill the Follow-up Messages and Situation tabs with the re-engagement angles and AI prompt instructions relevant to your business. Activate the workflow: Turn it on and let it run daily automatically. Use Cases Marketing & digital agencies: Re-engage a full database of past clients who stopped using your services — automatically, every single day, with zero manual effort. Freelancers: Keep past clients warm by sending intelligent, personalized check-in emails based on what they originally hired you for and why they left. SaaS companies: Run structured win-back campaigns for churned users by mapping scenarios to different churn reasons and tailoring AI messages accordingly. Consultants: Maintain long-term relationships with former clients by sending contextually relevant follow-ups that reference their original goals and show how you've improved. Sales teams: Use the 30-day reply detection to automatically filter out recently responsive leads and focus AI outreach only on truly cold contacts in your pipeline. Customization Options Change the AI model: Swap Claude 3.7 Sonnet for any other Anthropic model or replace with OpenAI GPT-4 in the LLM node — the agent and parser work with any LangChain-compatible model. Adjust the reply detection window: Change the 30 in the Date Checker code node to any number of days that fits your follow-up cadence (e.g., 14 days for more aggressive outreach). Add more scenario types: Simply add new rows to your Follow-up Messages and Situation sheets — the workflow dynamically fetches matching templates so no node changes are needed. Modify email structure: Edit the Structured Output Parser schema to add or remove fields like a PS section, CTA button text, or custom signature block. Add notifications: Connect a Slack, Discord, or webhook node after the Send Email node to notify your team every time a re-engagement email goes out. Expand tracking: Add more columns to your Google Sheet update nodes (e.g., last sent date, email subject used) to build a richer outreach history. Troubleshooting Gmail not fetching emails: Confirm your Gmail OAuth credentials are correctly connected and the sender filter is using the exact email address format from your sheet. Make sure Gmail API access is enabled in your Google Cloud Console. Claude not generating emails: Verify your Anthropic API key is active and has sufficient credits. Check that the Merge node is receiving all 3 inputs before passing data to the AI agent. Sheet not updating: Ensure the Google Sheets OAuth token has edit permissions on your spreadsheet. Confirm the "Email Address" column is set as the matching key in all update nodes. Emails sending to wrong address: Double-check that the sendTo field in the Send Email node is pointing to YOUR_EMAIL@yourdomain.com or the correct dynamic field reference. Loop not processing all clients: If some clients are being skipped, check the filter in the Old Client Database node — make sure the "Manually Stop Workflow (STOP)" column filter is only excluding rows where the value is explicitly set. Rate limit errors on Gmail: Increase the wait time in the Rate Limit Wait node from 1 minute to 2–3 minutes if you have a large client list or are hitting Gmail's sending limits. Resources n8n Documentation Anthropic Claude API Gmail API Reference Google Sheets API n8n LangChain Agent Node Important Notes This workflow is designed specifically for re-engagement outreach to past or inactive clients. It does not handle inbound replies — once a client responds, the workflow flags them for manual handling and stops automation for that contact. Make sure your Google Sheet is properly structured with all required columns before activating, as missing fields will cause the AI prompt to be incomplete and affect email quality. Always test with a small batch of 2–3 clients first before activating at full scale. Support Need help setting this up or want a custom version built for your specific use case? 📧 Email: info@isawow.com 🌐 Website: https://isawow.com/
by Feras Dabour
Who’s it for This template is for founders, finance teams, and solo operators who receive lots of invoices by email and want them captured automatically in a single, searchable source of truth. If you’re tired of hunting through your inbox for invoice PDFs or “that one receipt from three months ago,” this is for you. What it does / How it works The workflow polls your Gmail inbox on a schedule and fetches new messages including their attachments. A JavaScript Code node restructures all attachments, and a PDF extraction node reads any attached PDFs. An AI “Invoice Recognition Agent” then analyzes the email body and attachments to decide whether the email actually contains an invoice. If not, the workflow stops. If it is an invoice, a second AI “Invoice Data Extractor” pulls structured fields such as date_email, date_invoice, invoice_nr, description, provider, net_amount, vat, gross_amount, label (saas/hardware/other), and currency. Depending on whether the invoice is in an attachment or directly in the email text, the workflow either: uploads the invoice file to Google Drive, or document a direct link to the mail, then appends/updates a row in Google Sheets with all invoice parameters plus a Drive link, and finally marks the Gmail message as read. How to set up Add and authenticate: Gmail credentials Google Sheets credentials Google Drive credentials OpenAI (or compatible) credentials for the AI nodes Create or select a Google Sheet with the expected columns (date_email, date_invoice, invoice_nr, description, provider, net_amount, vat, gross_amount, label, currency, link). Create or select a Google Drive folder where invoices/docs should be stored. Adjust the Gmail Trigger filters (labels, search query, polling interval) to match the mailbox you want to process. Update node credentials and resource IDs (Sheet, Drive folder) via the node UIs, not hardcoded in HTTP nodes. Requirements n8n instance (cloud or self-hosted) Gmail account with OAuth2 setup Google Drive and Google Sheets access OpenAI (or compatible) API key configured in n8n Sufficient permissions to read emails, read/write Drive files, and edit the target Sheet How to customize the workflow Change invoice categories**: Extend the label enum (e.g., add “services”, “subscriptions”) in the extraction schema and adjust any downstream logic. Refine invoice detection**: Tweak the AI prompts to be more or less strict about what counts as an invoice or receipt. Add notifications**: After updating the Sheet, send a Slack/Teams message or email summary for high-value invoices. Filter by sender or subject**: Narrow the Gmail Trigger to specific vendors, labels, or keywords. Extend the data model**: Add fields (e.g., cost center, project code) to the extractor prompt and Sheet mapping to fit your bookkeeping setup.
by Bhuvanesh R
Instant, automated scheduling. This AI Scheduling Agent manages real-time appointments, availability checks, and rescheduling across Google Calendar and Sheets, eliminating human hold times. 🎯 Problem Statement Traditional call center or online booking systems often lack the flexibility to handle complex, multi-step customer requests like rescheduling, checking dynamic availability across multiple time slots, or handling context-aware conversational booking. This leads to friction, missed bookings, and high administrative overhead for service companies like HVAC providers. ✨ Solution This workflow deploys a sophisticated AI Scheduling Agent that acts as a virtual receptionist. It uses the Language Model's (LLM) "tool-use" capability to intelligently execute complex, sequential business logic (e.g., check availability before booking, find existing events before rescheduling) and manages the entire lifecycle of a service appointment, from initial inquiry to final confirmation. ⚙️ How It Works (Multi-Step Execution) Trigger: A customer request (e.g., from an external voice or text platform) hits the Webhook Trigger with intent details (e.g., tool\_request: 'reschedule\_appointment'). Agent Logic: The Receptionist Agent uses a strict system prompt and its internal tools to formulate an execution plan. It maintains conversational state via the simple-memory node. Tool Execution (Example: Reschedule): The Agent executes a predefined sequence of private tools: find\_old\_event: Locates the existing booking ID using the customer's email. check\_calendar: Verifies the proposed new time is available (2-hour window). reschedule\_appointment: Updates the calendar event. log\_lead: Updates the central Google Sheet. Synchronous Response: The Agent sends a confirmation or follow-up question via the respond\_to\_webhook node. Asynchronous Confirmation: The log\_lead action triggers a secondary workflow that composes a professional email via a second LLM (Anthropic) and sends it to the customer via Gmail, followed by an internal alert via Google Chat. 🛠️ Setup Steps Credentials: AI/LLM: Configure credentials for the Language Model used (OpenAI or Gemini) for the core Agent. Google Services: Set up OAuth2 credentials for Google Calendar (for booking/checking), Google Sheets (for logging), and Gmail (for customer confirmation). Google Calendar: Specify the technician's calendar ID (bhuvaneshx13@gmail.com in the template) in all Calendar nodes. Google Sheets: Create a new Google Sheet to serve as the Lead Log and update the Document ID and Sheet Name in the log\_lead and log\_lead\_trigger nodes. Tool Configuration: Review and customize the Agent's system prompt in the Receptionist node to align time zone rules (currently Asia/Kolkata - IST) and business hours (9:00 AM to 6:00 PM) with your operations. ✅ Benefits Increased Efficiency: Fully automates complex scheduling and rescheduling, freeing up human staff. Contextual Service: AI handles multi-turn conversations and adheres to strict business rules (e.g., 2-hour slots, maximum tool usage). Data Integrity: Ensures all bookings are immediately logged to Google Sheets, maintaining a centralized record (CRM). Professional Flow: Provides immediate confirmation to the customer via email and instant notification to the internal team via chat. 🚀 Other Use Cases The underlying multi-step, tool-execution pattern is highly versatile and can be adapted for any service industry requiring complex, rules-based scheduling: Real Estate:** Scheduling property viewings (Check agent availability → Book viewing → Send directions). HVAC Services:** Managing maintenance and repair visits (Diagnose issue type → Match with qualified technician → Check part availability → Schedule visit → Send service confirmation). Medical/Dental:** Booking patient appointments (Check insurance eligibility → Check doctor availability → Book → Send pre-visit forms). Legal Services:** Intake for consultations (Collect client issue → Check specialist availability → Book → Send retainer agreement). Automotive Repair:** Scheduling service bays (Check bay and mechanic availability → Book → Update internal service board).
by Jameson Kanakulya
Automated Email Order Tracking System with AI Classification and Notion Sync Overview ⚠️ Self-Hosted Solution Required This workflow requires a self-hosted n8n instance with active integrations for Gmail, Google Gemini AI, OpenAI, and Notion. API credentials and database IDs must be configured before use. Template Image Description This intelligent automation system monitors your Gmail inbox for order-related emails, extracts key order information using AI, and automatically syncs the data to a Notion database for centralized order tracking. Perfect for individuals managing multiple e-commerce accounts or small businesses tracking customer orders across various platforms (Amazon, Noon, Namshi, etc.). What This Workflow Does Email Monitoring: Continuously monitors Gmail inbox for new incoming emails Smart Classification: Uses AI to identify order-related emails (confirmations, shipping notifications, delivery updates) Intelligent Extraction: Parses email content to extract order details (order number, items, prices, status, delivery info) Database Synchronization: Automatically creates or updates Notion database records with order information Status Tracking: Monitors order progression through stages (Ordered → Shipped → Out for Delivery → Delivered) Key Features Multi-vendor support**: Works with any e-commerce platform (Amazon, Noon, Carrefour, Namshi, etc.) Duplicate prevention**: Searches existing records before creating new entries Smart updates**: Only modifies records when order status actually changes Status validation**: Detects backward status changes (potential returns/reshipments) Graceful error handling**: Handles missing data and optional fields intelligently Timestamped history**: Maintains audit trail of all status changes Technologies Used Gmail Trigger**: Email monitoring JavaScript Code**: Email content classification with pattern matching Google Gemini AI / OpenAI**: Natural language processing for order extraction Structured Output Parser**: JSON formatting and validation Notion API**: Database search, create, and update operations Prerequisites Before setting up this workflow, ensure you have: Self-hosted n8n instance (version 1.0.0 or higher) Gmail account with IMAP access enabled Google Gemini API key OR OpenAI API key Notion workspace with: Integration access configured Database created with the required schema (see below) Integration token/API key Notion Database Schema Create a Notion database with the following properties: Required Properties | Property Name | Type | Description | |--------------|------|-------------| | Name of the Item | Title | Product/item name | | Order Number | Text | Unique order identifier | | Quantity | Number | Number of items | | Expected Date | Date or Text | Expected delivery date | | Order Status | Select | Options: Ordered, Shipped, Out for Delivery, Delivered | Optional Properties (Recommended) | Property Name | Type | Description | |--------------|------|-------------| | Vendor | Select | E-commerce platform (Amazon, Noon, etc.) | | Customer Name | Rich Text | Order recipient name | | Price | Number or Rich Text | Item price | | Order Total | Number | Total order amount | | Currency | Select | Currency code (AED, USD, SAR, etc.) | | Delivery Location | Rich Text | Delivery city/address | | Notes | Rich Text | Status change history | | Created Date | Created Time | Auto-populated by Notion | | Last Updated | Last Edited Time | Auto-populated by Notion | Setup Instructions Step 1: Import the Workflow Copy the workflow JSON from this template In your n8n instance, go to Workflows → Add Workflow → Import from File/URL Paste the JSON and click Import Step 2: Configure Gmail Trigger Click on the Gmail Trigger node Click Create New Credential Follow the OAuth authentication flow to connect your Gmail account Configure trigger settings: Trigger On: Message Received Filters: (Optional) Add label filters to monitor specific folders Step 3: Configure AI Model (Choose One) Option A: Google Gemini AI Click on the Google Gemini AI Model node Click Create New Credential Enter your Gemini API key (obtain from Google AI Studio) Select model: gemini-1.5-pro or gemini-1.5-flash Option B: OpenAI Click on the OpenAI Chat Model node Click Create New Credential Enter your OpenAI API key (obtain from OpenAI Platform) Select model: gpt-4o or gpt-4-turbo Step 4: Update Email Classification Node Click on the Check Email Type node (JavaScript code) Review the classification patterns (pre-configured for common e-commerce emails) (Optional) Add custom keywords specific to your vendors Step 5: Configure Notion Integration 5.1: Create Notion Integration Go to Notion Integrations Click New Integration Name it (e.g., "n8n Order Tracker") Select your workspace Copy the Internal Integration Token 5.2: Share Database with Integration Open your Notion order database Click Share → Invite Search for your integration name and select it Grant Edit permissions 5.3: Get Database ID Open your Notion database in browser Copy the database ID from the URL: https://notion.so/workspace/DATABASE_ID?v=... ^^^^^^^^^^^^ 5.4: Configure Notion Nodes Click on Search a database in Notion node Click Create New Credential Paste your Integration Token In the node parameters: Database ID: Paste your database ID Filter: Set to search by Order Number property Repeat credential setup for Create a database page in Notion and Update a database page in Notion nodes Step 6: Update Agent Prompts Click on the Email Classification and Extraction Agent node Review the system prompt (pre-configured for common order emails) Update the {{$now}} variable if using a different timezone (Optional) Customize extraction rules for specific vendors Click on the Order Database Sync Agent node Replace {{notion_database_id}} with your actual database ID in the prompt Review status handling logic Step 7: Test the Workflow Click Execute Workflow to activate it Send yourself a test order confirmation email Monitor the execution: Check if email was classified correctly Verify extraction output in the AI agent node Confirm Notion database was updated Review your Notion database for the new/updated record Step 8: Activate for Production Click Active toggle in the top-right corner The workflow will now run automatically for new emails Monitor executions in the Executions tab Workflow Node Descriptions Email Trigger Monitors Gmail inbox for new incoming emails and triggers the workflow when a message is received. Check Email Type JavaScript code node that analyzes email content using pattern matching to identify order-related emails based on keywords, order numbers, and shipping terminology. Email Router (IF Node) Routes emails based on classification results: TRUE branch**: Order-related emails proceed to extraction FALSE branch**: Non-order emails are filtered out (no action) Email Classification and Extraction Agent AI-powered parser using Google Gemini or OpenAI to extract structured order information: Order number, items, prices, quantities Order status (Ordered/Shipped/Out for Delivery/Delivered) Customer name, delivery location, expected dates Vendor identification Structured Output Parser Validates and formats AI extraction output into clean JSON for downstream processing. Search a database in Notion Queries the Notion database by order number to check if a record already exists, preventing duplicates. Order Database Sync Agent Intelligent database manager that decides whether to create new records or update existing ones based on search results and status comparison. Create a database page in Notion Adds new order records to Notion when no existing record is found. Update a database page in Notion Modifies existing records when order status changes, appending timestamped notes for audit history. No Action Taken Terminates workflow branch for non-order emails with no further processing. Customization Options Add More Vendors Edit the Check Email Type node to add vendor-specific keywords: const customVendors = [ 'your-vendor-name', 'vendor-domain.com' ]; Modify Status Values Update the Email Classification and Extraction Agent prompt to add custom status values or change status progression logic. Add Email Notifications Insert a Send Email node after database sync to receive notifications for status changes. Filter by Labels Configure Gmail Trigger to monitor only specific labels (e.g., "Orders", "Shopping"). Multi-Database Support Duplicate the Notion sync section to route different vendors to separate databases. Troubleshooting Email not being classified as order Check the Check Email Type node output Add vendor-specific keywords to the classification patterns Review email content for order indicators AI extraction returning empty data Verify AI model credentials are valid Check if email content is being passed correctly Review the extraction prompt for compatibility with email format Notion database not updating Confirm integration has edit permissions on the database Verify database ID is correct in all Notion nodes Check that property names in the workflow match your Notion schema exactly Duplicate records being created Ensure Search a database in Notion node is filtering by Order Number Verify the search results are being evaluated correctly in the sync agent Status not updating Check if the Order Database Sync Agent is comparing current vs new status Review the status comparison logic in the agent prompt Performance Considerations Email Volume**: This workflow processes each email individually. For high-volume inboxes, consider adding filters or label-based routing. AI Costs**: Each email classification uses AI tokens. Monitor your API usage and costs. Rate Limits**: Notion API has rate limits (3 requests/second). The workflow handles this gracefully with built-in error handling. Privacy & Security All email content is processed through AI APIs (Google/OpenAI) - review their privacy policies Notion data is stored in your workspace with your configured permissions No data is stored or logged outside your n8n instance, AI provider, and Notion workspace Consider using self-hosted AI models for sensitive order information Support & Contributions Found a bug or have a suggestion? Please open an issue or contribute improvements to this template! License This template is provided as-is under the MIT License. Feel free to modify and distribute as needed. Credits Created for the n8n community to streamline e-commerce order tracking across multiple platforms.
by Rahul Joshi
Description Automate your GoHighLevel (GHL) client onboarding process from the moment a deal is marked as “Won.” This workflow seamlessly generates client folders in Google Drive, duplicates contract and kickoff templates, schedules kickoff calls, sends branded welcome emails, creates onboarding tasks in GHL, and notifies your team in Slack. 🚀📂📧📅💬 What This Template Does Triggers automatically when an opportunity is marked as Won in GHL 🏆 Validates and formats client data to ensure clean records 🔍 Creates structured client folders in Google Drive 📂 Copies contract & kickoff deck templates with client-specific naming 📝 Sends personalized welcome email via Gmail ✉️ Schedules kickoff call in Google Calendar 📅 Creates onboarding tasks in GHL for account managers ✅ Sends Slack notifications to keep your team informed instantly 💬 Catches errors and sends alerts to a Slack error channel 🚨 Key Benefits Saves 30–45 minutes per onboarding ⏱️ Eliminates manual data entry and human errors 🧹 Guarantees consistent client experience across all deals 🤝 Automates document creation & sharing 📄 Ensures team visibility and faster response times 📲 Built-in validation and error handling for reliability 🔐 Features Webhook-based trigger from GoHighLevel ⚡ Automatic client data formatting and validation 🛠️ Google Drive folder & document automation with templates 📂 Personalized Gmail welcome email with branding ✉️ Automated kickoff call scheduling in Google Calendar 📅 Task creation in GHL for seamless follow-up 📌 Slack notifications for both success and error handling 💬 Error channel with detailed failure reports 🚨 Requirements n8n instance (cloud or self-hosted) GoHighLevel account with API access 🔑 Google Workspace (Drive, Gmail, Calendar) 📊 Slack workspace with Bot Token & channel access 💬 Pre-created contract and kickoff deck templates in Google Drive 📄 Target Audience Agencies & consultants using GoHighLevel for client management 🏢 Sales teams wanting instant onboarding after a deal closes 💰 Operations teams seeking consistent and repeatable onboarding flows ⚙️ Account managers who need structured onboarding tasks ✅ Businesses scaling client onboarding and reducing manual workload 🚀 Step-by-Step Setup Instructions Configure GHL webhook → Trigger on “Opportunity Status Changed = Won.” Connect your GHL API credentials (OAuth2 or API key). Add Google Drive OAuth2 credentials → Set parent folder ID & template IDs. Configure Gmail OAuth2 → Replace hardcoded email with client email variable. Connect Google Calendar → Select the calendar for kickoff calls. Connect Slack API → Choose channels for onboarding updates and errors. Update template IDs for contract and kickoff deck in the workflow. Import workflow into n8n, map credentials, and test once. Enable workflow → onboarding is now fully automated. ✅
by Oneclick AI Squad
Streamline your post-event analysis with this smart n8n workflow. Triggered by a simple webhook, it instantly gathers attendee and engagement data from your event platform, calculates key metrics, and uses AI to generate a polished, professional report. The final summary is emailed to stakeholders and saved securely in a database — all without manual effort. Perfect for conferences, webinars, and corporate events. 📧📈 Key Features Webhook triggered** – Starts instantly via HTTP POST request Multi-source data collection** – Fetches attendees & engagement metrics Advanced analytics** – Calculates attendance rates, engagement scores, top sessions AI-powered insights** – Uses GPT-4 to generate professional reports Auto-email delivery** – Sends report to stakeholders Database archiving** – Saves reports to PostgreSQL What it Analyzes Attendance rates & check-ins Average session time Engagement scores (polls, Q&A, networking) Top performing sessions Attendee breakdown (by role & company) AI-generated insights & recommendations Workflow Process The Webhook Trigger node starts the workflow when an HTTP POST request is received with event details. Get Attendees (GET)** pulls the list of registered and checked-in participants from your event system. Get Engagement Metrics (GET)** retrieves interaction data like poll responses, Q&A activity, and session views. Process Metrics** calculates key stats: attendance rate, average session duration, engagement score, and ranks top sessions. AI Generate Report** uses GPT-4 to create a clear, professional summary with insights and recommendations based on the data. AI Agent** coordinates data flow and prepares the final report structure using chat model and memory tools. Save to Database (Insert)** stores the full report and raw metrics in PostgreSQL for future reference. Send Report Email** automatically emails the AI-generated report to the specified recipient. Send Response** returns a confirmation back to the triggering system via webhook. Setup Instructions Import this JSON into n8n Configure credentials: Event API (for GET requests) OpenAI (GPT-4) SMTP (for email delivery) PostgreSQL (for data storage) Trigger via webhook with event data Receive comprehensive report via email within minutes! Prerequisites Event platform with REST API (for attendee & engagement data) OpenAI API key (GPT-4 access) SMTP server credentials (Gmail, SendGrid, etc.) PostgreSQL database with write access Example Webhook Payload { "eventId": "evt_123", "eventName": "Tech Summit 2025", "eventDate": "2025-10-29", "email": "manager@company.com" } Modification Options Add custom metrics in the Process Metrics node (e.g., NPS score, feedback sentiment) Change AI tone in AI Generate Report (formal, executive summary, or creative) Modify email template in Send Report Email with your branding Connect to different data sources by updating GET nodes Add Slack or Teams notification after Send Report Email Ready to automate your event reporting? Get in touch with us for custom n8n workflows!
by Nguyen Thieu Toan
Smart email forwarder Zoho mail to Gmail with attachment, analysis by AI agent This n8n template automatically monitors a Zoho Mail inbox, analyzes every incoming email with Google Gemini AI, then forwards it — including all attachments — to a designated recipient via Gmail. The admin receives an instant smart digest on Telegram with priority level, deadline, and required action extracted by AI. If you manage a shared inbox and waste time triaging emails before forwarding them, this workflow does it for you — automatically. How it works Zoho Mail Trigger:** Detects new incoming emails matching a configured list of sender addresses. AI Analysis:* *Google Gemini reads the email subject and summary, then classifies the email type, assigns a priority level (High / Medium / Low), extracts deadlines, key numbers, and required actions — all returned as structured JSON. HTML Builder:* Assembles the forwarded email body with an *AI analysis panel** embedded at the top, shared across both sending paths. Attachment handling:* If the email has attachments, the workflow fetches each file via the *Zoho Mail API, renames binary keys to prevent collision, aggregates all files, then attaches them to the outgoing Gmail. Gmail:** Forwards the formatted email — with or without attachments — to the configured recipient. Telegram:** Sends the admin a structured, emoji-rich notification with all AI-extracted data, so decisions can be made without opening the email. How to use Connect credentials: Link your Zoho Mail, Gmail, Google Gemini (googlePalmApi), and Telegram Bot credentials in n8n. Configure in one place: Open the Set Context node and fill in all 6 fields — recipient email, subject prefix, Telegram chat ID, footer text, AI role description, and email category options. Set sender filter: Edit the Zoho Mail Trigger node and update the from field with the sender addresses you want to monitor. Activate the workflow — it runs automatically on every new matching email. Requirements n8n Version:* Built and tested on *n8n 2.9.4+*. *(It is recommended to use the latest n8n version for best compatibility.) Zoho Mail** account with OAuth2 credentials and API access enabled. Gmail** account connected via OAuth2. Google Gemini** API key (via googlePalmApi credential). Telegram Bot** token and a target chat ID. Customizing this workflow Different inbox:* Swap the *Zoho Mail Trigger for a Gmail Trigger, IMAP, or any other email node — the rest of the workflow remains unchanged. Different AI behavior:* Change ai_context and ai_type_options in *Set Context** to adapt the AI to any domain (legal, finance, HR, support) — no prompt editing needed elsewhere. Different notification channel:* Replace the *Telegram node with Slack, Discord, or Microsoft Teams. Persistent storage:* Add a *Google Sheets* or *Airtable** node after Telegram to log every forwarded email with its AI analysis for audit purposes. About the Author Created by: Nguyễn Thiệu Toàn (Jay Nguyen) Email: me@nguyenthieutoan.com Website: nguyenthieutoan.com Company: GenStaff (genstaff.net) Socials (Facebook / X / LinkedIn): @nguyenthieutoan More templates: n8n.io/creators/nguyenthieutoan
by Cheng Siong Chin
How It Works This workflow automates competitive intelligence gathering and market analysis for businesses needing real-time insights on competitors, industry trends, and market positioning. Designed for marketing teams, strategy analysts, and business development professionals, it solves the time-intensive challenge of manually monitoring competitor activities across multiple channels. The system schedules regular data collection, fetches competitor information from various sources, employs multiple AI agents (OpenAI for analysis, sentiment evaluation, and report generation) to process data, validates outputs through structured parsing, and delivers comprehensive reports via email. By automating data aggregation, sentiment analysis, and insight generation, organizations gain actionable intelligence faster, identify market opportunities proactively, and maintain competitive advantage through continuous monitoring—essential for dynamic markets where timing determines success. Setup Steps Connect Schedule Trigger (set monitoring frequency: daily/weekly) Configure Fetch Data node with competitor website URLs/APIs Add OpenAI API keys to all AI agent nodes Link Google Sheets credentials for storing historical analysis data Configure Gmail node with SMTP credentials for report distribution Set up Slack/Discord webhooks for instant critical alert notifications Prerequisites OpenAI API account (GPT-4 recommended), competitor data sources/APIs Use Cases SaaS competitor feature tracking, retail pricing intelligence Customization Modify AI prompts for industry-specific metrics, adjust sentiment thresholds for alert triggers Benefits Reduces research time by 85%, provides 24/7 competitor monitoring, eliminates manual data aggregation
by Cheng Siong Chin
How It Works This workflow automates satellite data processing by ingesting raw geospatial data, applying AI analysis, and submitting formatted reports to regulatory authorities. Designed for environmental agencies, research institutions, and compliance teams, it solves the challenge of manually processing large satellite datasets and preparing standardized submissions for government agencies. The system triggers on scheduled intervals or event webhooks, fetching satellite imagery and sensor data from ECC/climate APIs. Raw data flows through parsing and normalization stages, then routes to AI models for analysis—detecting environmental changes, calculating metrics, and identifying anomalies. Processed results are validated against agency specifications, formatted into SDQAR reports, and automatically stored in designated repositories. The workflow generates submission packages with required metadata, notifies stakeholders via Slack and email, and logs all activities to Google Sheets for audit trails. This eliminates hours of manual data processing, ensures compliance with submission standards, and accelerates environmental monitoring workflows. Setup Steps Configure ECC/climate API credentials for satellite data access Set up webhook endpoints for event-driven data ingestion triggers Add OpenAI API key for geospatial analysis and anomaly detection Configure NVIDIA NIM API for specialized environmental modeling Set Google Sheets credentials for audit logging and tracking Connect Slack workspace and specify notification channels for submission updates Configure Gmail OAuth for automated stakeholder notifications Prerequisites Active satellite data API access (ECC, NASA, ESA) with authentication credentials. Use Cases Automated climate monitoring with monthly regulatory submissions. Customization Modify AI analysis prompts for specific environmental parameters. Benefits Reduces satellite data processing time by 85% through end-to-end automation.