Generate & track invoices with Google Drive, PDF Converter & Gmail
Transform invoice creation from 30 minutes to 30 seconds - automatically generate professional PDF invoices with tax calculations, payment tracking, and instant delivery via email while archiving to Google Drive and notifying your team based on payment status.
What This Workflow Does
Revolutionizes invoice management with automated generation, intelligent payment tracking, and multi-channel delivery:
- Webhook-Triggered Generation - Instantly creates invoices from payment gateways, CRM updates, or manual triggers
- Smart Data Validation - Verifies required fields, validates email formats, and prevents incomplete invoices
- Automatic Invoice Numbering - Generates unique sequential invoice numbers with year-month-random format (INV-202411-5847)
- Dynamic Tax Calculations - Automatically computes taxes at configurable rates (GST, VAT, Sales Tax) with support for multiple tax jurisdictions
- Multi-Currency Support - Handles USD, EUR, INR, GBP with proper currency symbols and formatting
- Due Date Management - Auto-calculates payment due dates based on configurable terms (net-30, net-60, or custom)
- Payment Status Tracking - Routes workflows differently for paid, unpaid, or partially paid invoices
- Professional HTML Design - Creates beautifully branded invoices with modern typography and responsive layouts
- PDF Conversion - Transforms HTML into print-ready, professional-quality PDF documents
- Automated Email Delivery - Sends branded emails to customers with PDF attachments and payment instructions
- Google Drive Archival - Automatically saves invoices to organized folders with searchable filenames
- Smart Team Notifications - Different Slack alerts for paid vs unpaid invoices with embedded payment details
- Bank Details Integration - Includes account numbers, routing numbers, SWIFT codes for easy payment
- Payment Link Support - Embeds online payment links (Stripe, PayPal, Razorpay) for one-click payment
- Discount Handling - Applies promotional or volume discounts with automatic recalculation
- Custom Notes & Terms - Includes personalized thank-you messages and payment terms on every invoice
Key Features
- Comprehensive Data Validation: Prevents invoice errors by checking customer information, line item details, payment status validity, and email format before generation
- Intelligent Line Item Calculations: Automatically multiplies quantity by rate for each item, sums subtotals, applies discounts, calculates taxes, and computes final totals
- Payment Status Color Coding: Visual indicators show PAID (green), UNPAID (red), or PARTIALLY PAID (orange) status badges on invoices for instant recognition
- Flexible Tax Configuration: Default 18% tax rate with easy customization for GST, VAT, or sales tax across different regions and tax jurisdictions
- Automatic Date Management: Sets invoice date to today and calculates due dates based on configurable payment terms (default 30 days)
- Customer Information Cards: Organized presentation of billing information including company name, address, contact details in professional card layout
- Itemized Pricing Tables: Clean, professional tables showing description, quantity, rate, and amount for each line item with alternating row colors
- Payment Information Section: Highlighted section with bank details, tax IDs, GST numbers, and online payment links for easy customer reference
- Conditional Workflow Routing: Different automation paths for paid invoices (celebration notifications) vs unpaid invoices (payment reminders and follow-ups)
- Professional Email Templates: Pre-written customer emails with invoice summary, payment instructions, and company contact information
- Searchable File Names: Generates descriptive PDF names like "Invoice_INV-202411-5847_John_Doe.pdf" for easy retrieval and organization
- Print-Optimized PDFs: A4 format with proper margins and preserved colors for professional printing and digital viewing
Perfect For
- Freelancers & Consultants - Bill clients immediately after project milestones, consultations, or deliverables completion
- SaaS Companies - Generate monthly or annual subscription invoices automatically when billing cycles complete
- E-commerce Stores - Create invoices for B2B orders, wholesale purchases, or custom enterprise deals
- Service Providers - Bill hourly work weekly or bi-weekly with itemized time tracking and rate calculations
- Marketing Agencies - Invoice retainer clients on the 1st of each month with recurring service breakdowns
- Accounting Firms - Issue invoices for tax preparation, bookkeeping, and financial consulting services
- Web Development Agencies - Bill clients for development sprints, hosting fees, and maintenance contracts
- Coaching & Training Businesses - Invoice for coaching sessions, workshop fees, and training programs
- Healthcare Practices - Generate patient invoices for services rendered with insurance and payment tracking
- Legal Firms - Bill clients for legal consultations, document preparation, and case management
- Creative Studios - Invoice for design work, photography sessions, video production, and creative services
- Construction Contractors - Bill for completed project phases with material and labor itemization
- IT Support Companies - Generate invoices for managed services, support tickets, and equipment sales
- Event Management - Invoice clients for event planning, coordination, and vendor management fees
What You Will Need
Required Integrations
HTML to PDF API - PDF conversion service (API key required) - supports HTML/CSS to PDF API, PDFShift, or similar providers (approximately 1-5 cents per invoice)
Gmail or SMTP - Email delivery service for sending invoices to customers (OAuth2 or SMTP credentials)
Google Drive - Cloud storage for invoice archival and sharing (OAuth2 credentials required)
Optional Integrations
- Slack Webhook - Team notifications for paid and unpaid invoices (free incoming webhook)
- Payment Gateway Integration - Stripe, PayPal, Razorpay webhooks for automatic invoice generation on payment received
- Accounting Software - QuickBooks, Xero, FreshBooks integration for automatic invoice sync and bookkeeping
- CRM Integration - HubSpot, Pipedrive, Zoho CRM for customer data enrichment and invoice tracking
- Calendar Integration - Schedule payment reminders and follow-ups for overdue invoices
- SMS Notifications - Twilio integration for payment due date reminders via text message
Quick Start
- Import Template - Copy JSON workflow and import into your n8n instance
- Configure PDF Service - Add HTML to PDF API credentials in the "HTML to PDF" node
- Setup Gmail - Connect Gmail OAuth2 credentials in "Send a message" node and update sender email address
- Connect Google Drive - Add Google Drive OAuth2 credentials and set your preferred folder ID for invoice storage
- Customize Company Info - Edit "Enrich with Company Data" node to add your company name, address, email, phone, website, logo URL, bank details, and tax registration numbers
- Update Email Template - Modify email message in Gmail node with your company branding and messaging
- Configure Slack - (Optional) Add your Slack incoming webhook URLs in both "Notify Team" nodes
- Test Webhook - Use the production or test webhook URL to submit sample invoice data
- Verify Output - Check that PDF generates correctly, email sends successfully, and file saves to Google Drive
- Integrate Payment Gateway - Connect Stripe, PayPal, or other payment webhooks to trigger invoice generation automatically
Customization Options
- Multiple Tax Rates - Configure different tax rates for different products, services, or customer locations
- Early Payment Discounts - Add automatic discount calculation for payments received before due date
- Late Payment Fees - Calculate and add penalty fees for overdue invoices
- Recurring Invoice Automation - Schedule monthly or annual invoice generation for subscription customers
- Multi-Language Support - Translate invoice templates for international clients (Spanish, French, German, Hindi, Chinese)
- Custom Branding Themes - Create different invoice designs for different business units or service lines
- Partial Payment Tracking - Track multiple partial payments against single invoice with running balance
- Credit Note Generation - Create credit notes for refunds or overpayments
- Purchase Order Matching - Link invoices to customer PO numbers for enterprise clients
- Client Portal Integration - Generate unique links for clients to view and pay invoices online
- Automated Payment Reminders - Send reminder emails 7 days before due date, on due date, and for overdue invoices
- Batch Invoice Generation - Create multiple invoices simultaneously for monthly billing cycles
- Invoice Templates by Service Type - Different layouts for product sales, consulting services, retainer agreements
- Payment Plan Support - Split large invoices into installment payments with separate due dates
- Multi-Signature Authorization - Add approval workflow for invoices above certain threshold
Expected Results
- 95% time savings - Reduce invoice creation from 30 minutes to 30 seconds per invoice
- 100% accuracy - Eliminate calculation errors and missing information through validation
- Zero filing time - Automatic Google Drive organization with searchable filenames
- 50% faster payment collection - Professional invoices with payment links increase on-time payments
- Instant team alignment - Real-time Slack notifications keep accounting and sales synchronized
- Better cash flow - Faster invoice delivery means faster payment receipt
- Reduced administrative costs - Save 20+ hours monthly on invoice preparation and filing
- Professional brand image - Consistent, beautifully designed invoices elevate business credibility
- Improved customer experience - Customers receive clear, detailed invoices with easy payment options
- Scalable process - Handle 10x invoice volume without hiring additional staff
Use Cases
Freelance Designer Example
Designer completes client project on Friday afternoon. Manually creating invoice in Word takes 25 minutes including calculation checks, formatting fixes, and finding bank details. Client expects invoice same day to process Monday payment.
Solution: Designer clicks "Invoice Now" button in project management tool which triggers webhook. Workflow validates project details, generates branded invoice with itemized design services, converts to PDF, emails to client, and saves to Drive. Designer receives Slack notification confirming invoice sent.
Result: Invoice delivered in 45 seconds instead of 25 minutes. Client receives professional invoice within 2 minutes of project completion. Designer saves 24 minutes and impresses client with speed. Payment received Monday morning. Over 50 projects annually, saves 20+ hours and increases cash flow by receiving payments 2-3 days faster. Annual impact: $3,500 in saved time plus faster payment collection.
SaaS Startup Example
SaaS company with 250 subscription customers needs monthly invoices. Finance manager manually creates invoices in spreadsheet, exports to PDF, and emails individually. Process takes 2 full days monthly causing invoice delivery delays.
Solution: Connects workflow to Stripe subscription billing. When subscription renews, Stripe webhook triggers invoice generation. Customer name, email, subscription tier, and amount flow automatically. Invoice generates with payment link back to Stripe customer portal.
Result: All 250 invoices delivered automatically on billing date. Zero manual work required. Customers receive invoices instantly with one-click payment links. Subscription payment collection improves from 85% to 96% in first week. Finance manager reallocates 2 days monthly to strategic analysis. Annual impact: saves 192 hours ($9,600 value) plus $18,000 additional revenue from improved collection rates.
Marketing Agency Example
Agency invoices 35 retainer clients on 1st of month. Account managers manually compile billable hours, adjust for change orders, calculate totals, and send invoices. Inconsistent formatting causes client confusion and payment delays.
Solution: Time tracking system triggers webhook on last day of month with billable hours per client. Workflow generates consistent invoices with itemized service breakdown (social media hours, content creation, ad spend, strategy consulting). Each client receives branded invoice with their specific services.
Result: All 35 invoices generated and delivered by 8 AM on 1st of month. 100% brand consistency across all invoices. Client questions reduce by 70% due to clear itemization. Payment speed increases - average collection time drops from 38 days to 24 days. Annual impact: saves 30 hours monthly ($18,000 annually) plus $85,000 improved cash flow from faster collections.
Web Development Studio Example
Studio completes 12-15 client projects monthly. Invoicing delayed until projects 100% complete causes cash flow gaps. Manually creating milestone invoices for larger projects creates accounting burden.
Solution: Project management system triggers invoice on milestone completion (50% deposit, 75% progress payment, final 25%). Workflow automatically generates invoice for milestone amount with reference to project scope and completion percentage.
Result: Cash flow improves dramatically with milestone billing. Studio receives payments throughout project instead of only at end. Clients appreciate transparency of milestone invoicing. Payment disputes reduce by 85% since expectations clear. Annual impact: improved cash flow worth $145,000 in working capital plus 40 hours monthly saved (20,000 dollar annual value).
Healthcare Clinic Example
Medical practice sends 200+ patient invoices monthly for services not covered by insurance. Billing staff manually creates invoices in practice management system, exports to PDF, and mails or emails. Process error-prone and time-consuming.
Solution: Integrates workflow with electronic health records (EHR). When service marked as patient-pay, webhook triggers invoice generation with CPT codes, service descriptions, and amounts. Invoice includes payment plan options and online payment link.
Result: Invoices sent same day as service instead of 5-7 days later. Patients receive clear, itemized invoices with multiple payment options. Online payment adoption increases from 15% to 62%. Collection rate improves from 73% to 89%. Billing staff reallocates time to insurance follow-up and patient support. Annual impact: saves 25 hours monthly ($15,000 annually) plus $78,000 additional collections.
Pro Tips
- Trigger from Payment Gateways - Connect Stripe, PayPal webhooks to auto-generate invoices when payments received
- Use Descriptive Line Items - Detailed descriptions reduce customer questions and payment delays
- Include Payment Links - Online payment links increase payment speed by 40-60%
- Customize Tax Rates by Location - Configure different tax rates for different customer jurisdictions
- Set Payment Terms by Customer - VIP clients get net-45, standard clients net-30, new clients payment due on receipt
- Add Company Logo - Branded invoices with logos increase trust and reduce payment friction
- Schedule Batch Generation - Run workflow on 1st of month at midnight for all recurring clients
- Create Invoice Templates - Different templates for products vs services vs subscription billing
- Enable Read Receipts - Track when customers open invoice emails to time follow-ups
- Automate Payment Reminders - Send automated reminder 7 days before due date and on due date
- Archive by Client - Create separate Google Drive folders per client for easy retrieval
- Include Project References - Link invoices to project names, PO numbers, contracts for customer clarity
- Add Payment Instructions - Crystal clear instructions reduce "how do I pay?" emails
- Use Professional Email Copy - Friendly but professional email tone encourages prompt payment
- Track Unpaid Invoices - Use conditional workflow to escalate overdue invoices to collections process
Business Impact Metrics
Track these key metrics to measure workflow success:
- Invoice Generation Time - Measure average seconds from trigger to sent (target: under 60 seconds)
- Invoice Volume Capacity - Count monthly invoices generated through automation (expect 5-10x increase in capacity)
- Calculation Error Rate - Track invoices with math or tax errors (target: 0%)
- Time to Delivery - Monitor minutes from invoice creation to customer inbox (target: under 5 minutes)
- Team Hours Saved - Calculate monthly hours reclaimed from invoice automation (typical: 15-40 hours for small teams)
- Payment Collection Speed - Compare days to payment before and after automation (expect 20-35% reduction)
- Payment Collection Rate - Track percentage of invoices paid within terms (expect 10-15% improvement)
- Customer Payment Inquiries - Monitor support tickets about invoice questions (expect 40-60% reduction)
- Late Payment Rate - Track invoices paid after due date (expect 25-40% improvement)
- Cash Flow Impact - Measure working capital improvement from faster invoicing and collection (typical: 15-25% improvement)
Template Compatibility
- Compatible with n8n version 1.0 and above
- Works with n8n Cloud and Self-Hosted instances
- Requires HTML to PDF API service subscription (1-5 cents per invoice)
- No coding required for basic setup
- Fully customizable for industry-specific requirements
- Mobile-friendly PDF output
- Multi-currency and multi-language ready
- Supports batch processing and individual triggers
Ready to eliminate invoice headaches? Import this template and start sending professional, accurate invoices in seconds instead of minutes - improving your cash flow, delighting customers, and freeing your team to focus on growing the business!
n8n Invoice Generation and Tracking Workflow
This n8n workflow automates the process of generating, tracking, and sending invoices based on an incoming webhook trigger. It uses Google Drive to store generated invoices and Gmail to send them, with conditional logic to handle different scenarios.
What it does
This workflow streamlines your invoicing process through the following steps:
- Listens for a Webhook: The workflow is triggered by an incoming webhook, likely containing invoice-related data.
- Conditional Logic: It evaluates the incoming data using an "If" node. The exact condition is not specified in the JSON, but it branches the workflow based on some criteria.
- Generates Invoice (Placeholder): If the condition is met (True branch), an "HTTP Request" node is executed. This node is likely responsible for calling an external service or API to generate the invoice PDF.
- Stores Invoice in Google Drive: After generation, the workflow intends to save the generated invoice file to Google Drive.
- Sends Invoice via Gmail: Finally, the workflow uses Gmail to send the invoice to the recipient.
- Handles Other Cases (Placeholder): If the initial "If" condition is not met (False branch), a "Code" node is executed. This suggests custom logic for alternative scenarios, perhaps logging an error, sending a different notification, or performing a different action.
- Documentation/Notes: A "Sticky Note" is present, indicating that there might be important information or instructions related to the workflow's functionality or setup.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running instance of n8n.
- Webhook Source: An external system or application configured to send data to the n8n webhook URL.
- Google Drive Account: A Google account with access to Google Drive for storing invoices.
- Gmail Account: A Google account with access to Gmail for sending emails.
- External Invoice Generation Service/API: The "HTTP Request" node implies an external service or API is used to generate the actual invoice document. You will need access to and credentials for this service.
Setup/Usage
- Import the Workflow:
- Download the provided JSON file.
- In your n8n instance, click "Workflows" in the left sidebar.
- Click "New" and then "Import from JSON".
- Paste the JSON content or upload the file.
- Configure Credentials:
- Locate the "Google Drive" and "Gmail" nodes.
- Click on each node and configure your Google OAuth 2.0 credentials. If you don't have them set up, n8n will guide you through the process.
- The "HTTP Request" node might require API keys or other authentication details depending on the external invoice generation service it calls. Configure these within the node's settings.
- Configure the Webhook Trigger:
- Open the "Webhook" node.
- Copy the "Webhook URL". This is the URL your external system will send data to.
- Set the "HTTP Method" and "Response Mode" as required by your triggering system.
- Configure the "If" Node:
- Open the "If" node.
- Define the conditions that determine whether the invoice generation and sending process should proceed (True branch) or if the alternative "Code" logic should be executed (False branch).
- Configure "HTTP Request" Node:
- Open the "HTTP Request" node.
- Specify the URL, method, headers, and body required to interact with your invoice generation API. This will likely involve passing data received from the webhook.
- Configure Google Drive Node:
- Open the "Google Drive" node.
- Set the operation to "Upload File".
- Specify the folder where the invoices should be saved and the file name (e.g., using expressions to dynamically name the file based on invoice data).
- Configure Gmail Node:
- Open the "Gmail" node.
- Set the operation to "Send Email".
- Configure the recipient, subject, and body of the email, using expressions to dynamically insert invoice details and attach the generated PDF from the Google Drive node.
- Configure "Code" Node (False Branch):
- Open the "Code" node.
- Implement any custom JavaScript logic for the scenario where the "If" condition is false. This could be error handling, logging, or alternative notifications.
- Activate the Workflow: Once all nodes are configured, activate the workflow by toggling the "Active" switch in the top right corner of the n8n editor.
The workflow is now ready to automatically process incoming webhook requests, generate invoices, store them in Google Drive, and send them via Gmail.
Related Templates
Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax
Spark your creativity instantly in any chatβturn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. π What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing π§ Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation π Required Credentials OpenAI API Setup Go to platform.openai.com β API keys (sidebar) Click "Create new secret key" β Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai β Dashboard β API Keys Generate a new API key β Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) βοΈ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowβchat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" π― Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration β οΈ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions
Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review
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.
Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution
AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) π§ AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative β all powered by AI logic, sir. --- π‘ Key Advantages β‘ Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. π§ AI Qualification Engine An OpenAI-powered Agent evaluates the leadβs industry, region, and needs to generate a persona summary and routing rationale. π Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. π¬ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. π Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- βοΈ How It Works HubSpot Trigger β Captures a new lead as soon as itβs created in HubSpot. Fetch Contact Data β Retrieves all relevant fields like name, company, and industry. Clean & Format Data β A Code node standardizes and structures the data for consistency. Airtable Record Creation β Logs the lead data into the βLeadsβ table for centralized tracking. AI Agent Qualification β The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update β Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification β Sends a real-time message tagging the rep with lead info. Gmail Notification β Sends a personalized handoff email with context and follow-up actions. HubSpot Sync β Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- π οΈ Setup Steps Trigger Node: HubSpot β Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the βLeadsβ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- π Credentials Required HubSpot OAuth2 API β To fetch and update leads. Airtable Personal Access Token β To store and update lead data. OpenAI API β To power the AI qualification and matching logic. Slack OAuth2 β For sending team notifications. Gmail OAuth2 β For automatic email alerts to assigned reps, sir. --- π€ Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- π¬ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular β perfect for scaling across global sales teams, sir.