• Hey there! Welcome to TFC! View fewer ads on the website just by signing up on TF Community.

[Axis] Automatic credit card transaction and rewards tracker

ChurningNoob

TF Ace
VIP Lounge
TLDR –
  • Every hour all credit card transactions are automatically fetched from your email
  • Transactions are added to google sheet
  • Expected default rewards generated and milestones achievement calculated
  • The emails processed are labeled so that there no duplicate transactions
  • Project moved here : https://github.com/TheSidd/EmailExpenseTracker
Drawbacks –
  • Refunds cannot be calculated as no email
  • If email template is changed by the bank, need to modify script
Security & Privacy –
  • Main reason to create this and not rely on third-party apps
  • Everything remains private in your account
Before you begin –
Steps –
  1. Visit script.google.com in browser where only one google account is logged in
  2. Click on Create app scripts
  3. Replace Code.gs content with https://gist.github.com/TheSidd/d439779aa048ebcbe9a51ff0514c5751#file-code-gs
  4. Paste your copied excel URL in line 62
  5. Click Save
  6. Left panel Files – Click on Add a file (+ icon) – then HTML – Rename with messages and replace contents from https://gist.github.com/TheSidd/d439779aa048ebcbe9a51ff0514c5751#file-messages-html
  7. Left panel Files – Click on Add a file (+ icon) – then HTML – Rename with parsed and replace contents with https://gist.github.com/TheSidd/d439779aa048ebcbe9a51ff0514c5751#file-parsed-html
  8. Click Save icon
Now your script should look like this

1671014914488.png

  1. Click on Deploy – New Deployment
  2. Now on the pop up click on Setting – select Web App – Provide description and click Deploy
  3. Now Authorize access to script, you will receive warning
  4. Click on Advance – then Click Go to Project-name (unsafe)
  5. Click on allow
  6. A URL should be generated, open and you should see your transactions.
  7. Click on Save data to Sheet
  8. Verify the data in excel
Should look like this, but with data filled

1671015028176.png

If everything is good so far, we can trigger this every hour.
  1. Back to the script page
  2. On left panel click on Triggers (Clock icon)
  3. Add trigger
  4. Select and save the trigger with these options
EDIT : Choose which deployment should run - click dropdown and select your latest deployment.
1671015078847.png

This will trigger the script and fetch details every hour.

So how will it look finally?

image.png

image.png


1671019779982.png
 

Attachments

  • 1671014816654.png
    1671014816654.png
    14 KB · Views: 91
  • 1671014983955.png
    1671014983955.png
    20.7 KB · Views: 102
Last edited:

Akash369

TF Buzz
VIP Lounge
TLDR –
  • Every hour all credit card transactions are automatically fetched from your email
  • Transactions are added to google sheet
  • Expected default rewards generated and milestones achievement calculated
  • The emails processed are labeled so that there no duplicate transactions
  • Project moved here : https://github.com/TheSidd/EmailExpenseTracker
Drawbacks –
  • Refunds cannot be calculated as no email
  • If email template is changed by the bank, need to modify script
Security & Privacy –
  • Main reason to create this and not rely on third-party apps
  • Everything remains private in your account
Before you begin –
Steps –
  1. Visit script.google.com in browser where only one google account is logged in
  2. Click on Create app scripts
  3. Replace Code.gs content with https://gist.github.com/TheSidd/d439779aa048ebcbe9a51ff0514c5751#file-code-gs
  4. Paste your copied excel URL in line 62
  5. Click Save
  6. Left panel Files – Click on Add a file (+ icon) – then HTML – Rename with messages and replace contents from https://gist.github.com/TheSidd/d439779aa048ebcbe9a51ff0514c5751#file-messages-html
  7. Left panel Files – Click on Add a file (+ icon) – then HTML – Rename with parsed and replace contents with https://gist.github.com/TheSidd/d439779aa048ebcbe9a51ff0514c5751#file-parsed-html
  8. Click Save icon
Now your script should look like this

1671014914488.png

  1. Click on Deploy – New Deployment
  2. Now on the pop up click on Setting – select Web App – Provide description and click Deploy
  3. Now Authorize access to script, you will receive warning
  4. Click on Advance – then Click Go to Project-name (unsafe)
  5. Click on allow
  6. A URL should be generated, open and you should see your transactions.
  7. Click on Save data to Sheet
  8. Verify the data in excel
Should look like this, but with data filled

1671015028176.png

If everything is good so far, we can trigger this every hour.
  1. Back to the script page
  2. On left panel click on Triggers (Clock icon)
  3. Add trigger
  4. Select and save the trigger with these options
EDIT : Choose which deployment should run - click dropdown and select your latest deployment.
1671015078847.png

This will trigger the script and fetch details every hour.

So how will it look finally?

image.png

image.png


1671019779982.png
Appreciate your work! Working perfectly.
 

Bharat

TF Select
VIP Lounge
@ChurningSidd Created a PR to fetch the HDFC CC data
to test : need to create a sheet named HDFC in the same spreadsheet, and currently the regex is for 1 day and only Rs (INR) supported, need more currency email message samples to change the regex
Do let me know if it works as expected and/or needs any change. :)
if the code looks bad, pls feel free to add your commits, I just did it in a jiffy.
 
Last edited:

ChurningNoob

TF Ace
VIP Lounge
@ChurningSidd Created a PR to fetch the HDFC CC data
to test : need to create a sheet named HDFC in the same spreadsheet, and currently the regex is for 1 day and only Rs (INR) supported, need more currency email message samples to change the regex
Do let me know if it works as expected and/or needs any change. :)
if the code looks bad, pls feel free to add your commits, I just did it in a jiffy.
I dont have hdfc hence never added those scripts but @hks789 has some scripts if he is ok he can add those my project
 

hks789

TF Ace
VIP Lounge
I dont have hdfc hence never added those scripts but @hks789 has some scripts if he is ok he can add those my project
Feel free to pick anything from my repo: @ChurningSidd @Bharat

These scripts need minor changes to the sheets to work, Some needs additional changes, as mentioned in the ReadMe
Rest all are same.
 
Last edited:

Bharat

TF Select
VIP Lounge

visvin

TF Premier
VIP Lounge
@ChurningSidd
This was working like clockwork till 10 days ago. I know the script is running as the emails get labelled as 'axis processed' but the details do not get populated into the Axis tracker file.
I tried to deploy the script again, but didn't help. Any advice on how to fix this?
 

mgforce

TF Ace
VIP Lounge
Help needed - I am using IDFC Script of hks789

Script running well and if I run the scrip, I see it reads 2 messages. But when deploying web-app, no new messages being captured..

See 2 emails read..
1688461014429.png
But nothing here..
1688461051938.png
What can be going wrong here?
 
Top