Received e-invoices coded and filed from easybill
Each day this flow reads the e-invoices easybill has received, picks a booking account for each, files them in Dropbox and hands the unclear ones to your bookkeeper in Slack.
The prompt
Every morning, check easybill for supplier e-invoices we've received that haven't been filed yet. For each one, read the invoice and pick the booking account it belongs on from our list of accounts, along with the next most likely one. Download the invoice files and save them in Dropbox in a folder for the month and the account. If you're not sure of the account, save them in a To review folder instead and send our bookkeeper a Slack message with the supplier, the amount and the two accounts side by side. When they're all done, post a digest in Slack of everything that was filed.
FlowRunner Prompt to Flow built this flow from that request. Here it is as it opens in the editor.
The flow
Inside the loop: For each new invoice
Inside the loop: For each file
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
- List received e-invoices Reads the e-invoices easybill has received and keeps the ones dated within the look-back window that an earlier run has not filed yet.
- Read the invoice For each new invoice, reads the supplier, amounts, VAT rates and lines. The calls are spaced out so the run stays inside easybill's rate limit.
- Pick the booking account An AI agent picks the account from your list that fits best, says how sure it is, and names the next most likely account with a reason for each.
- File it in Dropbox Downloads every file attached to the invoice in easybill and files it in Dropbox in a folder for the month and the account. An invoice the agent is not sure about goes in To review instead.
- Sure of the account? An account from your list with at least the minimum confidence counts as sure. Anything else is handed to the bookkeeper.
- Hand it to the bookkeeper Posts the supplier, invoice number, date and amount in Slack, with the two candidate accounts side by side and the agent's reason for each. Nothing is written back to easybill.
- Post the digest After the last invoice, posts one Slack message listing everything filed with its account and the invoices waiting for the bookkeeper. The flow remembers what it filed, so the next run skips those.
Before you turn it on
- Enter your easybill API key, and connect your Dropbox and Slack accounts.
- Add your Anthropic key in the flow setting Anthropic key.
- Put the account names from your chart of accounts in the flow setting Booking accounts, one per line. Each one becomes a folder in Dropbox.
- Set the Dropbox folder in the flow setting Dropbox folder. Set Minimum confidence, for example 80, and Look back days, for example 30.
- Pick your Slack channel in Hand it to the bookkeeper and Post the digest, and give the flow a daily schedule, for example every weekday morning.