Emailed receipts to coded vouchers in sevdesk
Supplier invoices and receipts arrive in Gmail. This flow codes each one against the accounts sevdesk allows, saves a draft voucher with the receipt attached, and tells your bookkeeper in Slack.
The prompt
When a supplier invoice or receipt arrives in our Gmail inbox, upload the file to sevdesk and get the booking accounts sevdesk allows for expenses. Read the receipt and code it against that list only: supplier, receipt number, date, currency, and one line per VAT rate with its account and tax rule. Create a draft voucher in sevdesk with those lines and the receipt attached. Then post the coding to our bookkeeper in Slack with a link to the receipt and anything that was unclear. Don't seal anything.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Download the file, then in FlowRunner click + beside Flows, pick it under Import a Flow Version and click Create. How importing works
What each step does
- New receipt email Checks Gmail every 5 minutes for an email with an attachment and Rechnung, Beleg, Quittung, invoice or receipt in the subject.
- Save the receipt file Saves the attachment so the AI step can read it and the bookkeeper can open it from Slack.
- Get the receipt content Reads the file itself from Gmail, ready to send to sevdesk.
- Upload the receipt to sevdesk Uploads the file to sevdesk, which returns the internal filename the voucher will point to.
- Get the expense accounts Lists the booking accounts sevdesk allows for expense receipts, with the tax rules that go with each.
- Read and code the receipt An AI agent reads the receipt and picks the account and tax rule for each VAT rate from that list only. It notes anything it was unsure about.
- Create the voucher Creates the voucher in sevdesk as a draft, with its lines and the receipt attached, in one call.
- Send the coding to the bookkeeper Posts the supplier, number, date, total and each coded line to the bookkeeper in Slack with a link to the receipt. Nothing is sealed, so the bookkeeper can still change anything.
Before you turn it on
- Enter your sevdesk API token, and connect your Gmail and Slack accounts.
- Add your Anthropic key in the flow setting Anthropic key.
- Pick your bookkeeper's Slack channel in Send the coding to the bookkeeper, and change the Gmail search to match how receipts reach your inbox.
- Check that your sevdesk account runs bookkeeping Update 2.0. The flow codes with the accounts and tax rules of that version.