Skip to main content

Email "Connection"

I tested this feature out and it worked. For payment senders/receivers like: Cash App, Paypal, Venmo, etc, there not a official “Bank” so they don’t appear on connection services like Plaid, or Link. But they all send emails for transaction emails to you. So you can scan the emails and it searches for the emails from like cash.app, or square.com domains.

Dev:

How a user connects

  • They enter their Gmail address and a Gmail app password in Settings.

  • The Worker encrypts the app password before storing it in Firestore, and it never goes back to the browser.

  • Every request from the app carries the user's Firebase ID token, and the Worker checks it. It also only accepts calls from the domain or localhost.

I only tried the app password to test it but you can use gmails email consent which requires billing information so i avoided that (Had bad luck with google before about that).

I haven’t tried setting it up with other email services (Outlook, Yahoo, etc) but its possible.

When I coded it heres the process i set it up for:

  • Trigger. A sync starts from the Sync button, or from a cron that wakes the Worker every 5 minutes and runs whichever users' chosen schedules are due. The schedule options range from every 5 minutes to daily.

  • Fetch. The Worker opens an IMAP connection to Gmail and searches for messages since the last sync (with a 1-day overlap, since Gmail's date search is day-granular). It matches on your configured senders and keywords, and scans at most 50 messages per sync.

  • Extract. For each message it pulls the text out of the MIME body and sends it to Workers AI (llama-3.1-8b-instruct-fast). The model returns structured data: amount, merchant, description, type and a confidence score.

  • Route by confidence.

    • 0.90 or higher: imported automatically as a transaction, and the account balance is updated.

    • 0.70 to 0.90: placed in the Needs Review queue for you to approve.

    • Below 0.70: discarded.

  • Match and dedupe. It matches the email to one of your accounts by institution or account name, categorizes it, and skips anything already imported

It took a while to work the kinks out but its been running great. If you want I can send you the files and instructions for the worker?

PS: I don’t know if this is a privacy issue, but i did have to store the email in Firestore so I could run rechecks when it didn’t get it the first time. But i’m sure theres a work around or you could have folks sign a Policy Agreement or something.

Status: Rejected4 comments

Log in to comment and vote

Comments4

  • team@waypointbudget

    Team•

    Oct 6

    Thanks for building and sharing this, and for the detailed request @Cadin.

    We will not take this one on: holding members' email credentials and reading inboxes is a responsibility we do not want Waypoint Budget to carry, even encrypted. For payment apps that are not banks, the import on the Transactions page (CSV or a screenshot of the activity list) is the path we will keep improving for now.

    • LatitudeBusily250

      •

      Oct 7

      How about setting an inbound email address like tx@waypointbusget.com where we can forward bills. If the source is associated with an account, waypoint parses the content and automatically imports as a transaction?

      Then the user would need to setup forwarding rules on their email providers, for example “if domain matches amazon.com, forward to “tx@waypointbudget.com”

      • Cadin

        •

        Oct 7

        That could work. Would take knowing how to setup gmail filtering and parsing. Could be tricky

        • team@waypointbudget

          Team•

          Oct 7

          @LatitudeBusily250 @Cadin thanks, this is a much better shape than storing credentials, and it's how receipt tools work. We're going to hold off for now. Most forwarded receipts would duplicate a transaction the bank already sends, so it only pays off once receipts can attach to existing rows, and a forwarding address needs its own private per-member setup to stop anyone else from planting transactions in your budget. That's a fair bit of new machinery for a narrow case when CSV, the screenshot import and Quick Add already cover payments that don't come from a bank. Keeping this closed, and we'll revisit if more people ask or when receipt storage gets picked up.