Skip to content
agents/en vrai

Let staff file expense claims by sending a photo of the receipt on Telegram

An employee sends a photo or PDF of a receipt to the company's Telegram bot. The agent reads it with OpenAI, checks your per-category limits, duplicates and the tax ID, asks for your approval on Telegram when something breaks the rules, records every claim in Google Sheets and prepares a draft supplier bill in Xero.

L2 semi-autonomousVerified sourceBased on official documentation we checked; not tested by us yet.Updated
Difficulty
Advanced
Setup time
≈ 1 h 30 (estimate)
Estimated cost
Free template. n8n: €0 self-hosted or from €20/month; OpenAI API billed per use; Telegram and Google Sheets: free; Xero: paid subscription
Category
Small business & freelancers

⏱ Trigger

Every receipt sent to the Telegram bot (Telegram trigger)

✋ Human approval

Receipts that break the rules wait for your Approve or Reject tap on Telegram. Compliant receipts are approved without you, but only reach Xero as drafts: nothing is paid or posted until you approve the bill in Xero. Set your limits before going live.

→ Output

One row per expense claim in Google Sheets, a draft supplier bill in Xero, Telegram messages to the employee and the approver

Autonomy level 2 — Semi-autonomous (approval): Runs on its own but waits for your approval before anything sensitive.

01Connected tools

02What the agent does on its own

  1. step 01

    Starts when the Telegram bot receives a message: takes the largest photo size or the attached PDF, otherwise asks the employee to send the receipt.

  2. step 02

    Sends the receipt to an OpenAI vision model (gpt-4o-mini in the source template), which returns merchant, date, total, tax, currency, category, tax ID and line items, without guessing anything.

  3. step 03

    If a required field is missing, asks the employee for it instead of filing an incomplete row. A fixed key (employee + merchant + date + total) stops the same receipt from being claimed twice.

  4. step 04

    Reads the claims already recorded in Google Sheets and applies your rules, written in a code node: per-category limit, missing tax ID, duplicate, weekend meal.

  5. step 05

    A compliant receipt is approved straight away; otherwise the agent sends the details and the reason to the approver's Telegram group with Approve / Reject buttons and waits for the decision.

  6. step 06

    Records the approved or rejected claim (with the reason) in Google Sheets and tells the employee.

  7. step 07

    For an approved claim, creates a draft supplier bill in Xero; if that fails, alerts the approver.

03Agent instructions

$ instructions.txt · replace the {VARIABLES}
> Source template instruction: "You read expense receipts. Reply with one JSON object and nothing else: merchant (string), date (yyyy-mm-dd), total (number), tax (number or null), currency (ISO 4217), category (one of meals, travel, software, office, hardware, other), tax_id (string or null), payment_method (string or null), line_items (array of {description, amount}). Read what is printed; if a field is absent use null. Never estimate." Settings to prepare: {LIMITS_PER_CATEGORY}; {XERO_EXPENSE_ACCOUNT_CODE}; {APPROVER_TELEGRAM_GROUP_ID}.

04Limits and legal points

Template default limits, in the receipt's currency: meals 75, travel 500, software 250, office 150, hardware 1,000, other 150; adjust them to your expense policy. The employee is identified by their Telegram name. The weekend rule only applies to meals. The Approve / Reject buttons use an n8n resume URL: your instance must be reachable from the internet. Receipts are sent to OpenAI: tell your staff. The template creates a draft supplier bill, not an expense claim in Xero's sense: check with your accountant how to handle expenses paid by employees and which receipts you need to reclaim VAT. AI can misread an amount: check the draft before approving it.

05In short

When does the agent run, and what does it produce?
Trigger: Every receipt sent to the Telegram bot (Telegram trigger). Output: One row per expense claim in Google Sheets, a draft supplier bill in Xero, Telegram messages to the employee and the approver.
What stays under your control?
Receipts that break the rules wait for your Approve or Reject tap on Telegram. Compliant receipts are approved without you, but only reach Xero as drafts: nothing is paid or posted until you approve the bill in Xero. Set your limits before going live. Autonomy level 2 — Semi-autonomous (approval): Runs on its own but waits for your approval before anything sensitive.
How much does it cost and how long does setup take?
Estimated cost: Free template. n8n: €0 self-hosted or from €20/month; OpenAI API billed per use; Telegram and Google Sheets: free; Xero: paid subscription. Setup time: ≈ 1 h 30 (estimate), difficulty "advanced". Tools: n8n – Telegram Trigger, n8n – Telegram, OpenAI – image input (vision), n8n – HTTP Request, n8n – Google Sheets, n8n – Wait, Xero – Invoices API.

Answers taken from this recipe · updated 12 November 2026

06Source

https://n8n.io/workflows/22542-file-employee-expenses-from-telegram-receipts-with-openai-and-xero/

07Related recipes

Same category or same connected tools.

All recipes in "Small business & freelancers" →

→ monthly newsletter

3 agents en vrai.
Every month.

Three reproducible, sourced autonomous agents. No hype, no "top 100 tools". One-click unsubscribe.