A cron job running serverless on Cloudflare Workers.
This project uses Nordigen to connect to a bank account and searches for a specific transaction regex, alerting on Discord when this happens.
This project runs on Cloudflare Workers. You need a Cloudflare API token.
Use the Edit Cloudflare Workers
template and add a new rule:
Account | D1 | Edit
Nordigen connects to your Open Banking-compatible bank account.
Sign up and follow the quickstart guide: https://nordigen.com/en/account_information_documenation/integration/quickstart_guide/
Save the account ID from step 5, you will need it later.
In order to send notifications, we currently only support Discord Webhooks.
-
Create a
.env
file in the root of the repository with the Cloudflare API Token and Account ID:CLOUDFLARE_API_TOKEN=<token> CLOUDFLARE_ACCOUNT_ID=<account_id>
-
Create a
.dev.vars
file in the root of the repository with the following content:NORDIGEN_SECRET_ID=<secret> NORDIGEN_SECRET_KEY=<secret> NORDIGEN_ACCOUNT_ID=<account_id> DISCORD_URL=<discord-webhook-url>
-
Create a
.notify-patterns.json
file with the transaction patterns to notify:[ { "name": "salary", "pattern": "Weyland-Yutani" }, { "name": "mortgage", "pattern": "Goliath National Bank" } ]
Patterns are tested against the transaction description. If you need to update them later, edit the file above and run
./scripts/put-patterns.sh
. -
Install the dependencies:
npm i
-
Run the bootstrap script to create all the resources and deploy:
npm run bootstrap