File employee expenses from Telegram receipts with OpenAI and Xero
Ready for 3.0What this workflow does
This workflow has 24 nodes and runs on Telegram events (message). Along the way it connects Telegram and Google Sheets. It also calls api.openai.com and api.xero.com over HTTP.
How it runs
Trigger: On Telegram events (message).
- Pick The File (Code): runs custom JavaScript code
- Has A Receipt? (If): checks a condition and branches into true / false
- Download File (Telegram): get (file)
- Ask For A Photo (Telegram): uses Telegram
- Read The Receipt (HTTP Request): calls api.openai.com (POST)
- Normalise Receipt (Code): runs custom JavaScript code
- Unreadable Receipt (Telegram): uses Telegram
- Receipt Complete? (If): checks a condition and branches into true / false
- Read Past Receipts (Google Sheets): read
- Ask For Details (Telegram): uses Telegram
…plus 13 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Telegram + OpenAI templates (807) · Other Telegram + Google Sheets templates (674)
HTTP calls to: api.openai.com, api.xero.com
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets - Wait
n8n-nodes-base.wait
From the author
Quick overview This workflow captures employee receipt photos or PDFs from Telegram, uses OpenAI to extract structured expense data, validates it against policy and past claims in Google Sheets, and then drafts (or logs) the expense in Xero with an approval…