PDF invoice data extraction & tracking with Google Drive, Claude AI & Telegram
๐ฅ Invoice Intake & Notification Workflow
This automated n8n workflow monitors a Google Drive folder for newly uploaded invoice PDFs, extracts essential information (like client name, invoice number, amount, due date), logs the data into a Google Sheet for recordkeeping, and sends a formatted Telegram message to notify the billing team.
For step-by-step video build of workflows like this: https://www.youtube.com/@automatewithmarc
โ What This Workflow Does ๐ต๏ธ Watches a Google Drive folder for new invoice files ๐ Extracts data from PDF invoices using AI (LangChain Information Extractor) ๐ Appends extracted data into a structured Google Sheet ๐ฌ Notifies the billing team via Telegram with invoice details ๐ค Optionally uses Claude Sonnet AI model to format human-friendly summaries
โ๏ธ How It Works โ Step-by-Step Trigger: Workflow starts when a new PDF invoice is added to a specific Google Drive folder.
Download & Parse: The file is downloaded and its content extracted.
Data Extraction: AI-powered extractor pulls invoice details (invoice number, client, date, amount, etc.).
Log to Google Sheets: All extracted data is appended to a predefined Google Sheet.
AI Notification Formatting: An Anthropic Claude model formats a clear invoice notification message.
Telegram Alert: The formatted summary is sent to a Telegram channel or group to alert the billing team.
๐ง AI & Tools Used Google Drive Trigger & File Download
PDF Text Extraction Node
LangChain Information Extractor
Google Sheets Node (Append Data)
Anthropic Claude (Telegram Message Formatter)
Telegram Node (Send Notification)
๐ ๏ธ Setup Instructions Google Drive: Set up OAuth2 credentials and specify the folder ID to watch.
Google Sheets: Link the workflow to your invoice tracking sheet.
Telegram: Set up your Telegram bot and obtain the chat ID.
Anthropic & OpenAI: Add your Claude/OpenAI credentials if formatting is enabled.
๐ก Use Cases Automated bookkeeping and invoice tracking
Real-time billing alerts for accounting teams
AI-powered invoice ingestion and summary
PDF Invoice Data Extraction and Tracking with Google Drive, Claude AI, and Telegram
This n8n workflow automates the process of extracting key data from PDF invoices uploaded to Google Drive, processing it with Claude AI, tracking it in Google Sheets, and notifying a Telegram chat. It simplifies invoice management by automating data entry and communication.
What it does
This workflow performs the following steps:
- Monitors Google Drive: It listens for new PDF files uploaded to a specified folder in Google Drive.
- Extracts Text from PDF: When a new PDF is detected, it extracts the raw text content from the file.
- Extracts Structured Information with AI: It then uses an Anthropic (Claude AI) chat model via an "Information Extractor" node to parse the extracted text and identify specific data points from the invoice (e.g., invoice number, vendor, amount, date).
- Records Data in Google Sheets: The extracted, structured data is then appended as a new row to a designated Google Sheet spreadsheet for tracking.
- Notifies Telegram Chat: Finally, it sends a summary message with the extracted invoice details to a specified Telegram chat, confirming the processing and providing quick access to the information.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running instance of n8n.
- Google Account: With access to Google Drive (for the trigger and file storage) and Google Sheets (for data tracking). You will need to set up Google OAuth2 credentials in n8n.
- Anthropic AI Account: An API key for Anthropic's Claude AI (or an OpenAI API key if you switch the LLM node). You will need to set up credentials in n8n.
- Telegram Account: A Telegram bot token and the chat ID where notifications should be sent. You will need to set up Telegram credentials in n8n.
Setup/Usage
- Import the Workflow:
- Download the provided JSON file.
- In your n8n instance, go to "Workflows" and click "New".
- Click the three dots menu (...) in the top right and select "Import from JSON".
- Paste the workflow JSON or upload the file.
- Configure Credentials:
- Locate the "Google Drive Trigger", "Google Drive", "Google Sheets", "Anthropic Chat Model" (or "OpenAI Chat Model"), and "Telegram" nodes.
- For each node, click on it and configure the respective credentials. If you haven't set them up yet, n8n will guide you through creating new credentials (e.g., Google OAuth2, Anthropic API Key, Telegram Bot Token).
- Configure Google Drive Trigger:
- In the "Google Drive Trigger" node, specify the Google Drive folder ID that you want to monitor for new PDF invoices.
- Configure Google Sheets Node:
- In the "Google Sheets" node, specify the Spreadsheet ID and the Sheet Name where the extracted invoice data should be recorded. Ensure the sheet has appropriate headers for the data you plan to extract.
- Configure Information Extractor Node:
- Review the "Information Extractor" node. This node is pre-configured to extract specific data fields. You may need to adjust the prompt or the expected schema based on the exact structure and content of your invoices to ensure accurate extraction.
- Configure Telegram Node:
- In the "Telegram" node, enter the Chat ID where you want to receive notifications. You can also customize the message content to include specific extracted invoice details.
- Activate the Workflow:
- Once all credentials and configurations are set, click the "Activate" toggle in the top right corner of the n8n editor to enable the workflow.
Now, whenever a new PDF invoice is uploaded to the specified Google Drive folder, the workflow will automatically process it, extract the data, record it in Google Sheets, and send a notification to Telegram.
Related Templates
Track competitor SEO keywords with Decodo + GPT-4.1-mini + Google Sheets
This workflow automates competitor keyword research using OpenAI LLM and Decodo for intelligent web scraping. Who this is for SEO specialists, content strategists, and growth marketers who want to automate keyword research and competitive intelligence. Marketing analysts managing multiple clients or websites who need consistent SEO tracking without manual data pulls. Agencies or automation engineers using Google Sheets as an SEO data dashboard for keyword monitoring and reporting. What problem this workflow solves Tracking competitor keywords manually is slow and inconsistent. Most SEO tools provide limited API access or lack contextual keyword analysis. This workflow solves that by: Automatically scraping any competitorโs webpage with Decodo. Using OpenAI GPT-4.1-mini to interpret keyword intent, density, and semantic focus. Storing structured keyword insights directly in Google Sheets for ongoing tracking and trend analysis. What this workflow does Trigger โ Manually start the workflow or schedule it to run periodically. Input Setup โ Define the website URL and target country (e.g., https://dev.to, france). Data Scraping (Decodo) โ Fetch competitor web content and metadata. Keyword Analysis (OpenAI GPT-4.1-mini) Extract primary and secondary keywords. Identify focus topics and semantic entities. Generate a keyword density summary and SEO strength score. Recommend optimization and internal linking opportunities. Data Structuring โ Clean and convert GPT output into JSON format. Data Storage (Google Sheets) โ Append structured keyword data to a Google Sheet for long-term tracking. Setup Prerequisites If you are new to Decode, please signup on this link visit.decodo.com n8n account with workflow editor access Decodo API credentials OpenAI API key Google Sheets account connected via OAuth2 Make sure to install the Decodo Community node. Create a Google Sheet Add columns for: primarykeywords, seostrengthscore, keyworddensity_summary, etc. Share with your n8n Google account. Connect Credentials Add credentials for: Decodo API credentials - You need to register, login and obtain the Basic Authentication Token via Decodo Dashboard OpenAI API (for GPT-4o-mini) Google Sheets OAuth2 Configure Input Fields Edit the โSet Input Fieldsโ node to set your target site and region. Run the Workflow Click Execute Workflow in n8n. View structured results in your connected Google Sheet. How to customize this workflow Track Multiple Competitors โ Use a Google Sheet or CSV list of URLs; loop through them using the Split In Batches node. Add Language Detection โ Add a Gemini or GPT node before keyword analysis to detect content language and adjust prompts. Enhance the SEO Report โ Expand the GPT prompt to include backlink insights, metadata optimization, or readability checks. Integrate Visualization โ Connect your Google Sheet to Looker Studio for SEO performance dashboards. Schedule Auto-Runs โ Use the Cron Node to run weekly or monthly for competitor keyword refreshes. Summary This workflow automates competitor keyword research using: Decodo for intelligent web scraping OpenAI GPT-4.1-mini for keyword and SEO analysis Google Sheets for live tracking and reporting Itโs a complete AI-powered SEO intelligence pipeline ideal for teams that want actionable insights on keyword gaps, optimization opportunities, and content focus trends, without relying on expensive SEO SaaS tools.
AI multi-agent executive team for entrepreneurs with Gemini, Perplexity and WhatsApp
This workflow is an AI-powered multi-agent system built for startup founders and small business owners who want to automate decision-making, accountability, research, and communication, all through WhatsApp. The โvirtual executive team,โ is designed to help small teams to work smarter. This workflow sends you market analysis, market and sales tips, It can also monitor what your competitors are doing using perplexity (Research agent) and help you stay a head, or make better decisions. And when you feeling stuck with your start-up accountability director is creative enough to break the barrier ๐ฏ Core Features ๐งโ๐ผ 1. President (Super Agent) Acts as the main controller that coordinates all sub-agents. Routes messages, assigns tasks, and ensures workflow synchronization between the AI Directors. ๐ 2. Sales & Marketing Director Uses SerpAPI to search for market opportunities, leads, and trends. Suggests marketing campaigns, keywords, or outreach ideas. Can analyze current engagement metrics to adjust content strategy. ๐ต๏ธโโ๏ธ 3. Business Research Director Powered by Perplexity AI for competitive and market analysis. Monitors competitor moves, social media engagement, and product changes. Provides concise insights to help the founder adapt and stay ahead. โฐ 4. Accountability Director Keeps the founder and executive team on track. Sends motivational nudges, task reminders, and progress reports. Promotes consistency and discipline โ key traits for early-stage success. ๐๏ธ 5. Executive Secretary Handles scheduling, email drafting, and reminders. Connects with Google Calendar, Gmail, and Sheets through OAuth. Automates follow-ups, meeting summaries, and notifications directly via WhatsApp. ๐ฌ WhatsApp as the Main Interface Interact naturally with your AI team through WhatsApp Business API. All responses, updates, and summaries are delivered to your chat. Ideal for founders who want to manage operations on the go. โ๏ธ How It Works Trigger: The workflow starts from a WhatsApp Trigger node (via Meta Developer Account). Routing: The President agent analyzes the incoming message and determines which Director should handle it. Processing: Marketing or sales queries go to the Sales & Marketing Director. Research questions are handled by the Business Research Director. Accountability tasks are assigned to the Accountability Director. Scheduling or communication requests are managed by the Secretary. Collaboration: Each sub-agent returns results to the President, who summarizes and sends the reply back via WhatsApp. Memory: Context is maintained between sessions, ensuring personalized and coherent communication. ๐งฉ Integrations Required Gemini API โ for general intelligence and task reasoning Supabase- for RAG and postgres persistent memory Perplexity API โ for business and competitor analysis SerpAPI โ for market research and opportunity scouting Google OAuth โ to connect Sheets, Calendar, and Gmail WhatsApp Business API โ for message triggers and responses ๐ Benefits Acts like a team of tireless employees available 24/7. Saves time by automating research, reminders, and communication. Enhances accountability and strategy consistency for founders. Keeps operations centralized in a simple WhatsApp interface. ๐งฐ Setup Steps Create API credentials for: WhatsApp (via Meta Developer Account) Gemini, Perplexity, and SerpAPI Google OAuth (Sheets, Calendar, Gmail) Create a supabase account at supabase Add the credentials in the corresponding n8n nodes. Customize the system prompts for each Director based on your startupโs needs. Activate and start interacting with your virtual executive team on WhatsApp. Use Case You are a small organisation or start-up that can not afford hiring; marketing department, research department and secretar office, then this workflow is for you ๐ก Need Customization? Want to tailor it for your startup or integrate with CRM tools like Notion or HubSpot? You can easily extend the workflow or contact the creator for personalized support. Consider adjusting the system prompt to suite your business
๐ How to transform unstructured email data into structured format with AI agent
This workflow automates the process of extracting structured, usable information from unstructured email messages across multiple platforms. It connects directly to Gmail, Outlook, and IMAP accounts, retrieves incoming emails, and sends their content to an AI-powered parsing agent built on OpenAI GPT models. The AI agent analyzes each email, identifies relevant details, and returns a clean JSON structure containing key fields: From โ senderโs email address To โ recipientโs email address Subject โ email subject line Summary โ short AI-generated summary of the email body The extracted information is then automatically inserted into an n8n Data Table, creating a structured database of email metadata and summaries ready for indexing, reporting, or integration with other tools. --- Key Benefits โ Full Automation: Eliminates manual reading and data entry from incoming emails. โ Multi-Source Integration: Handles data from different email providers seamlessly. โ AI-Driven Accuracy: Uses advanced language models to interpret complex or unformatted content. โ Structured Storage: Creates a standardized, query-ready dataset from previously unstructured text. โ Time Efficiency: Processes emails in real time, improving productivity and response speed. *โ Scalability: Easily extendable to handle additional sources or extract more data fields. --- How it works This workflow automates the transformation of unstructured email data into a structured, queryable format. It operates through a series of connected steps: Email Triggering: The workflow is initiated by one of three different email triggers (Gmail, Microsoft Outlook, or a generic IMAP account), which constantly monitor for new incoming emails. AI-Powered Parsing & Structuring: When a new email is detected, its raw, unstructured content is passed to a central "Parsing Agent." This agent uses a specified OpenAI language model to intelligently analyze the email text. Data Extraction & Standardization: Following a predefined system prompt, the AI agent extracts key information from the email, such as the sender, recipient, subject, and a generated summary. It then forces the output into a strict JSON structure using a "Structured Output Parser" node, ensuring data consistency. Data Storage: Finally, the clean, structured data (the from, to, subject, and summarize fields) is inserted as a new row into a specified n8n Data Table, creating a searchable and reportable database of email information. --- Set up steps To implement this workflow, follow these configuration steps: Prepare the Data Table: Create a new Data Table within n8n. Define the columns with the following names and string type: From, To, Subject, and Summary. Configure Email Credentials: Set up the credential connections for the email services you wish to use (Gmail OAuth2, Microsoft Outlook OAuth2, and/or IMAP). Ensure the accounts have the necessary permissions to read emails. Configure AI Model Credentials: Set up the OpenAI API credential with a valid API key. The workflow is configured to use the model, but this can be changed in the respective nodes if needed. Connect the Nodes: The workflow canvas is already correctly wired. Visually confirm that the email triggers are connected to the "Parsing Agent," which is connected to the "Insert row" (Data Table) node. Also, ensure the "OpenAI Chat Model" and "Structured Output Parser" are connected to the "Parsing Agent" as its AI model and output parser, respectively. Activate the Workflow: Save the workflow and toggle the "Active" switch to ON. The triggers will begin polling for new emails according to their schedule (e.g., every minute), and the automation will start processing incoming messages. --- Need help customizing? Contact me for consulting and support or add me on Linkedin.