Automatically sync transactions from Up Bank (Australian digital bank) to YNAB (You Need A Budget) using Cloudflare Workers.
- 🔄 Real-time Sync: Webhooks automatically sync transactions as they're created and settled
- đź”’ Secure: API key authentication and webhook signature verification
- đźš« Duplicate Prevention: Smart import_id handling ensures transactions aren't duplicated
- ⏰ Scheduled Sync: Hourly cron job syncs the last 30 days to catch any updates
- 🗺️ Account Mapping: Map multiple Up Bank accounts to YNAB accounts
- đź“… Date Control: Configure the earliest date to sync from
- An Up Bank account (Australian bank)
- A YNAB account
- A Cloudflare account (free tier works)
- Bun installed locally
- Visit https://api.up.com.au/getting_started
- Create a personal access token
- Copy the token (format:
up:yeah:...)
- Visit https://app.ynab.com/settings/developer
- Click "New Token"
- Enter a token name (e.g., "Up Bank Sync")
- Copy the generated token
git clone https://github.com/timoconnellaus/up-to-ynab
cd up-to-ynab
bun installCopy the example environment file:
cp .dev.vars.example .dev.varsEdit .dev.vars and add your API keys:
UP_BANK_API_KEY=up:yeah:your_up_bank_api_token_here
YNAB_PERSONAL_ACCESS_TOKEN=your_ynab_personal_access_token_here
API_KEY=your_random_api_key_here # Generate any random string (mash the keyboard for 20-40 chars will do)bun run devThe worker will be available at http://localhost:8787
curl -X GET http://localhost:8787/up/accounts \
-H "Authorization: Bearer YOUR_API_KEY"This returns a list of your Up Bank accounts with their IDs.
curl -X GET http://localhost:8787/ynab/info \
-H "Authorization: Bearer YOUR_API_KEY"This returns your YNAB budgets and accounts with their IDs.
Update the ACCOUNT_MAPPING in .dev.vars to map your Up Bank accounts to YNAB accounts:
ACCOUNT_MAPPING={"up-account-id-1":"ynab-account-id-1","up-account-id-2":"ynab-account-id-2"}Example:
ACCOUNT_MAPPING={"da764e70-593f-420a-82c9-430d24f653e6":"bb784a57-ae94-442c-b405-162b46bb844b"}Also update YNAB_BUDGET_ID with your budget ID from step 5.
Set the earliest date you want to sync transactions from:
SYNC_START_DATE=2025-10-01Transactions before this date will never be synced, even if you run manual syncs.
bunx wrangler deployAfter deployment, note your worker URL (e.g., https://up-to-ynab.your-subdomain.workers.dev)
Update .dev.vars with your deployed worker URL:
BASE_URL=https://up-to-ynab.your-subdomain.workers.devSet your secrets in Cloudflare Workers:
bunx wrangler secret put UP_BANK_API_KEY
bunx wrangler secret put YNAB_PERSONAL_ACCESS_TOKEN
bunx wrangler secret put API_KEY
bunx wrangler secret put YNAB_BUDGET_ID
bunx wrangler secret put BASE_URL
bunx wrangler secret put SYNC_START_DATE
bunx wrangler secret put ACCOUNT_MAPPINGcurl -X POST https://up-to-ynab.your-subdomain.workers.dev/webhook/create \
-H "Authorization: Bearer YOUR_API_KEY"This will return a webhook secret. Save it immediately - it won't be shown again!
Set the webhook secret in Cloudflare:
bunx wrangler secret put UP_WEBHOOK_SECRET
# Paste the secret when promptedAlso update your local .dev.vars:
UP_WEBHOOK_SECRET=your_webhook_secret_hereSync your existing transactions:
curl -X POST https://up-to-ynab.your-subdomain.workers.dev/sync \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"startDate": "2025-10-01"}'- When a transaction is created in Up Bank, a webhook triggers and syncs it to YNAB
- When the transaction settles, it updates the existing YNAB transaction to "cleared" status
- Duplicate detection ensures the same transaction isn't created twice
- Every hour, the worker syncs the last 30 days of transactions
- This catches any manual updates you make in Up Bank (like editing descriptions)
- Duplicates are automatically skipped
Use the /sync endpoint to manually sync transactions from a specific date:
curl -X POST https://up-to-ynab.your-subdomain.workers.dev/sync \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"startDate": "2025-10-01"}'List all Up Bank accounts with IDs
Auth: Required (Bearer token)
List YNAB budgets and accounts with IDs
Auth: Required (Bearer token)
Create an Up Bank webhook pointing to this worker
Auth: Required (Bearer token)
Receive webhook events from Up Bank (called by Up Bank, not you)
Auth: Webhook signature verification
Manually sync transactions from a specific date
Auth: Required (Bearer token)
Body:
{
"startDate": "2025-10-01"
}Watch real-time logs from your deployed worker:
bunx wrangler tail- Check webhook signature is set correctly
- View webhook delivery logs in Up Bank API
- Check worker logs for errors
- Verify account mapping is correct
- Check that transactions are after
SYNC_START_DATE - Ensure Up Bank accounts are mapped in
ACCOUNT_MAPPING
bun run devAfter modifying wrangler.jsonc:
bun run cf-typegenbun run testbun run deployMIT
Pull requests welcome!