by Giovanni Beggiato
How it works: Detects new unread Gmail messages Extracts sender name for personalized replies Classifies the email into one of four categories Applies the correct Gmail label and either sends an auto-reply, creates a draft, or logs the contact in Google Sheets Setup steps: Takes about 5โ10 minutes to connect accounts and set labels Connect Gmail, OpenAI, and optional Google Sheets in n8n Add label IDs, Google Sheet ID, sheet name, and phone number in Set โ Config Create four Gmail labels for the categories Keep full setup instructions in the sticky notes inside the workflow
by Ahmed Sherif
Personalized Cold Email System with Google Gemini AI and Telegram Approval An AI-powered cold email automation that uses Google Gemini to generate personalized outreach and a Telegram workflow for manual approval, ensuring high-quality, human-in-the-loop campaigns. Features Smart Lead Selection**: Fetches leads with an "Available" status from a designated Google Sheet. AI Email Generation**: Google Gemini creates a personalized subject line and email body based on lead data. Telegram Approval**: Sends each generated email to a Telegram chat for a one-click "Approve" or "Reject" decision. Edit & Regenerate**: Allows users to provide feedback on rejected emails, which the AI uses to regenerate a new version for re-approval. Auto-Send**: Approved emails are automatically dispatched via a configured SMTP server, including a professional signature. Complete Tracking**: Updates three separate Google Sheets (Filtered Leads, Sent Leads, Emails Sent) to maintain a clear audit trail. Rate Limiting**: A one-second delay between email sends helps avoid spam filters and protects sender reputation. Batch Processing**: Handles three leads per execution by default, which is configurable to scale up or down. How It Works A manual trigger initiates the workflow and captures the current date and time for logging. The system fetches a set number of leads (default is three) from the Filtered Leads sheet where the status is "Available". It loops through each lead individually to generate and send a unique email. The AI generates a personalized email (Subject + Body) using the lead's data. A preview of the email is sent to a specified Telegram chat with "Approve" and "Reject" buttons. If approved: The email is sent via SMTP. The lead's status is updated, and logs are written to the Sent Leads and Emails Sent sheets. The system waits one second before processing the next lead. If rejected: The system prompts the user for feedback in Telegram. The feedback is combined with the original prompt to generate a new email draft, which is sent for re-approval. A final notification is sent to Telegram when the batch is complete. Requirements Google Sheets with three tabs (see structure below). Telegram Bot Token and user/group Chat ID. Google Gemini API Key. SMTP Email Account credentials (server, port, username, password). Setup Instructions Google Sheets Setup: Create a new Google Sheet. Rename three tabs to exactly Filtered Leads, Sent Leads, and Emails Sent. Populate the Filtered Leads sheet with your lead data according to the structure specified below. API Credentials: Google Gemini: Generate an API key from your Google AI Studio account. Telegram Bot: Create a new bot by messaging @BotFather on Telegram and follow the prompts to get your API token. Get your Chat ID by messaging @userinfobot. SMTP Configuration: Obtain the SMTP server address, port, username, and password from your email provider (e.g., Google Workspace, Outlook). Automation Platform: In your automation platform (e.g., n8n, Make), create a new workflow. Connect your Google Sheets account using OAuth2. Add the Gemini API Key, Telegram Bot Token, Chat ID, and SMTP credentials into the respective modules or credential stores. Map the sheet columns to the variables in the workflow modules. Google Sheets Structure The automation requires the following column headers in each sheet. The names must be exact. Filtered Leads (Input Sheet)** FirstName: Lead's first name. LastName: Lead's last name. Email: Lead's email address. CompanyName: Name of the lead's company. JobTitle: Lead's current job title. Website: Company website (for AI context). LinkedIn: URL of the lead's LinkedIn profile. Notes: Any specific details or pain points for personalization. Status: Workflow status. Set to Available for leads ready to be processed. Sent Leads (Tracking Sheet)** Email: Email address of the contacted lead. CompanyName: Name of the company. TimestampSent: Date and time the email was sent. Emails Sent (Archive Sheet)** RecipientEmail: The lead's email address. Subject: The exact subject line that was sent. Body: The full email body that was sent. TimestampSent: Date and time the email was sent. Customization Guide This template can be adapted to fit specific campaign needs. Batch Size**: The number of leads processed per execution is controlled by the initial "Get Leads" module. Change the Limit parameter from 3 to your desired number. AI Prompt**: The core of the personalization is the prompt sent to the Gemini API. Modify this prompt to change the email's tone, structure, or call-to-action. You can instruct the AI to focus on specific data from the Notes column or reference a different value proposition. Lead Filtering**: The trigger condition is set to pull leads where Status = "Available". This can be changed to any other logic, such as Priority = "High" or Campaign = "Q4-Push", by adjusting the filter in the Google Sheets module. Email Signature**: The signature is typically configured within the SMTP "Send Email" module. Update the HTML or plain text here to change the signature across all sends. Telegram Notifications**: The text and buttons sent to Telegram for approval can be modified. You can add more lead data to the approval message (e.g., Job Title, Company Name) to give the approver more context.
by Rully Saputra
Create GitHub issues from webhook input and send alerts to Telegram This workflow streamlines bug tracking by using a webhook to collect issue reports, automatically classifying and summarizing them with Gemini AI, then sending critical issues to GitHub and real-time notifications to Telegram. Optional manager approval is built in for low-priority reports. ๐งโ๐ป Whoโs it for This workflow is ideal for: Engineering teams needing automated issue tracking from multiple systems QA testers or customer support agents who log bugs via custom tools DevOps teams monitoring logs or error reports in real time Teams using GitHub for issue tracking and Telegram (or any messenger) for notifications โ๏ธ How it works Webhook Trigger โ Listens for incoming POST requests containing bug or task data. AI-Powered Classification โ Uses the Gemini model to classify bugs as High or Low severity. Optional Approval โ If severity is Low, it waits for a managerโs approval before proceeding. Bug Summary Generation โ Passes through a filter and sends the input to Gemini to generate a clean summary. Create GitHub Issue โ Submits the summarized issue to your GitHub repository. Telegram Notification โ Sends a formatted message to a Telegram group or manager, depending on the path. ๐ ๏ธ How to set up Replace the GitHub node with your repo credentials and target repo. Set up the Telegram bot token and chat ID in the Telegram node. Customize the Gemini prompts for your preferred classification and summary logic. Define the conditions for โHighโ vs โLowโ severity based on your data. ๐ Requirements A GitHub account with a personal access token (with repo access) A Telegram bot token and group chat ID Google Gemini API credentials (or your preferred AI model integration) ๐ง How to customize the workflow Swap Telegram with another messaging platform like Slack, Discord, or Microsoft Teams. Adjust classification rules to match your business logic. Change approval flow to notify a different person or add additional logic before sending to GitHub. Extend the webhook input format to support richer data, such as user info or system metadata.
by Dominic Spatz
Overview Automate UniFi Controller updates on self-hosted instances. This workflow checks the official UniFi Debian repo for a fresh release in the last 24 hours and, if found, upgrades the unifi package via SSH. It can also summarize changes and ping you on Telegram. Sticky notes are included to guide setup. How it works Schedule* runs daily (default *13:13**). HTTP Request** fetches InRelease and parses Codename + Date. IF gate** continues only if the repo changed within 24h. SSH** runs: apt-get --allow-releaseinfo-change update apt-get upgrade -y unifi (Optional) LLM* creates a short summary โ *Telegram** sends it. Setup Bind credentials: SSH (required), OpenAI (optional), Telegram (optional). Set env var TELEGRAM_CHAT_ID for notifications. Adjust the Schedule Trigger to your maintenance window. Import inactive, test once, then activate. Customize Change the 24h freshness window in the Code node. Swap Telegram for Slack/Email if preferred. Add pre/post steps (backups, restarts) around the upgrade. Safety Test on a non-production controller first. No hardcoded secretsโuses n8n credentials and environment variables. If you want approval before upgrades, stop after the IF gate and notify only.
by Cheng Siong Chin
Overview Automate AI content creation from request to approval. While AI writes quickly, human review often delays deliveryโand multiple tools create workflow gaps and version confusion. This unified solution streamlines the entire process, enabling teams to produce quality content at scale with transparent tracking. How it works Submit a form with your topic, tone, and keywords. GPT-4o generates the content and assigns a quality score (0โ100). The reviewer receives an email to approve, edit, or reject the draftโall actions are automatically logged in Google Sheets for tracking and audit purposes. Setup steps Import the workflow JSON file into n8n Connect your OpenAI and Google account credentials Update three variables in the workflow: SHEET_ID (your Google Sheets document ID), REVIEWER_EMAIL (recipient for review notifications), and WEBHOOK_URL (for form submissions) Test the workflow with a sample submission Workflow Stages Submit a form with topic, tone, and keywords. GPT-4o generates content and assigns a quality score (0โ100). Reviewer receives an email to approve, edit, or reject the draft. All review actions are automatically logged in Google Sheets with timestamps and approval status. Requirements n8n v1.0+ instance, OpenAI API key with GPT-4o access, and Google Workspace with OAuth2 credentials. Custom options Choose model: gpt-4o, 4o-mini, or 3.5-turbo. Adjust score weights: Readability 40%, Keywords 30%, Length 30%. Key benefits Generate drafts 99% faster and approve content 95% quicker. Centralized tracking ensures clarity and accountability.
by Nitin Dixit
This n8n template demonstrates how to leverage AI to analyze trending short-form video content and automatically generate original, high-engagement video scripts inspired by proven viral formats. Use cases are many: Create consistent content calendars for beauty salons and aestheticians, maintain a steady stream of reels without creative burnout, or study viral patterns to understand what drives engagement across Instagram's trending hashtags! Good to know The workflow scrapes real trending reels from Instagram based on your chosen hashtag, ensuring you're always learning from current viral patterns Video transcription happens automatically, extracting the core messaging and pacing strategies from successful content Generated scripts use proven engagement structuresโhook, value delivery, and call-to-action timingโwithout copying original content All data is organized in Google Sheets for easy review, editing, and tracking of script performance The AI model intelligently mirrors the emotional tone and narrative structure while creating entirely new storylines How it works A form trigger collects your hashtag and desired number of reels to analyze The Apify API scrapes trending Instagram reels matching your hashtag, filtering for high engagement (1000+ likes from the last 7 days) Filtered reels are added to your Google Sheet with metadata: captions, engagement metrics, video links, and music information Each reel is automatically transcribed using video-to-text technology, capturing the exact dialogue and timing The AI Agent analyzes each transcript to understand its underlying structureโpacing, tone, curiosity hooks, and CTA placement Using this analysis, Claude generates a completely original script that follows the same proven engagement formula but with a fresh topic or angle Generated scripts are saved back to your Google Sheet alongside the source materials for comparison and refinement A summary email is sent confirming the number of scripts created and ready for production How to use Start by entering a beauty or lifestyle hashtag (e.g., #aiautomation, #beautysalon, #haircare) and specify how many trending reels to analyze Review the scraped content in your Google Sheet to understand what's currently resonating Check the generated scripts and use them as jumping-off points for your own video production Iterate on the process with different hashtags to discover emerging trends in your niche Requirements Apify account and API key for Instagram scraping (free tier available) Google Sheets document set up to store reel data and generated scripts OpenAI API key for the AI script generation Gmail account for the completion notification (optional but recommended) Customising this workflow Adjust the engagement filter thresholds (currently 1000+ likes, 7 days old) to capture micro-trends or evergreen content Modify the AI prompt in the "AI Agent" node to enforce specific brand voice, tone, or content guidelines Add additional Google Sheet columns to track metrics like script-to-video conversion rates or audience response Connect to additional distribution channelsโautomatically post scripts to team Slack, create video production briefs, or trigger video editing templates Experiment with different video categories by creating multiple instances of this workflow for different hashtags or niches
by Growth AI
SEO Anchor Text Generator with n8n and Claude AI Generate optimized SEO anchor texts for internal linking using AI automation. This workflow processes your website pages and creates diverse, SEO-compliant anchor variations automatically. Who's it for SEO specialists managing large websites with extensive internal linking needs Content managers looking to automate anchor text creation for better search rankings Digital marketers seeking to optimize internal linking strategies at scale Web agencies handling multiple client websites with SEO requirements What it does This workflow automatically generates 10 unique SEO anchor texts with 3-5 linguistic variations each (40-50 total variations per page) using Claude AI. It analyzes your page content, applies advanced SEO criteria, and creates diverse anchor types including exact match, brand anchors, long-tail keywords, contextual phrases, and call-to-action variants. How it works The system connects to your Google Sheets document containing page information, filters pages needing anchor generation, processes each page individually through Claude AI, and updates your spreadsheet with generated anchor texts. The workflow ensures semantic relevance, keyword optimization, natural language flow, and linguistic diversity while avoiding over-optimization penalties. Requirements Google Sheets with OAuth2 authentication configured in n8n Anthropic API key for Claude AI model access Template spreadsheet with proper column structure (Page, URL, Description, Anchors) Pages must have URL and description but empty anchor fields to trigger processing How to set up Step 1: Prepare Your Data Duplicate the template spreadsheet: https://docs.google.com/spreadsheets/d/1VNl8xLYgRrNcKrmN9hCdfov1dMnwD44tAALJZAlagCo Fill in your page information in the "Anchor" sheet: Page: Name/title of your page (can use hierarchical levels Niv 0-3) URL: Complete URL of the page Description: Brief description of page content to help AI generate relevant anchors Leave the "Anchors" column empty for pages needing anchor generation Step 2: Configure n8n Credentials Set up Google Sheets OAuth2: Go to n8n credentials settings Add new Google Sheets OAuth2 API credential Follow OAuth flow to authenticate with Google Test connection with your spreadsheet Configure Anthropic API: Obtain API key from Anthropic Console Add new Anthropic API credential in n8n Enter your API key and test connection Step 3: Import and Activate Workflow Import the workflow from the provided JSON Update credential references to match your configured credentials Test the Chat Trigger webhook to ensure it's accessible Activate the workflow in n8n Step 4: Execute the Workflow Send a chat message with your Google Sheets URL to trigger the workflow Monitor execution through n8n interface to track progress Check your spreadsheet for automatically generated anchor texts Review and customize generated anchors as needed for your content How to customize the workflow Modify AI Prompt Instructions Update the "Gรฉnรฉrateur d'ancres" node prompt to: Change the number of anchor variations generated Adjust SEO criteria and anchor types Modify linguistic variation requirements Customize language style and tone Add specific industry terminology Adjust Data Processing Customize the "Filter" node conditions to: Change criteria for pages requiring anchor generation Add additional validation rules Modify column names to match your spreadsheet structure Enhance Output Formatting Modify the "Import Sheets" code node to: Change data transformation logic Add additional processing steps Customize how results are formatted for Google Sheets Include timestamp or processing metadata Scale for Large Datasets Optimize the "Loop Over Items" batch processing: Adjust batch sizes for better performance Add error handling for failed API calls Implement retry logic for robustness Add progress tracking mechanisms Integration Extensions Extend functionality by adding nodes for: Slack notifications when processing completes Email reports with generation statistics Integration with content management systems Automated content publishing with generated anchors Advanced Customization Tips Language Adaptation: Modify the AI prompt for different languages by adjusting linguistic variation rules Industry Specialization: Add domain-specific terminology and SEO best practices to the prompt Quality Control: Implement additional filtering to review generated anchors before updating sheets Analytics Integration: Connect with Google Analytics to prioritize high-traffic pages for anchor generation Content Integration: Add nodes to automatically insert generated anchors into CMS or static site generators
by Cheng Siong Chin
Introduction Automate price monitoring for e-commerce competitorsโideal for retailers, analysts, and pricing teams. โ ๏ธ Self-Hosted Only: Requires self-hosted n8n instance. How It Works Scrapes competitor URLs, extracts data via AI, detects price/stock changes, logs to Google Sheets with email alerts. Workflow Template Trigger โ Scrape โ AI Extract โ Parse โ Compare โ Detect Changes โ Update Sheets + Alert Workflow Steps Scraping: Firecrawl fetches Nike, Adidas, Sneaker data AI Extraction: Processes product details Parsing: Structures response Historical Check: Reads Sheets data Change Detection: Identifies price/stock updates Dual Output: Updates Sheets + sends alerts Setup Instructions 1. Firecrawl API Get key from dashboard โ Add to n8n 2. OpenAI API Get key from platform โ Add to n8n 3. Google Sheets OAuth2 Create OAuth2 in Google Cloud Console โ Authorize in n8n โ Enable API 4. Gmail OAuth2 Use same project โ Authorize in n8n โ Enable API 5. Spreadsheet Setup Create Sheet with required columns โ Copy ID from URL โ Paste in workflow Prerequisites Self-hosted n8n, Firecrawl account, OpenAI key, Google account (Sheets + Gmail OAuth2) Customization Add URLs, adjust thresholds, integrate Slack Benefits Saves 2+ hours daily, real-time tracking, automated alerts Google Sheets Structure Required Columns: Product Name** (Column A) Current Price** (Column B) Previous Price** (Column C) Stock Status** (Column D) Last Updated** (Column E) URL** (Column F) Change Detected** (Column G)
by Elegant Biztech
Automated QuickBooks New Customer Welcome Emails This workflow provides a robust solution for QuickBooks users looking to automate their new customer onboarding process. It solves the time-consuming and error-prone task of manually sending welcome emails by creating a fully automated system that ensures every new customer receives a timely, personalized, and professional welcome. The workflow periodically checks your QuickBooks Online account for new entries. To prevent sending duplicate emails to existing customers, it cleverly uses a Google Sheet as a simple database, tracking every customer who has already been contacted. This makes the process reliable and safe to run on an automated schedule. This template was crafted with care by the team at Elegant Biztech to help you build stronger customer relationships through smart automation. How the Workflow Operates Scheduled Trigger: The workflow initiates on a customizable schedule (e.g., every hour). Fetch Data: It simultaneously fetches all customer data from your QuickBooks account and the list of already-processed customer IDs from your Google Sheet. Find New Customers: It compares the two lists to isolate only the new customers who have not yet been processed. Log New Customers: For each new customer found, the workflow performs two logging actions: It appends their full details (Name, Company, Email, etc.) to a "log" sheet for your records. It adds their unique Customer ID to the "tracking" sheet to ensure they are not emailed again in the future. Craft Personalized Email: A Email Template node dynamically generates a beautiful, responsive HTML email, personalized with the customer's name, company, and location details. Send Welcome Email: The final node sends the uniquely crafted email to the new customer. Prerequisites Before you begin, please ensure you have the following: An active n8n instance. A QuickBooks Online account with API access. A Google account. An email service (e.g., SMTP, Gmail, Outlook) connected to n8n as credentials. Step-by-Step Setup Guide Follow these instructions carefully to configure the workflow for your use. 1. Create the Google Sheet This workflow requires a Google Sheet with two specific tabs to function as its database. Create a new Google Sheet. Rename the first tab to Processed IDs. In cell A1, create the header: CustomerIds. Create a second tab and name it New Customer Logs. In row 1, create the following headers: Customer_Name, Company_Name, Email_ID, Phone_No, Customer_ID. 2. Connect Your Accounts You must authenticate your accounts in the designated nodes. Get many Customers node:** Select this node and connect your QuickBooks Online credentials. Read Old Customers node:** Connect your Google Sheets account credentials here. This will be automatically used by the other Google Sheets nodes. Send Personalized Welcome Email node:** Connect the credentials for the email account you wish to send from. 3. Configure the Google Sheets Nodes Point the workflow to the correct sheet and tabs you just created. Read Old Customers node:** In the Document ID field, select your new Google Sheet. In the Sheet Name field, select the Processed IDs tab. Log New Customer Details node:** Verify the Document ID field is correctly set to your Google Sheet. In the Sheet Name field, select the New Customer Logs tab. Log New Customer ID for Tracking node:** Verify the Document ID is correct. In the Sheet Name field, select the Processed IDs tab. 4. Customize the Email Template Personalize the welcome email to match your brand. Open the Code node. Inside the code editor, find and replace these four placeholder values: Your Logo URL: Replace the placeholder link with a public URL to your company's logo. Your Website Link: Replace the placeholder with a link to your website's dashboard or homepage. Your Support Email: Replace the mailto: link with your company's support email. Your Company Name: Update the company name in the copyright footer. Next, select the Send Personalized Welcome Email node and update the Subject field with your company's name. 5. Activate the Workflow Open the Scheduler node to set the schedule for how often you want the workflow to run. Save the workflow. Click the Active toggle at the top right of the screen. Your automated welcome email system is now live! For questions or to explore more custom solutions, visit us at elegantbiztech.com.
by Rahul Joshi
Description Automate Zendesk ticket follow-up management by fetching pending tickets daily, enriching and logging them into Google Sheets, creating ClickUp tasks for team reminders, and sending professional follow-up emails to customers. Keeps your support pipeline clean and ensures no pending tickets fall through the cracks. ๐ซ๐๐งโ What This Template Does Triggers daily (MonโFri at 8 PM) to check Zendesk for pending tickets. โฐ Filters only "pending" status tickets to reduce noise. ๐ Formats ticket data with priority, age, and attention flags. ๐ง Logs all tickets into Google Sheets for reporting and analytics. ๐ Creates ClickUp tasks for team follow-up and accountability. ๐ Generates professional HTML follow-up emails grouped by customer. ๐จ Sends emails via Gmail with ticket details and next steps. ๐ง Key Benefits Ensures no pending Zendesk tickets are forgotten. โฑ๏ธ Builds a historical log for analytics and audit trails. ๐งพ Keeps your support team accountable with ClickUp tasks. โ Delivers personalized, branded follow-up emails to customers. ๐ก Reduces manual effort in tracking and responding to tickets. ๐ Features Schedule Trigger โ Runs MonโFri at 8:00 PM. ๐๏ธ Zendesk Integration โ Fetches pending tickets automatically. ๐ซ Smart Data Processing โ Cleans descriptions, calculates age, flags urgent tickets. โก Google Sheets Logging โ Maintains a structured log with Ticket ID, URL, tags, status, etc. ๐ ClickUp Tasks โ Automatically creates tasks per pending ticket. ๐ Email Generation โ Groups tickets per customer, builds professional HTML follow-ups. ๐จ Gmail Delivery โ Sends personalized follow-ups directly to customers. ๐ง Requirements n8n instance (cloud or self-hosted). Zendesk API credentials with read access. Google Sheets OAuth2 credentials with write access. ClickUp API credentials for task creation. Gmail OAuth2 credentials for sending emails. Pre-configured Google Sheet for pending ticket tracking. Target Audience Customer support teams managing Zendesk tickets. ๐ง SaaS companies wanting automated follow-ups. ๐ CS managers ensuring accountability in ticket handling. ๐ ๏ธ SMBs reducing customer wait time with proactive follow-ups. ๐ข Remote support teams needing automated reminders and logs. ๐ Step-by-Step Setup Instructions Connect Zendesk, Google Sheets, ClickUp, and Gmail credentials in n8n. ๐ Update the schedule trigger (default: MonโFri at 8:00 PM). โฐ Replace the Google Sheet ID with your pending ticket log sheet. ๐ Configure your ClickUp space/list IDs for task creation. ๐ Update email branding and sender address in the email generator. ๐จ Test with sample tickets to validate Sheets logging, ClickUp tasks, and Gmail delivery. โ
by Avkash Kakdiya
How it works This workflow automatically captures website visitors using Albacross, enriches their data with Datagma, and syncs it into HubSpot. Once leads are created or updated, a personalized email is generated and sent through Gmail. All email activities are logged in HubSpot for proper sales tracking and follow-up. Step-by-step 1. Trigger the workflow Schedule Trigger** โ Runs the workflow at set intervals (hourly, daily, or custom). 2. Capture website visitors Albacross Website Visitor** โ Pulls company and visitor details from website activity. 3. Enrich lead data Enrich Lead Data** โ Enhances visitor records with personal and professional details via Datagma. 4. Sync to CRM Create/Update HubSpot Contact** โ Creates or updates contact records in HubSpot with enriched lead data. 5. Generate personalized outreach Generate Personalized Message** โ Builds a tailored email including company, industry, and value propositions. 6. Send and track emails Send Personalized Email** โ Sends the outreach message through Gmail. Log Email Activity in HubSpot** โ Tracks email engagement automatically in HubSpot. Why use this? Capture and identify anonymous website visitors as potential leads. Enrich contact details with accurate, professional information. Keep HubSpot updated automatically without manual data entry. Send highly personalized outreach emails tailored to each lead. Log all communication for better pipeline visibility and sales follow-up.
by Ovadia Rocks
This template allows you to automatically process scanned invoices from Google Drive, extract key information using AI, and organize the data in Google Sheets with email notifications. Overview This comprehensive workflow automates the entire invoice processing pipeline by monitoring a Google Drive folder for new invoice uploads, intelligently processing both PDF and image formats, extracting structured data using AI-powered information extraction, and automatically organizing the results in a Google Sheet while sending email notifications. The system handles various file formats and includes smart fallback mechanisms for challenging documents like CamScanner PDFs. How it Works File Monitoring: The workflow continuously monitors a specified Google Drive folder for new invoice files using a trigger that checks every minute for newly created files. File Processing: When new files are detected, the system downloads them and determines the file type (PDF or image) using a smart switch mechanism. Text Extraction: For PDFs: Attempts direct text extraction first For Images: Uses OCR.Space API for optical character recognition For problematic PDFs (like CamScanner): Falls back to OCR processing AI Information Extraction: Processes the extracted text through OpenAI's language model to identify and extract key invoice information including: Company name Total amount Currency Invoice date Invoice number Data Storage: Automatically appends the extracted information to a Google Sheet with links back to the original scanned documents. Notification: Sends formatted email notifications via Mailgun when new invoices are processed, including an HTML table summary. How to Use Setup Google Drive: Create a dedicated folder in Google Drive for invoice uploads and note the folder ID. Configure Credentials: Set up the following credential connections in n8n: Google Drive OAuth2 API Google Sheets OAuth2 API OpenAI API OCR.Space API Mailgun API Update Configuration: Replace the Google Drive folder ID with your target folder Replace the Google Sheets document ID with your destination spreadsheet Update email addresses in the Mailgun node Test the Workflow: Use the manual trigger to process existing invoices in your folder for initial testing. Activate: Enable the workflow to start automatic monitoring of new invoice uploads. Requirements External APIs: OpenAI API** - For AI-powered information extraction from invoice text OCR.Space API** - For optical character recognition of image-based invoices Mailgun API** - For sending email notifications Google Services: Google Drive API** - For monitoring folders and downloading files Google Sheets API** - For storing extracted invoice data Setup Prerequisites: Google Drive folder dedicated to invoice uploads Google Sheet with appropriate column headers (date, company name, total, currency, invoice number, scan link, etc.) Email domain configured with Mailgun (or alternative email service) OCR.Space account for image processing capabilities: https://ocr.space/OCRAPI Recommended Settings: Set the Google Drive trigger to check for new files every minute Ensure sufficient API rate limits for your expected invoice volume Configure proper error handling for failed OCR or AI extraction attempts