-
Notifications
You must be signed in to change notification settings - Fork 137
Getting Started
Setting this up requires quite a bit of work, especially keeping the code up to date. We have built a fully managed version of the app over at https://syncforynab.com
First of all, you need will to acquire a YNAB Personal Access Token. You will need this later when setting up Fintech to YNAB.
There are 2 ways to run Fintech to YNAB, with webhooks and without webhooks.
Webhooks are used by Monzo and Starling to send transactions in real time to Fintech to YNAB. To run this, it needs to be hosted somewhere like Heroku so that Monzo and Starling can reach it.
If you do not want real time transactions, you can just run the app locally, and push your transactions into YNAB when you feel like it by running some commands.
If you just want to use imports and not webhooks from Monzo, then you can just run this locally. You will need Ruby installed, and be able to use Git
- Clone the Git repo (
[email protected]:syncforynab/fintech-to-ynab.git
) - In that directly, run
bundle install
to install all the dependencies - Rename
.env.example
to.env
, and setup all the values you need from below.
Once you are done, you can run all the import scripts you need. Check the README for those instructions (there are instructions for each bank).
The easiest way to install Fintech to YNAB with Webhooks is by using Heroku. However, as this is just a basic Ruby on Rails app, you have a lot of options on how to host it.
- Click this link to launch the app on Heroku
- Give the app a name. For example: "scott-fintech-to-ynab"
- Setup the Environment Variables when prompted
To run import scripts on Heroku (to import historical banking data), you can run the following after installing the Heroku CLI tool:
heroku run -a APP_NAME bin/import
Please check the README for instructions on how to run imports for each bank.
Note: This will not update automatically, please follow the steps below to setup updates.
When we push updates, they are not automatically deployed to your Heroku app. Heroku makes this process a little bit difficult, and it involves using a few extra steps.
- First of all, you need to "fork" this repository. To do so, click the "Fork" button at the top of this page. This essentially creates a copy of the Fintech to YNAB codebase in your Github account.
- From there, go to your Heroku app in the Heroku dashboard, and click the "Deploy" tab
- Under "Deployment method" select "Github"
- Now in the "Connect to GitHub" section, type "fintech-to-ynab" in the "repo-name" text field and hit search
- Then click "Connect" next to the repository it found (this is the fork we created earlier)
- If you wish, you can "Enable Automatic Deployments", which will remove some steps later on
This will now tell Heroku to deploy the code from your personal copy of Fintech to YNAB. However, your fork on Github will not automatically keep in sync with changes from our main repository. For this to happen, you need to update the fork. To do this, you can Fetch Upstream.
Once you have updated your fork, Heroku will automatically deploy those changes if you enabled that option. If you did not, just head back over to Heroku and click Deploy.
You will need to update the fork and Heroku every time you want to deploy the latest version.
Variable | Description | Required |
---|---|---|
YNAB_ACCESS_TOKEN | Your YNAB access token (Get it here) | Yes |
YNAB_BUDGET_ID | Which YNAB budget to use. By default, it will use the first one. | No |
URL_SECRET | This is used to secure your webhook endpoints. More info here | No |
SKIP_FOREIGN_CURRENCY_FLAG | We set a flag on foreign transactions. Setting this to true will disable that | No |
SKIP_EMOJI | When using Monzo, we append the emoji they supply to the description. Setting this to true will disable that. | No |
SKIP_TAGS | When using Monzo, we append the hashtags they supply to the description. Setting this to true will disable that. | No |
PUSHBULLET_API_KEY | Push category balance notifications to Pushbullet | No |
This is used to verify that the webhook is coming from your bank. To use it, please set the URL_SECRET
environment variable to a random string, and then append ?secret=THAT_STRING
to the webhook URL when adding it to your bank.
Please check the README.md for instructions on how to import your bank's transactions.