What it does
Finds receipts and invoices in your inbox (by subject, sender or both), reads the amount, currency and invoice number from the email and its PDF attachments, and puts one row per email in a sheet with the files. Optionally copies the attachments to a folder. Emails handled in an earlier run are skipped. Amounts are found by pattern: check unusual layouts. (The “Invoice and attachment downloader” only saves the files.)
How it works
- Signs in to your email
- Reads your inbox
- Decides what to do next
- Goes through each item
- Reads the file
- Picks out the values
- Adds rows to your sheet
- Saves the files where you want them
All 20 steps (as they appear in the app)
- Email account {{email_address}} ({{email_provider}})
- Check {{folder}} (1 steps each)
- If email_message_id seen in past runs
- _docs =
- For each att in {{email_attachments}} (1 steps)
- If att matches \.pdf$
- Read text of {{att}} → _pdf
- _docs = {{_docs}} {{_pdf}}
- _all = {{email_subject}} {{email_body}} {{_docs}}
- Find…
- Find /([\d.,\s]+)$/ → _number
- Find /([$€£]|\bUSD\b|\bEUR\b|\bGBP\b|\bCAD\b|\bAUD\b)/ → _currency
- Find /(?:invoice|receipt|order)\s*(?:no\.?|number|num|#|id)\s*[:#]?\s*([A-Z0-9][A-Z0-9-]{2,})/ → _invoice_no
- _vendor = {{email_from_name}}
- If _vendor empty
- Find /@([^>\s]+)/ → _vendor
- Add row: date, vendor, from, subject, amount, currency, invoice_number, files
- If save_folder not empty
- If email_attachments not empty
- Save files to {{save_folder}}
Get this template
1. Download Develofly Autopilot: free, for Ubuntu and other Linux desktops.
Download Develofly Autopilot2. The app comes with every template, so this one is already in your library. Click below to open it (or find it under Templates).
Open in AutopilotWhat you need
- An email account (Gmail, Outlook, Yahoo or any IMAP)
You fill in: Email provider, Your email address, App password, Subject contains, From contains (optional), Mail folder, Look back (days), Also copy attachments to this folder (optional).
Make it yours
Every step is editable in the app: change the site, the columns, the schedule, or chain it with other bots. Run it once, on a schedule, or sell it as your own bot.