Log receipt expenses in Notion with Gmail, Telegram, and OpenAI
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Worth a look
- Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger Receipts1)
Nodes used (15)
- Error Trigger
n8n-nodes-base.errorTrigger - Slack
n8n-nodes-base.slack - Telegram
n8n-nodes-base.telegram - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Airtable
n8n-nodes-base.airtable - Wait
n8n-nodes-base.wait - Code
n8n-nodes-base.code - Notion
n8n-nodes-base.notion - Extract from File
n8n-nodes-base.extractFromFile - Gmail Trigger
n8n-nodes-base.gmailTrigger - No Operation, do nothing
n8n-nodes-base.noOp - Telegram Trigger
n8n-nodes-base.telegramTrigger - OpenAI
@n8n/n8n-nodes-langchain.openAi
What it does
Quick overview This workflow captures receipt attachments from Gmail and receipt photos from Telegram, extracts structured expense details with OpenAI (gpt-4o-mini), logs each expense as a new page in a Notion database, and sends a Telegram confirmation, with Slack and Telegram alerts on workflow errors. How it works 1. Triggers when a new Gmail message matching the receipt search filter arrives with an attachment. 2. Extracts the first email attachment, detects whether it is a PDF, and if it is a PDF extracts its text content. 3. Sends either the PDF text or the receipt image to OpenAI (gpt-4o-mini) to return receipt data as JSON (vendor, date, amount, currency, category, summary). 4. Triggers when a new Telegram message is received and continues only if it includes a photo. 5. Downloads the highest-resolution Telegram photo, converts it to a base64 data URL, and sends it to OpenAI (gpt-4o-mini) for JSON receipt extraction. 6. Parses the OpenAI response into normalized fields and creates a new expense entry in a Notion database. 7. Sends a Telegram message confirming the logged expense, and on any workflow error posts alerts to Slack and Telegram. Setup 1. Add credentials for Gmail OAuth2, Telegram Bot API, OpenAI, Notion, and Slack OAuth2 (for error alerts). 2. Replace REPLACEWITHYOURNOTIONEXPENSESDATABASEID with your Notion expenses database ID and ensure the database has matching properties (Vendor, Amount, Currency, Date, Category, Source, Notes). 3. Set the Telegram chat IDs used for messages by replacing REPLACEWITHYOURTELEGRAMCHATID in the confirmation step and YOURADMINTELEGRAMCHATID for error alerts. 4. Update the Slack channel selection for error alerts to the channel you want to receive workflow failure notifications. 5. Configure your Telegram bot with BotFather and start a chat with the bot so it can receive photos and send confirmations. 6. Activate both the Gmail and Telegram triggers.