Automate your personal expense tracking - from HDFC SMS to Notion + Splitwise, in under 10 seconds.
Built for the Indian UPI/HDFC ecosystem. No third-party apps, no subscriptions, no servers. Just your phone, Google Apps Script, and a Notion database.
When you pay: HDFC SMS arrives -> iPhone Shortcut fires automatically -> you confirm description, category, and whether it's shared (10 seconds) -> entry created in Notion + Splitwise updated if shared.
When your flatmate pays: They log to Splitwise -> Google Apps Script polls every hour -> Notion entry auto-created -> you get an email to set the category.
| Component | Tool | Cost |
|---|---|---|
| SMS trigger | iPhone Shortcuts (iOS 16.5+) | Free |
| Expense database | Notion API | Free |
| Shared expense tracking | Splitwise API | Free |
| Flatmate sync | Google Apps Script | Free |
| Notifications | Gmail | Free |
Total cost: ₹0/month
┌─────────────────────────────────────────────────────┐
│ FLOW 1: YOU PAY │
│ │
│ HDFC SMS -> iPhone Shortcut -> [10-sec prompt] │
│ ↓ ↓ │
│ Notion DB Splitwise │
│ (always) (if shared) │
└─────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────┐
│ FLOW 2: FLATMATE PAYS │
│ │
│ Flatmate -> Splitwise -> Google Apps Script │
│ (polls hourly via API) │
│ ↓ │
│ Notion DB │
│ + Email notification │
└─────────────────────────────────────────────────────┘
- iPhone with iOS 16.5+ and Shortcuts app
- HDFC Bank account (SMS alerts enabled)
- Notion account (free tier)
- Splitwise account (free tier)
- Google account (for Apps Script)
- Go to notion.so/my-integrations
- Create a new integration -> name it
Expense Tracker - Copy the Internal Integration Secret (
secret_xxx...) - Create your monthly expense database with these properties:
| Property | Type | Options |
|---|---|---|
| Description | Title | - |
| Date | Date | - |
| Amount | Number | Rupee format |
| Category | Multi-select | See category list below |
| Payment Method | Select | Phone Pe, CRED UPI, Credit Card |
- Share the database with your integration (... menu -> Connections)
- Copy the Database ID from the URL (32-character string after the last
/)
Category list:
Groceries and Veggies
Outside food
Rent
Cook
WiFi & Internet Bills
Fuel
Entertainment
Skincare
Transportation
Others
- Go to secure.splitwise.com/apps/new
- Register a new app -> name it
Expense Tracker-> URL:https://localhost - Click Create API key -> copy the key
Get your IDs via terminal:
# Your user ID
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://secure.splitwise.com/api/v3.0/get_current_user
# Your group ID + flatmate's user ID
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://secure.splitwise.com/api/v3.0/get_groupsSee shortcut/reference.md for the complete step-by-step guide.
Trigger: Message containing From HDFC Bank A/C *XXXX (your last 4 digits)
- Go to script.google.com -> New Project
- Paste the contents of
google-apps-script/splitwise-to-notion.gs - Fill in your credentials in the
CONFIGobject at the top - Run
testScriptfirst to verify all connections - Set up a trigger:
syncSplitwiseToNotion-> Time-driven -> Every hour
All credentials go in the CONFIG object in splitwise-to-notion.gs:
const CONFIG = {
SPLITWISE_API_KEY: "your_splitwise_api_key",
SPLITWISE_GROUP_ID: "your_group_id",
ANUP_USER_ID: "flatmate_user_id",
NOTION_SECRET: "secret_xxx",
NOTION_DATABASE_ID: "your_database_id",
YOUR_EMAIL: "your@email.com",
};At the start of each month:
- Create new monthly Notion database
- Share it with your Notion integration
- Copy the new database ID
- Update
database_idin the Shortcut (Notion JSON body action) - Update
NOTION_DATABASE_IDin the Apps Script CONFIG
The Google Apps Script:
- Calls
GET /api/v3.0/get_expenses?group_id=YOUR_GROUP_ID - Filters for expenses created by your flatmate since the last run
- Auto-detects category from description keywords (Blinkit -> Groceries, Zomato -> Outside food, etc.)
- Creates a Notion entry - with
⚠️ [FLATMATE]prefix if category is ambiguous - Emails you with a direct link to review
Extend this in the KEYWORD_MAP object in the script:
| Keyword | Category |
|---|---|
| blinkit, zepto, swiggy instamart | Groceries and Veggies |
| swiggy, zomato, restaurant | Outside food |
| rent | Rent |
| cook, maid | Cook |
| wifi, internet, broadband | WiFi & Internet Bills |
| petrol, fuel | Fuel |
| netflix, spotify, prime | Entertainment |
- Never commit your API keys to the repo
- Regenerate Splitwise API key periodically
- Notion integration secret is scoped only to databases you explicitly share with it
- Google Apps Script runs under your Google account with minimal permissions (URL fetch + Gmail)
MIT - use it, fork it, improve it.