Add support for any bank or UPI provider in 5 minutes.
Is your bank already supported?
Built-in banks (no setup needed):
- HDFC Bank (Credit, Debit, UPI)
- Axis Bank (Credit Card)
- ICICI Bank
- IndusInd Bank
- OneCard
If your bank is listed above, you're done! No customization needed.
Don't want to code? Let us add it:
- Open GitHub Issue
- Title: "Add support for [Bank Name]"
- Include:
- Bank name
- 2-3 sample emails (remove sensitive info: amounts, full card numbers)
- Sender email address
We'll add the pattern in next release! 🎉
Open a transaction email from your bank and note:
From: alerts@yourbank.com
Subject: Transaction Alert
Body:
Rs. 1,234.56 debited from Card XX5678
at AMAZON on 01-12-2025 14:30
Identify:
- ✅ Sender email
- ✅ How amount appears ("Rs. 1,234" or "INR 1234")
- ✅ Where merchant is ("at AMAZON")
- ✅ Card/Account format ("XX5678" or "account 1234")
- ✅ Date format ("01-12-2025" or "01-Dec-2025")
In your sheet, go to Extensions → Apps Script, then create/edit BankPatterns.gs:
- Click + → Script
- Name it
BankPatterns - Paste this template:
function getBankPatterns() {
return [
{
name: 'Your Bank Name',
senderPattern: 'alerts@yourbank\\.com',
subjectPattern: 'Transaction|Alert',
bodyPattern: 'debited from Card',
amountPattern: 'Rs\\.?\\s*([\\d,]+\\.?\\d*)',
accountPattern: 'Card\\s+XX(\\d{4})',
merchantPattern: 'at\\s+([A-Za-z0-9\\s&]+)',
datePattern: '(\\d{2}-\\d{2}-\\d{4}\\s+\\d{2}:\\d{2})',
dateFormat: 'DD-MM-YYYY',
}
];
}Key points:
- Use
()parentheses to capture the value - Escape dots:
.becomes\\. \\d= digit,\\s= space,+= one or more
Test Your Pattern:
- Extensions → Apps Script
- Select
test_SingleEmailfrom dropdown → Run - Check logs (View → Executions) for extracted data
Verify extracted values are correct. Adjust patterns if needed.
Write to Sheet:
- Select
test_WriteToSheetfrom dropdown → Run - Check your Transactions sheet for the test entry
Email not found?
- In Apps Script, run
debug_EmailSearch() - Check which emails are being found
Data not extracting?
- In Apps Script, run
debug_ShowRawEmail() - View raw email content in logs (View → Executions)
Check search query:
- In Apps Script, run
debug_SearchQuery() - View current Gmail search parameters
Tip: Set LOG_LEVEL = 'DEBUG' in Config.gs for detailed logs.
| Field | What It Does | Example |
|---|---|---|
name |
Bank name in sheet | 'Axis Bank Credit Card' |
senderPattern |
Match sender email | 'cards@axisbank\\.com' |
subjectPattern |
Match subject | 'Transaction.*Alert' |
bodyPattern |
Match body text | 'debited from Card' |
amountPattern |
Extract amount | 'Rs\\.\\s*([\\d,]+)' |
accountPattern |
Extract card/account | 'Card (XX\\d{4})' |
merchantPattern |
Extract merchant | 'at\\s+([A-Za-z\\s]+)' |
datePattern |
Extract date/time | '(\\d{2}-\\d{2}-\\d{4})' |
dateFormat |
Date format | 'DD-MM-YYYY' or 'DD-MMM-YYYY' |
Axis Bank Credit Card pattern:
{
name: 'Axis Bank Credit Card',
senderPattern: 'alerts@axisbank\\.com',
subjectPattern: 'spent on credit card|Transaction alert',
bodyPattern: 'Axis Bank Credit Card',
amountPattern: '(?:INR|Rs\\.?)\\s*([\\d,]+\\.?\\d*)',
accountPattern: 'card\\s+(?:no\\.\\s*)?(XX\\d{4})',
merchantPattern: '(?:at|Merchant Name:)\\s+([A-Za-z0-9][^\\r\\n]+?)\\s+(?:on|is)',
datePattern: '(\\d{2}-\\d{2}-\\d{4})[,\\s]+(\\d{2}:\\d{2}(?::\\d{2})?)',
dateFormat: 'DD-MM-YYYY',
}See built-in patterns in Code.gs (lines 303-437) for more examples.
// Numbers with commas and optional decimals
([\\d,]+\\.?\\d*)
// Card number XX1234
(XX\\d{4})
// UPI ID xyz@bank
([\\w.]+@\\w+)
// Date DD-MM-YYYY
(\\d{2}-\\d{2}-\\d{4})
// Time HH:MM:SS
(\\d{2}:\\d{2}(?::\\d{2})?)
// Merchant name (alphanumeric + spaces)
([A-Za-z0-9][A-Za-z0-9\\s&\\.\\-]+)Test regex: Use regex101.com (select JavaScript flavor)
"No matching pattern found"
→ Check senderPattern and subjectPattern match your email
→ Add bodyPattern for precise matching
"Transaction missing amount"
→ Check amountPattern captures the number correctly
→ Use debug_ShowRawEmail() to see raw text
"Could not parse date"
→ Check datePattern matches your date format
→ Set correct dateFormat (DD-MM-YYYY, DD-MMM-YYYY, etc.)
"Merchant shows as N/A"
→ Check merchantPattern captures merchant name
→ Merchant might be on next line (include \\r?\\n in pattern)
Help everyone! Once your pattern works:
- Test with 3-5 emails
- Fork the repo
- Add pattern to Code.gs (in
BankPatternManager.getDefaultPatterns()) - Submit PR with bank name + sanitized sample email
- Open Feature Request
- Share: Bank name, sender email, sample emails (sanitized)
- We'll add it to default patterns!
Your pattern benefits thousands of users! 🙌
- 📖 Check built-in patterns in Code.gs for examples
- 🐛 Open Issue
- 💬 Ask in Discussions
- ⚡ Tag issue with "help wanted" for community support