Automatically add your up transactions to YNAB.
(This one doesn't use serverless stuff)
Want something you can deploy into your serverless environment? Check out the original version by daveallie!
- Up Bank Account
- YNAB Account
git clone https://github.com/NotActuallyTerry/up-to-ynab
cd up-to-ynab
- Copy
src/config.example.json
tosrc/config.json
- Get the needed tokens by doing the following:
Head to https://api.up.com.au/getting_started and follow the instructions to get a key.
Head to https://app.youneedabudget.com/settings/developer and create a new Personal Access Token.
You can get your YNAB Budget ID by visiting you budget in YNAB. Your URL will look like:
https://app.youneedabudget.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
.
The xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
portion is your YNAB Budget ID.
Figure out where on the web this script will be reachable, and run this:
./upwebhook.sh --api_key up:demo:WknwVXxOvTk2AfTU --webhook https://up-api.example.com/ping-me
REPLACING THE DEFAULTS
In amongst this, you'll find a secretKey
property, grab the value of this and yeet it into your config.
- Copy
src/accountMapping.example.json
tosrc/accountMapping.json
. - In
accountMapping.json
, leave the transactional and catchall account but create one entry per Up Saver you'd like to map out. Any savers you don't explicitly map out will have their transactions go into the catchall account. The names are aesthetic and just help you to connect the accounts, they don't need to match anything else. - Run the following, replacing
<UP_API_SECRET>
with your Up API Secret.
curl https://api.up.com.au/api/v1/accounts -G -H 'Authorization: Bearer <UP_API_SECRET>'
# Response should contain one transactional account, and as many savers as you have.
- For the transactional account and each saver you have in
accountMapping.json
, replace theupId
with the relevantid
from the curl response. - In YNAB, create a new account for the Up Transaction account, each Saver you have mapped and a catchall account.
- For each mapping in
accountMapping.json
, open the YNAB account, your URL should look likehttps://app.youneedabudget.com/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz/accounts/yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
. Take theyyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
portion and set theynabId
inaccountMapping.json
.
yeah send in PRs i guess