This is a ruby script that pulls your transactions from your banks and imports them into You Need A Budget (YNAB).
- Most German and Austrian banks (all banks that [figo.io](https://figo.io or that implement the FinTS standard) supports)
- BBVA Spain (private accounts only)
- N26
YNAB only supports U.S. and Canadian Banks for now.
If you're someone from the YNAB-Team: please add a public api-endpoint for an easier import of transactions. ❤️
If you clone this repository you don't need to follow step 2!
-
Install docker and docker-compose
-
Create a
docker-compose.yml
file with this content -
Create a
config.yml
---
ynab:
username: # email
password: # password
budget_id: # budget_id
cash_account_name: # optional
accounts:
- dumper: :n26
iban: # iban of your n26
ynab_id: # account id in YNAB
ynab_name: # account name in YNAB
username: # email
password: # password
Example: config.sample.yml
docker-compose pull ruby && docker-compose run ruby
The FinTS / HBCI standard is mainly implemented by German banks.
fints_endpoint
(required)
The endpoint is the url which is needed to communicate with your bank to fetch the recent transactions. You can find it out here (use the PIN/TAN URL from the link).
fints_blz
(required)
This is the routing number / Bankleitzahl of your bank. You can find it out on the bank's website.
- Currently tested with DKB and ING-DiBa.
- !!! If you change your online banking password please don't run the importer with the wrong password. Your bank might lock your account if there are too many failed login attempts.
- It currently fetches the transactions from the last 35 days. Please open an issue or PR if you want to change this.
memo
is a combination of the reference text and the city of the transaction provided by N26.
- It currently only fetches the last 100 transactions. Please open an issue or PR if you want to change this.
set_category
(default: false)
Set the transaction category to the N26 category. Only makes sense if you have the N26 categories set up in your YNAB.
The field payee
will be N/A
because we currently don't get the payee name.
You need to get a figo.io account first.
force_download
(default: false)
Since there is a high chance that you use the
:figo
dumper more than once, all transactions from figo will be downloaded once and be cached thoughout the run.If you want to turn off this behavior add the option
force_download: true
.
On app.youneedabudget.com you can upload a .csv
file with your transactions. The structure looks like this:
Date,Payee,Category,Memo,Outflow,Inflow
2017-08-13,METRO BARCELONA,Transport & Car,Ticket for the Beach,"",-9.95
So we need this information for each transaction:
- Date (YYYY-MM-DD)
- Payee
- Category (optional)
- Outflow (optional if
Inflow
also uses negative numbers) - Inflow
The script fetches the transaction information from your bank and puts it into the format mentioned above. It exports the result of each individual account in a file. Then it uses selenium-webdriver Chrome to login to your YNAB account, navigates to the right account and imports it for you.
Support and contriubution of any kind is always welcome!!!
I'm not that into hardware. It would be super awesome if someone could help making this work on Raspbian. I already tried but building the docker container fails (Dockerfile-rpi).
- [@mkilling][https://github.com/mkilling] for writing the FinTS ruby lib that I'm using
- you for reading this