Published: 2024-06-18 Last Update: 2024-06-18

Monitoring of Meralco Bill in Google Sheets

This will work, provided you are receiving your Meralco bills in your gmail account like this. meralco bill email

In Google Sheets, in a sheet named Sheet1 (default sheet name), put the following column headers from A1 to F1

  • bill
  • account
  • period
  • amount_due
  • due_date
  • created_at google sheets column header

Click Extensions > Apps Script. extensions apps script

You will see a screen like this. This is a Code.gs file where we can put Apps Script codes. apps script code.gs file

Copy this Code.gs file and paste it to replace everything in your Code.gs.

Your Code.gs file will now look something like this. apps script new code.gs file

Click save. apps script save

Click the dropdown then click createTrigger. apps script. select createTrigger function

Click Run. apps script. run createTrigger function

When prompted for Authorization required, click Review permissions. authorization required. review permissions

Login to your Google account. Take note that the title of your Apps Script project will show here. google account login

Click Advanced. advanced

Click Go to <project-name> (unsafe). unsafe link

Take note that the above is fine even if it says not verified or unsafe. It’s your apps script, so it’s fine.

Read the permissions that you will allow (might not be the same as the screenshot) before proceeding. Then click Allow. allow

At the bottom of the screen, wait for the execution to complete. apps script. execution complete

On the left side, click Triggers. apps script. triggers

You should see this trigger. apps script. trigger set up

Now, you wait for your next email of Meralco bill and the Google Sheet should be updated with new details that look like this. meralco bill details. google sheets

Once your bill has been successfully processed, the email in gmail will have a label Processed. meralco bill email. label processed