Continued project from https://github.com/logicxd/Monthly-Bill-Generator-Apps-Script
Customizable and extensible way of collecting all your bills before sending out an email with a final receipt to your recipients.
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.
Please follow this guide from Google.
Main.gs is where most of the logic happens. The method start
should provide an example of how things are run.
Enabling this adds a "Processed" label to your email after the script has finished running. By doing this, it can check to make sure emails are not double-counted by ignoring all the "Processed" emails.
To enable it, modify config.processedLabelName
to give it whatever name you'd like it to be called, for example: "Automated/Processed" is what I used.
I'm using Cronitor to notify me in case my raspberry pi doesn't send out an email. It's definitely not required but would help remind me in case something goes wrong.
To enable it, add the property cronitor_code
to your config
with the value you get from Cronitor such as "abc123".
I also upload my stats and data to Notion so I can see how much it's costing per month and also for reference. The method addEntryIntoNotion()
should tell you how it works and how many parameters I'm using. Feel free to edit this to suit your needs.