Skip to content

Personal IFTTT script for auto track income/expense

Notifications You must be signed in to change notification settings

mix5003/ifttt-to-toshl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is for extract transaction from push notification message and SMS form bank.

Dependency Service

  1. IFTTT for capture notification and SMS.
  2. Google Firebase for extract message and send to Toshl API.
  3. Toshl for core track all transaction.

Step to deploy

  1. Sign up Toshl. and get your token.
  2. Config firebase project id in .firebaserc (copy config from .firebaserc.example)
  3. First deploy your firebase function. (You need to fill your credit card info to allow your function interact with networks)
firebase functions:config:set accounts.kplus.0.digit=bank // bank is unused. i use index base for default.
firebase functions:config:set accounts.kplus.0.account=TOSHL_KPLUS_ACCOUNT_ID // for now 0 mean bank account, otherwise mean credit card
firebase functions:config:set accounts.kplus.1.digit=last4digit1
firebase functions:config:set accounts.kplus.1.account=TOSHL_K_CREDIT_CARD_ACCOUNT_ID_1
firebase functions:config:set accounts.make_by_kplus=TOSHL_MAKE_ACCOUNT_ID
firebase functions:config:set accounts.truemoney.0.digit=wallet
firebase functions:config:set accounts.truemoney.0.account=TOSHL_TRUEMONEY_ACCOUNT_ID
firebase functions:config:set accounts.truemoney.1.digit=last4digit1
firebase functions:config:set accounts.truemoney.1.account=TOSHL_TRUEMONEY_CARD_ACCOUNT_ID_1
firebase functions:config:set accounts.citibanks.0.digit=last4digit1 // firebase functions:config:set accounts.citibanks.0.digit=1234
firebase functions:config:set accounts.citibanks.0.account=TOSHL_CITIBANK_ACCOUNT_ID_1
firebase functions:config:set accounts.citibanks.1.digit=last4digit2
firebase functions:config:set accounts.citibanks.1.account=TOSHL_CITIBANK_ACCOUNT_ID_2
firebase functions:config:set accounts.mymo=TOSHL_MYMO_ACCOUNT_ID
firebase functions:config:set accounts.ktc.0.digit=last4digit1
firebase functions:config:set accounts.ktc.0.account=TOSHL_KTC_ACCOUNT_ID_1
firebase functions:config:set accounts.ktc.1.digit=last4digit2
firebase functions:config:set accounts.ktc.1.account=TOSHL_KTC_ACCOUNT_ID_2
firebase functions:config:set accounts.ttb.0.digit=last4digit1
firebase functions:config:set accounts.ttb.0.account=TOSHL_TTB_ACCOUNT_ID_1
firebase functions:config:set accounts.uob.0.digit=last4digit1
firebase functions:config:set accounts.uob.0.account=TOSHL_UOB_ACCOUNT_ID_1

firebase functions:config:set toshl.token="YOUR_TOSHL_TOKEN"
npm run deploy
  1. Install IFTTT in your mobile phone. And sign in.

  2. Config IFTTT Applet to capture message and send to firebase functions.

IFTTT Applet

TrueMoney

This:

  • Service: Android SMS
  • Trigger: New SMS received matches search
  • Keywords: ชำระเงิน

That

  • Service: Webhook
  • Action: Make a web request
  • URL: Your True money firebase url
  • Method: POST
  • Content-type: text/plain
  • Body: {{Text}} - {{FromNumber}}

Citibank

This:

  • Service: Android SMS
  • Trigger: New SMS received matches search
  • Keywords: Your last 4 digits of credit card

That

  • Service: Webhook
  • Action: Make a web request
  • URL: Your Citibank firebase url
  • Method: POST
  • Content-type: text/plain
  • Body: {{Text}} - {{FromNumber}}

KPlus

This:

  • Service: Android Device
  • Trigger: Notification received from a specific app
  • App Name: K PLUS

That

  • Service: Webhook
  • Action: Make a web request
  • URL: Your KPlus firebase url
  • Method: POST
  • Content-type: text/plain
  • Body: {{NotificationTitle}} {{NotificationMessage}}

MyMoLotto (Untested)

This:

  • Service: Android Device
  • Trigger: Notification received from a specific app
  • App Name: MyMo

That

  • Service: Webhook
  • Action: Make a web request
  • URL: Your MyMoLotto firebase url
  • Method: POST
  • Content-type: text/plain
  • Body: {{NotificationTitle}} {{NotificationMessage}}

KTC Online (Push Notification)

If you want you can change to SMS triggers. But sometime KTC will double send SMS. I Think it KTC retry process when SMS. And I think SMS will notfication if amount more than 100 THB. This:

  • Service: Android Device
  • Trigger: Notification received from a specific app
  • App Name: KTC Mobile
  • Keyword (not necessary): Your last 4 digits of credit card

That

  • Service: Webhook
  • Action: Make a web request
  • URL: Your KTC firebase url
  • Method: POST
  • Content-type: text/plain
  • Body: {{NotificationTitle}} {{NotificationMessage}}

About

Personal IFTTT script for auto track income/expense

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published