You send a photo of a receipt to a Telegram chat and the expense is logged for you: in Actual Budget, a free, open-source budgeting app, or in a Google Sheet that builds itself, with its summary and its charts. The receipt is read by a program inside your own server, not by an AI company. You don't have to write any code: everything here is copy and paste.
free and open source
no coding
your server reads the receipt
you confirm before it saves
You send the photo and it shows what it read.You tap Save and it's logged in Actual.
Or in Google Sheets: the sheet builds itself, with your monthly summary and its charts.
The receipts and expenses in the screenshots are made up.
The bot replies in Spanish, reads Spanish receipts and builds the sheet in Spanish, so the screenshots are in Spanish.
Two questions and the guide shows only your steps. Everything else is the same for everyone.
⌄
Where do you want your expenses logged?
Do you have a server?
A server is a computer that's always on, on the internet. The bot lives there, next to Actual, so it can answer you at any time, even with your computer off.
Six steps. At the end you'll have Actual running on your own server.Four steps. At the end you'll have your own server, ready for the bot.
⌄
I recommend OVHcloud, a French server company with a site and support in English. Their VPS-1 (2 processors and 4 GB of memory) costs €4.49 a month plus VAT, about €5.43 in Spain, with no commitment and no setup fee. That's plenty for Actual and the bot.
Where
Price per month
What you should know
OVHcloud VPS-1
€4.49 + VAT (about €5.43)
The one this guide follows. Paying a year up front brings it down to €3.81 + VAT. It also has a data center in Madrid, for €1 more a month.
Hetzner CX23
€5.99 + VAT (about €7.25)
It's the one I use. Since June 2026 it has limited new servers because of a parts shortage, and in November the small ones show as unavailable. If it has them again when you read this, it works too, although steps 1 to 3 are different.
IONOS VPS S+
€2 + VAT for the first 3 months, then €5 + VAT, plus a €10 setup fee
It has a data center in Spain. It's smaller (1 processor and 2 GB), but that's enough. Its steps are similar, but I don't cover them here.
Prices checked on November 14, 2026 on each company's site (OVHcloud, in its public catalog for Spain). They may change.
Term: month to month, no commitment. The 12-month one is cheaper, but it locks you in for a year.
Location: one in Europe (France or Germany, for example).
Operating system:Ubuntu 24.04.
Then it asks you to create your OVHcloud account and pay. It's normal for a new account to be asked for a bit more information to verify who you are.
It worked if you get an email from OVHcloud saying your VPS is ready.
Check the delivery email
That email has the three things you need to log in:
Your server's IP: four numbers separated by dots, like 51.38.12.34.
The user: ubuntu.
A secure link to see the temporary password.
It worked if you've written down the IP and the temporary password.
Log in to your server
Open your computer's terminal:
Mac: press Cmd + Space, type Terminal and press Enter.
Windows: press the Windows key, type PowerShell and open it.
Type this, replacing YOUR-IP with your server's IP:
On your computer
ssh ubuntu@YOUR-IP
The first time it asks whether you trust the server (Are you sure you want to continue connecting): type yes and press Enter. Then paste the temporary password (nothing shows while you type, that's normal). It makes you change it: enter the temporary one again, then your new password twice, and it logs you out. Make it long (four random words, for example) and don't use it anywhere else: your server is on the internet and bots try passwords all day long. Log back in with the same command and your new password.
Once inside, paste this to get admin rights for everything that follows (if it asks for a password, it's your new one):
On the server
sudo -i
From here on, everything you paste runs on the server, not on your computer. Every time you log back in, start with sudo -i.
On Windows, if it says ssh isn't recognized, open Settings, search for Optional features and add OpenSSH Client.
It worked if the line where you type ends in #, like root@vps-1234abcd:~#.
Install Docker
Docker is what runs Actual and the bot, each in its own boxthe bot, inside its own box. This installs it with Docker's official installer:
On the server
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
docker compose version
It worked if the last line says Docker Compose version and a number.
Set up Actual, with a padlock (https)
To open Actual from your browser and your phone you need an address with a padlock. This starts Actual and Caddy, a program that gets the padlock on its own. The address comes from sslip.io, a free service that turns your server's IP into a name. Paste all of it:
It worked if the last line gives you an address with your server's IP inside, like https://actual.51.38.12.34.sslip.io, and opening it in your browser shows Actual. The first time it can take a minute while it gets the padlock.
Create your budget
Open that address. It asks for a server password: make one up and write it down, because the bot needs it too. Then click the button to get started (Start budgeting). Click Add account (bottom left), then Create a local account, give it a name (for example Checking) and click Create.
It worked if you see your account on the left. Write down its exact name: the bot needs it.
In the bot steps, your Actual details are these: ACTUAL_SERVER_URL=http://actual_server:5006 and ACTUAL_NETWORK=actual_default. OVHcloud bills the server every month until you cancel it, even when it's off.
02
On your server
Two checks before the bot.One check before the bot.
⌄
Check that Actual runs in Docker
The bot goes in another Docker box, next to Actual, and talks to it internally. Log in to your server and see what's running:
On the server
docker ps --format '{{.Names}} {{.Image}}'
If you don't have Actual, follow step 5 of the Not yet path, which installs it with its padlock, or the Actual Budget guide.
That step needs your server to have a public IP and ports 80 and 443 free. On a server at home (a Raspberry Pi or a NAS behind your router) it can't get the padlock: use the Actual Budget guide instead.
It worked if you see a line with actualbudget/actual-server. The name on the left is your Actual's.
Write down its name and its network
Replace NAME with your Actual's name:
On the server
docker inspect NAME --format '{{range $k,$v := .NetworkSettings.Networks}}{{$k}} {{end}}'
It tells you which Docker network it's on. That gives you your two details for the bot: ACTUAL_SERVER_URL=http://NAME:5006 and ACTUAL_NETWORK= the network you got.
If the network you get is bridge, create your own, because on that network Docker can't find boxes by name: docker network create actual-net and docker network connect actual-net NAME. Your network will be actual-net.
It worked if you have the name and the network written down.
Check that you have Docker
The bot runs in a Docker box. Log in to your server and paste this:
On the server
docker compose version
If it says it doesn't exist, install it with step 4 of the Not yet path.
It worked if it answers Docker Compose version and a number.
03
Create your Telegram bot
for everyone
Two minutes, from your phone or your computer.
⌄
Talk to BotFather
BotFather is Telegram's official bot for creating bots. Open it at t.me/BotFather (it has the blue verified check), tap Start and type /newbot.
It worked if it asks what your bot will be called.
Give it a name and a username
First the name, anything you like (for example My expenses). Then the username: 5 to 32 letters, numbers or underscores, and it has to end in bot, like myexpenses_ana_bot. If it's taken, try another.
It worked if it congratulates you and gives you a link to your bot and a token.
Save the token
The token is a long line like 123456789:AAF…. Copy it and keep it somewhere safe: you need it in the next step.
The token is your bot's key: whoever has it controls the bot. Don't share it or paste it in any chat. If it leaks, /revoke in BotFather gives you a new one: put it in .env and restart the bot, as in the Give your Telegram account access step.
It worked if you have the token saved.
04
Set up your Google Sheet
Google Sheets
You make your copy of the template and it builds itself: you just click a couple of buttons.
⌄
You do this from your computer, with your Google account.
Make your copy of the template
Open the sheet template and click Make a copy. Google warns you that the Apps Script file gets copied too: that's the code that builds the sheet and receives your expenses, and you need it. The copy is yours, in your Google Drive, and nobody else sees it.
Prefer to do it by hand? Open sheets.new, go to Extensions and Apps Script, delete whatever is there, paste all of the sheet's code and save with the floppy disk icon. It's the same code.
It worked if your copy is open, with some instructions at the top (in Spanish), and after a few seconds a new menu shows up: 🤖 Bot de gastos. If it doesn't, reload the page.
Let it build the sheet
Open the 🤖 Bot de gastos menu and click Configurar la hoja ("Set up the sheet").
The first time, Google asks for permission, because the code is going to write to your sheet. It takes two screens: accept the Authorization required message in your sheet, then click Continue in the Google window (scroll down to find it). "Bot de gastos" is the code in your copy, not a company: it can only see and change the sheet it's installed in, not your other files or your email. If nothing happens afterwards, click Configurar la hoja again.
Made your copy before November 21? You may also get a warning that Google hasn't verified the app. That's normal: click Advanced, then Go to Bot de gastos, and finally Allow.
It worked if your sheet has the tabs Resumen, Gastos, Categorías and Mi estilo.
Copy your secret
In your sheet, open the 🤖 Bot de gastos menu and click Ver mi secreto para el bot ("See my secret for the bot"). It shows a long line of letters and numbers: copy it and keep it next to the token.
It's the key to your sheet: with that secret, anyone can write to it. Don't share it.
It worked if you have the secret saved.
Give your sheet an address
The bot needs an address to send each expense to. In your sheet, open Extensions and Apps Script and, at the top right, click Deploy and then New deployment. Next to Select type (the gear icon) pick Web app and set:
Execute as: you (Me).
Who has access:Anyone.
Click Deploy and copy the Web app URL, the one ending in /exec.
Anyone is needed because the bot doesn't sign in with a Google account. Even so, your sheet only accepts what arrives with your secret, and all it ever receives is the row the bot already read (date, store, amount, category and note), never the photo.
It worked if you have two things saved: the address ending in /exec and your secret.
0405
Start the bot
for everyone
You download it, give it your details and start it.
⌄
Download it to your server
The bot's code is free and lives on GitHub. In your server's terminal:
On the server
cd ~
git clone https://github.com/MarBenitez/actual-receipt-bot.git
cd actual-receipt-bot
cp .env.example .env
If it says git doesn't exist, install it with apt-get update && apt-get install -y git and paste it again.
It worked if there's no error and you're in the actual-receipt-bot folder.
Enter your details
Your details go in a file called .env. Open it with the terminal's editor:
On the server
nano .env
Move with the arrow keys and type each detail right after the =, with nothing else on that line. Lines starting with # are notes: leave them as they are.
Line
What goes there
TELEGRAM_TOKEN
The token from BotFather.
ALLOWED_USER_IDS
Leave it empty for now.
DESTINO
Type sheets.
SHEETS_URL
Your sheet's address, the one ending in /exec.
SHEETS_SECRET
Your sheet's secret.
The ones starting with ACTUAL_
Leave them empty: they're for Actual Budget.
ACTUAL_SERVER_URL
From scratch: http://actual_server:5006. On your server: http://NAME:5006.
ACTUAL_PASSWORD
The password you use to log in to Actual, in single quotes: 'your password'.
ACTUAL_SYNC_ID
In Actual: Settings (bottom left), Show advanced settings and copy the Sync ID.
ACTUAL_ACCOUNT
The exact name of your account, for example Checking.
ACTUAL_BUDGET_PASSWORD
Only if you turned on end-to-end encryption in Actual. Otherwise, empty.
ACTUAL_NETWORK
From scratch: actual_default. On your server: the network you wrote down.
DESTINO, SHEETS_URL and SHEETS_SECRET
Leave them empty: they're for Google Sheets.
To save: Ctrl + O and then Enter. To exit: Ctrl + X. It's Ctrl on the Mac too.
It worked if you see your details when you open it again with nano .env.
Start it
The first time it takes a few minutes, because it builds its box with the receipt reader inside:
On the server
docker compose up -d --build
docker compose logs -f
The second line shows you what the bot is doing. To stop watching, Ctrl + C: the bot keeps running.
It worked if you see Conectado a Actual. Bot escuchando. (Spanish for "Connected to Actual. Bot listening.").
It worked if you see Conectado a Google Sheets. Bot escuchando. (Spanish for "Connected to Google Sheets. Bot listening.").
0506
Give your Telegram account access
for everyone
So it only answers you.
⌄
Message it
Open your bot with the link BotFather gave you, tap Start and send it anything.
It worked if it replies Este bot es privado. Tu número de Telegram es ("This bot is private. Your Telegram number is") and a number. Copy it.
Add yourself to the list
On the server, open nano .env again and put that number in ALLOWED_USER_IDS. If you want someone else to use it, add their numbers separated by commas. Save, exit and restart it:
On the server
docker compose up -d
On the server
docker compose -f docker-compose.sheets.yml up -d
It worked if it replies to /start with Mándame la foto de un ticket y lo apunto en Actual ("Send me a receipt photo and I'll log it in Actual").
It worked if it replies to /start with Mándame la foto de un ticket y lo apunto en Google Sheets ("Send me a receipt photo and I'll log it in Google Sheets").
0607
Use it
for everyone
Photo, check and save.
⌄
Send it the receipt photo
As a photo, not as a file. In a few seconds it replies with the store, the amount, the date and the category (the first time at each store it shows sin categoría, "no category", and you pick it).
Good light and a flat receipt work best. If it can't find the total, it asks you. If it isn't sure about the date, it tells you.
Check and save
✅ Guardar (Save): logs it in Actualyour sheet. Nothing is logged until you tap it.
✏️ Importe (Amount), 🏪 Comercio (Store) and 📅 Fecha (Date): it asks you for the right value and changes it.
🏷️ Categoría (Category): shows your Actual categoriescategories, the ones in the Categorías tab, so you can pick one.
✖️ Descartar (Discard): drops it without logging anything.
It worked if the expense shows up in your account in Actual, with the note Desde Telegram.
It worked if a new row shows up in your sheet's Gastos (expenses) tab, and the bot tells you what you've spent so far this month.
Without a photo, too
Type the amount and the place, for example 12.50 bar, and it logs it with today's date after you tap Save.
Make the sheet yours
Your sheet has four tabs:
Resumen (summary): what you've spent this month, what you have left, each category's budget with its bar, where most of it goes and how you're doing month to month.
Gastos (expenses): one row per receipt, with its date, store, amount and category. You can also add or fix rows by hand.
Categorías (categories): your categories, the most you want to spend on each one per month, and your salary. They come as examples: swap in your own.
Mi estilo (my style): pick a theme, the colors and the font, and the whole sheet repaints itself.
To see it come alive before you have any expenses, the 🤖 Bot de gastos menu has Añadir gastos de ejemplo (adds made-up expenses for the last few months) and Borrar gastos de ejemplo (removes them).
The bot is made in Spain, so it reads dates day first: when it asks for a date, 11/12 means December 11, not November 12. Write November 12 as 12/11, or with the year, 12/11/2026. "Today" is Madrid time.
The category it suggests is the last one you used with that store: the first time you pick it, and from then on it remembers. Categories are created and changed in Actual, and the bot sees them without a restart.Categories are created and changed in your sheet's Categorías tab, and the bot sees them within a minute.
0708
If something fails
Where to look and what happens most often.
⌄
Almost always, the bot itself says what's wrong. To see it:
On the server
cd ~/actual-receipt-bot
docker compose logs --tail 50
On the server
cd ~/actual-receipt-bot
docker compose -f docker-compose.sheets.yml logs --tail 50
If you see
Do this
No encuentro la cuenta
The ACTUAL_ACCOUNT name doesn't match. The message lists the names that exist: copy yours exactly.
When you start it, an error saying the network could not be found
It shows up right after you paste docker compose up, not in the logs. The ACTUAL_NETWORK network doesn't exist. Check it again (Yes, I have one path, step 2).
Falta TELEGRAM_TOKEN or Falta la variable
A line in .env is empty. Open it with nano .env and fill it in.
The bot doesn't answer at all
Check with docker compose ps that it's running, and that the token is your bot's.
The bot doesn't answer at all
Check with docker compose -f docker-compose.sheets.yml ps that it's running, and that the token is your bot's.
An Actual password error
Check the password and that it's in single quotes, especially if it has $ or spaces.
El SHEETS_SECRET no coincide con el de la hoja
Copy the secret again from your sheet's 🤖 Bot de gastos menu and paste it into SHEETS_SECRET, with no spaces.
Google Sheets no ha contestado bien
Check that SHEETS_URL is the address ending in /exec, and that when you created it you gave access to anyone.
You changed your sheet's code and the bot doesn't notice
It has to be published again. In Apps Script: Deploy, Manage deployments, the edit pencil, under Version pick New version and click Deploy. The address stays the same.
Every time you change .env, restart it with docker compose up -d. To get the latest version of the bot:
Every time you change .env, restart it with docker compose -f docker-compose.sheets.yml up -d. To get the latest version of the bot:
On the server
cd ~/actual-receipt-bot
git pull
docker compose up -d --build
On the server
cd ~/actual-receipt-bot
git pull
docker compose -f docker-compose.sheets.yml up -d --build
+
For the curious
Where the photo goes, how well it reads, what it costs and other bots.
⌄
Where the photo goes
It goes through Telegram (regular Telegram chats are stored on its servers) and reaches your server. There it's read by Tesseract, an open-source program that pulls the text out of an image, like when you copy the text from a photo on your phone. It isn't sent to any AI company. While it's being read, the photo sits in temporary files that are deleted when it's done. The bot keeps a copy of your budget in its box so it can log expenses, so put it on a server you trust, ideally the same one as Actual. Google only gets the row the bot already read (date, store, amount, category and note), never the photo.
How well it reads
Measured with 8 made-up Spanish receipts, each in two simulated photos (made by computer, not with a camera):
Photo
Total read right
Normal: good light and a flat receipt
8 of 8
Hard: faded ink, wrinkles, tilted and dim
4 of 8 (3 not read, 1 wrong)
A real receipt can do worse. That's why it always shows you what it read before saving.
What it costs
Piece
Price
Telegram and BotFather
€0
The bot and Actual Budget
€0, free code under the MIT license
The bot
€0, free code under the MIT license
Google Sheets
€0, with a personal Google account
The server
€0 if you already have one. At OVHcloud, the VPS-1: €4.49 a month plus VAT, about €5.43 in Spain (more options in step 02)
To stop paying for the server you have to cancel it in your OVHcloud customer area: it's still billed while it's off. Before that, export your budget from Actual (how to make backups).
Keeping Actual up to date
Actual doesn't update itself. If you installed it with this guide, every so often log in to the server, paste sudo -i and then this:
On the server
cd ~/actual
docker compose pull
docker compose up -d
If your Actual is on PikaPods
The bot can log to your Actual on PikaPods, but it needs its own server that's always on. Follow the Not yet path skipping steps 5 and 6, and before starting the bot create its network with docker network create actual_default. In .env, ACTUAL_SERVER_URL is your pod's address (the one starting with https) and ACTUAL_PASSWORD, your Actual password.
Other bots on the same base
The Telegram part (receiving the photo, the buttons and only answering you) knows nothing about receipts or Actual. Change what it reads and where it saves it, and you get another bot: for example, one that logs your invoices in a spreadsheet. The code is on GitHub, under the MIT license: you can use it, change it and even sell it, as long as you keep the license notice.