Recipe

Track expenses from the receipts in your inbox

For freelancers, small businesses and households: the agent turns the receipts in your inbox into an expenses database, and a report from it arrives every month.

Apps
Topics

Every purchase leaves a receipt in your inbox, and at the end of the month or the year someone has to turn them into a list with totals. In this recipe the agent reads the receipts in your mail, files each one as a record in an expenses database, and builds a monthly report from it to keep or hand to your accountant.

What you need

  • XataWorks, open, with the agent answering. If it is not yet, Getting started covers the one decision to make first.
  • The mail account your receipts arrive at, added to XataWorks (Mail shows how).

1. Make the expenses database

Make a database called Expenses with one table of receipts: the date, the vendor, the total, a category from a value list of Travel, Meals, Software, Office and Other, the sender and subject of the message it came from, and a container field for the receipt itself.

The agent builds it and opens it beside the chat. Creating it asks first. Allowing that also lets the agent add records to it for the rest of this chat.

2. Open Mail in the same chat

Choose View ▸ Mail ▸ All Mail, so the agent can reach your mail and the database in one conversation.

3. Sweep a month of receipts

Find the receipts and order confirmations in my mail from September. Add one record to Expenses for each, with its date, vendor, total and category. When the details are in an attached PDF, read the attachment and put it in the record’s receipt field. Don’t guess: list any you weren’t sure about.

Mail asks before each step the agent takes in it, reads included. Answering Allow tools that only read on your mail covers reading for the rest of this chat, opening attachments included. An attachment the agent opens is also kept among the chat’s files, which is where the copy in each record’s receipt field comes from. Then check the receipts it listed yourself, in the database’s Table view.

4. Turn the month into a report

Make a report of September’s expenses from the Expenses database: the total and each category’s total as key figures, a bar chart by category, and a table of the ten largest receipts.

Export it from the report window’s File menu as a PDF, or as a spreadsheet with every row, for your accountant. Because its numbers come from a database query, you can save it with File ▸ Save as Template… and use Schedule… to make it again every month.

5. Keep the database filling itself

Every Monday at 8:00, repeat step 3 in this chat for the past week’s receipts.

Or set it up yourself from the chat header’s ⋮ menu with Schedule a prompt and Weekly, or Monthly on a day from 1 to 28 for one sweep a month. It runs on that day at that time whichever day you set it up, and keeps its time when the clocks change; a run the computer was off or asleep for is skipped, not made late. A chat holding a schedule shows a badge in its header for as long as it does. If a run needs an approval you haven’t given, it stops and waits for you rather than deciding.

Where this recipe stops

  • Only the words in a receipt. The agent reads a message’s text and the text of its PDF, Word, Excel and plain-text attachments, up to 20,000 characters of each. A scanned receipt or a photo of one has no text to read, so it gets listed for you to fill in. Check the ones it flags as uncertain.
  • The report reads the database, not your mail. A scheduled report rebuilds from the records already there. The sweep in step 3 is what adds new ones.
  • Nothing leaves your mail. The agent reads, and it can file, star or draft. It can never send, delete for good or empty a folder.

Read more

  • Mail: what an agent in any chat can do with your mail, and what it asks.
  • Reports: templates and schedules.
  • Work that continues: scheduled prompts, and approvals when nobody is there.

More recipes like this

Back to all recipes.