This project is for extract transaction from push notification message and SMS form bank.
- IFTTT for capture notification and SMS.
- Google Firebase for extract message and send to Toshl API.
- Toshl for core track all transaction.
- Sign up Toshl. and get your token.
- Config firebase project id in
.firebaserc
(copy config from.firebaserc.example
) - 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
-
Install IFTTT in your mobile phone. And sign in.
-
Config IFTTT Applet to capture message and send to firebase functions.
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}}
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}}
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}}
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}}
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}}