Caspion - Automated expense tracking from Israeli banks and credit cards
Many people track their expenses with spreadsheets or with budgeting apps (like YNAB).
The most annoying part of this process is transferring the data from the banks or credit cards to the budgeting tool you use. It usually requires you to go to the website of each one of your banks and credit cards, and manually copy the data to your budgeting tool.
This project aims to automate this process by fetching the data automatically from your Israeli financial institutions and sending it to the budgeting tool of your choice.
In addition, it can automatically set an expense category for transactions according to predefined patterns.
Internally it uses the Israeli bank scrapers npm package.
If you want to ask questions, suggest features or report issues, join our discord channel.
We are in transition to a new UI. Some features don't yet exist in the new UI and will be added overtime. You can still access the old UI by clicking on the switch next to ממשק חדש.
- One click to fetch transactions from multiple Israeli banks and credit cards
- Exporting transactions to Google Sheets, YNAB, Excel (CSV) or JSON file
- A basic UI for configuration
Running the app
The first time you run the app, you will need to set up the accounts you want to fetch data from (importers).
Now you can set up the exporters - where the data will be sent to. The CSV exporter is enabled by default. If you want to export to YNAB, see instructions at the end of the README.
Report a problem
We are still in beta, and you may find errors. Please use the REPORT A PROBLEM button in the app to report to us.
Use this button to find the logs folder as well.
Running in a development environment
node-gyp. In Windows you have a checkbox in the NodeJS installer to install also the
This module is for packages that compile native code in their installation, in our case it is required for
keytar. (Note that if you install visual studio, you need to add the workload of
desktop development with C++)
Currently, this project depends on
libsecret, so you may need to install it before running
Depending on your distribution, you will need to run the following command:
sudo apt-get install libsecret-1-dev
- Red Hat-based:
sudo yum install libsecret-devel
- Arch Linux:
sudo pacman -S libsecret
For M1 macs, if you get an error while scraping due to not being able to download chromium, download it manually
as described here. Then in the settings,
set the chromium path to be the result of
Start from Source
yarnto install the dependencies
yarn serveto start the app
- Set up additional exporters (Optional)
- If you want to set up YNAB or Google Sheets, see instructions below
- Run by clicking on the
Runbutton in the app
- Configure automatic category classification (Optional)
categoryCalculationScript.js. This file contains the patterns for classifying transactions to categories automatically.
- Edit this file to add any mapping from function description to category that fits your needs.
- If using YNAB, the categories you return must match category names in YNAB
Building for production
YNAB integration setup (optional)
YNAB is a budgeting software. If you want to manage your budget there and have your expenses updated automatically to YNAB follow these steps:
- Create an account in YNAB
- Create in YNAB unlinked accounts for each financial account you want to track (bank accounts and credit cards)
- Get the YNAB access token
- In YNAB go to
Account settings -> Developer settings
- Click on
- On the top of the screen you will see the full token (the token with XXXX in it is not the full one).
- Save this token in the YNAB settings in the app.
- In YNAB go to
- Choose your budget from the dropdown
- Fill the table containing account number to ynab account id mapping
- For each account you want to track add another row to the table
account numbercould be the credit card number, or the bank account number. To be sure, you can run the app so it exports transactions to a CSV and get the account number from there.
- Then choose the matching a ynab account from the dropdown
- Click on Save to save the configuration
Google Sheets integration setup - when building from source code (optional)
If you set Google Sheets as an exporter the transactions results will appear in a dedicated sheet. In the release version of Caspion, this integration will work out of the box. If you wish though to build/debug this from source, you will need to setup your own test OAuth 2.0 Client on GCP (Google Cloud Platform). Follow these steps:
- Create a new project in GCP
- Enable Google Sheets API
- On the left panel, click to create OAuth consent screen
- Now you are ready to create your credentials that will be used later on by Caspion
- On the left panel, click "Credentials" -> "CREATE CREDENTIALS" (on the top) -> "OAuth 2.0 Client IDs"
- Application Type: "Web Application"
- Authorized redirect URIs, add:
- Write down the generated
Now that you have the keys above, store them as env variables:
EXPORT GOOGLE_CLIENT_ID=XXXXX EXPORT GOOGLE_CLIENT_SECRET=YYYYYY
That's it. Next time you'll run the code a one time OAuth authorization window will appear and ask for access.
CSV (Excel) Note
In some cases you may get gibberish when you open the CSV file in Excel. In this case, please follow the next steps:
- Open a new Excel document.
- Go to
Import From CSV/Text.
- Select your CSV file.
- For the "Encoding"/"File Origin", select
Unicode UTF-8 (65001).
The Release workflow, configured in
.github/workflows/release.yml, will draft a new release or update the artifacts on an existing draft, according to the following conditions:
- A change pushed to the
package.json, with the prefix
v, is not a published release.
- Upload the artifacts to the
It means that after you published a new release, from the Github interface, you need to upgrade the version in the
package.json file, to get a new draft.
Providing your financial account credentials to software is not risk free. We will do our best to protect your credentials, but we take no responsibility for any possible damages. If you want to use this we suggest you ask your financial institution for credentials for a user that has only read access to the relevant account and use those credentials to reduce the potential risk.