I wanted to automate combining monthly bills to share it with your roommates so I created this script. Let me know what you guys think!
https://github.com/logicxd/Combine-Email-Bills-Using-Gmail-API
Preview from GitHub
Customizable and extensible way of collecting all your bills before sending out an email with a final receipt to your recipients.
From emails in your inbox:
To sending out:
How It Works
General idea:
- Fetches Gmails with the labels you provided.
- Runs each email through the scripts (that you provide) to parse the amount. This includes reading and attaching files!
- Adds any additional custom scripts that you may have.
- Finally, composes an email using the parsed data to create a “final” receipt to send to your recipients.
An example of how I use it:
- I get utility bills on my primary email account.
- Forward them to my dev email account. This is to limit what emails you can access using Google API for safety.
- Create filters to label my utility bills by water and electricity.
- Write email scripts to extract the amount.
- Download code on my raspbery pi and schedule it to run every month to send me monthly aggregated bills 🎉.
Check out the GitHub repository for a more extensive writeup.