Carey's personal finance reporting system
- I use google calendar events to keep track of my daily expenditure, which is a mixture of cash and digital spendings
- Wanted a build a convenient expenditure tracking system on top of this existing workflow
- Receive email every week so I could be reminded of my spendings before I spend againFeels more intuitive to click the script and I get my spendings for the month to date
I am using Clasp, a node project developed by google to push my code to my google account. Wanted to use vs code as the editor, but realised there isn't any popular syntax extensions for apps script.
- Create a new project on script.google.com, copy the Script ID in project settings
- Go to https://script.google.com/home/usersettings and toggle "Google Apps Script API"
npm i -g @google/[email protected]
Note: use this version. The latest version doesn't work and gives you an async errorclasp login
from any directory (since clasp was installed globally). A browser window pops up and asks to allow Clasp in your Google account- navigate to your project directory,
clasp clone [scriptID]
.
Note: DO NOT commit the .clasp.json
created by clasp clone [scriptID]
. It contains your script ID.
Happy hacking!
- setup clasp workflow
- date fetching logic
- iterate through time period, search for $
- summation logic
- parsing string to int? (not automatic in js)
- decide on medium to receive info - html email? sms? link it to a react component and put on Vercel?
- [ ] set periodic triggers - why isn't my native js methods like array.reduce or parseInt() showing up in autocomplete suggestions?
- Download types@google-apps-script, try clasp's feature to transpile ts to js
- https://www.youtube.com/watch?v=4Qlt3p6N0es&ab_channel=LearnGoogleSpreadsheets
- https://github.com/google/clasp/tree/d6fbaae5e6ad6353fe8dc9ff771c1aed1b6b1a59
- https://stackoverflow.com/questions/15890958/how-to-install-a-previous-exact-version-of-a-npm-package
- google/clasp#853
- https://groups.google.com/g/adwords-scripts/c/JGSb0cvXO2k?pli=1