Google Apps Script code to parse Eurobank's credit card transaction emails into a Google Sheet.
This project provides a Google Apps Script to automatically parse credit card transaction emails from Eurobank and log the transactions into a Google Sheet. This helps in keeping track of your expenses effortlessly.
To manage and run the scripts in this project, you can use the following npm commands:
npm run test: Runs the test suite to ensure everything is working correctly.npm run test:debug: Runs the test suite in debug mode.
- Open Google Drive and create a new Google Sheet.
- Click on
Extensions>Apps Scriptto open the Apps Script editor. - Delete any code in the script editor and replace it with the code from this repository.
- Save the project and give it a name.
- Click on the clock icon to create a trigger that runs the script periodically.
- Install
claspglobally if you haven't already:npm install -g @google/clasp
- Log in to your Google account:
clasp login
- Clone this repository and navigate to its directory:
git clone <repository-url> cd cc-transactions-to-google-sheets
- Link the local project to your existing Google Apps Script project:
clasp link
- Push the code to your Apps Script project:
clasp push
- Open the script project in the Apps Script editor:
clasp open
- Set up a trigger to run the script periodically by clicking on the clock icon in the Apps Script editor.
To ensure that the script processes only the relevant emails, set up a Gmail filter:
- Open Gmail and click on the search bar dropdown.
- In the
Fromfield, enter the email address that sends the transaction emails, [email protected] in my case. Also add "Κινήσεις Καρτών" in the email subject field. - Click on
Create filter. - Check
Apply the labeland create a new label,cc_transactions_reportis the one set up in this project. - Save the filter.
The script will now process emails with this label and log the transactions into your Google Sheet.