Log receipt expenses in Notion with Gmail, Telegram, and OpenAI
Ready for 3.0What this workflow does
This AI workflow has 24 nodes and runs on Gmail events (plus 2 other triggers). Along the way it connects Slack, Telegram, Google Sheets and Airtable and 3 more.
How it runs
Trigger: On Gmail events (plus 2 other triggers).
- Prepare Email Attachment (Code): runs custom JavaScript code
- Has Photo (If): checks a condition and branches into true / false
- Slack: uses Slack
- Telegram: uses Telegram
- Is PDF (If): checks a condition and branches into true / false
- Telegram: work with file
- Extract PDF Text (Extract from File): extracts data from a file (pdf)
- AI Extract Receipt Data (Image) (OpenAI): uses OpenAI
- Convert Image to Base64 String (Code): runs custom JavaScript code
- AI Extract Receipt Data Text (OpenAI): uses OpenAI
…plus 10 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Still check Gmail Trigger below v1.4 runs as v1.4 (drafts skipped, max emails per poll) (Gmail Trigger Receipts1).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
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
From the author
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…