AI-powered invoice extractor via Telegram to Airtable
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.
What to replace before upgrading
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent1 (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (9)
- OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Airtable Tool
n8n-nodes-base.airtableTool - Telegram
n8n-nodes-base.telegram - Edit Fields (Set)
n8n-nodes-base.set - Extract from File
n8n-nodes-base.extractFromFile - Switch
n8n-nodes-base.switch - Telegram Trigger
n8n-nodes-base.telegramTrigger - AI Agent
@n8n/n8n-nodes-langchain.agent
What it does
π Description This workflow automates the extraction of structured invoice data from PDF files sent via Telegram and stores it in Airtable. It leverages GPT-4o for intelligent parsing and includes conversational memory for a seamless user experience. Designed for businesses and freelancers who receive invoices digitally and want to streamline their record-keeping. --- βοΈ How It Works 1. Telegram Trigger β Listens for incoming messages and PDF attachments. 2. Switch Node β Filters messages to ensure only PDFs are processed. 3. Extract from File β Parses the PDF content for text extraction. 4. Edit Fields β Prepares the extracted data for AI processing. 5. AI Agent (GPT-4o) β Orchestrates the workflow, prompts the user for missing info, and extracts structured data. 6. Simple Memory β Maintains conversational context across sessions. 7. Create Invoice (Airtable Tool) β Creates a new invoice record in Airtable. 8. Create Line Item (Airtable Tool) β Adds individual line items linked to the invoice. 9. Telegram Response β Sends confirmation back to the user. --- π Required Credentials To run this workflow successfully, youβll need: - Telegram Bot Token (via @BotFather) - OpenAI API Key (with GPT-4o access) - Airtable API Key and access to: - Base: Invoice Tracker Proper - Tables: Invoices and Line Items --- π§° Airtable Structure Invoices Table Fields: - Invoice Number - Date - Supplier - Supplier Address - Tax ID - PO Number - Due Date - Receiver Name - Receiver Address - Delivery Date - Total Tax - Total Amount Line Items Table Fields: - Product Code - Description - Unit Price - Quantity - Unit Type - Sub Total - Invoice (linked) --- π§ Features - AI-powered invoice parsing - PDF text extraction - Airtable record creation with relational linking - Telegram-based user interaction - Conversational memory - Error handling and data validation