New pack: Coda for YNAB

I made a pack to sync from budgeting software I use, YNAB (You Need A Budget)

I’ve found it handy in a surprising variety of ways to be able to pull my financial transactions and budgets into Coda.

If you find the pack useful or have feedback, let me know

15 Likes

Thank you for this, David!
I have 3 different budgets, though, and I can’t seem to connect them… I figured I would have to have 1 Coda doc per budget and create 3 different YNAB connections to choose a different budget in each connection, but it always connects to the same budget. Is it possible to connect to multiple budgets?

You should be able to select a non-default budget in the sync table settings

You can find the sync table settings under the table’s “Options”:

And you should see “Budget ID” as an option which should autocomplete if you type in a budget name:

1 Like

Got it, thank you so much!

I’m a big fan and user of YNAB, so very happy to have found your Pack! (incidentally I found it on YNAB API page, as I thought a pack should be made)

Thank you for creating it, it will really help integrating cost tracking into my project management docs!

You wrote that

  • Creating and updating transactions, and
  • Importing scheduled transactions

are not currently supported. Is there any chance that they will be in the (near) future?
That would be awesome, and would definitely help making the YNAB/Coda collaboration more Coda-centric.

Thanks again!

The main reason I haven’t added creating & updated transactions is because the YNAB API does some unusual things with oauth scopes: the blank scope has write access and the “read-only” doesn’t, so it’s impossible to take an existing “read-only” connection and prompt a user if they want to add write access later. I was hesitant to make the pack request write access for everyone all the time since other security-minded folks like myself might prefer to install apps that request minimal access by default. Ideally I’d like to track down someone at YNAB and see if they’re willing to implement a write oauth scope so that read-only,write works the same was as the blank scope. If there’s enough demand from the community I’m open to switching the default scope and adding create/update functions in the meantime.

Scheduled transactions would be doable. The trick is to figure out what’s the best approach for table design. One way might be to try to make them part of the “Transactions” table, maybe putting “date_next” as the transaction date and introducing new columns on the transaction table for “frequency” and “date_first”. The other option would be to make a separate table entirely. Any thoughts on which would better suit your use case?

Dear David,

Thank you for taking the time to write a detailed answer!

Regarding scheduled transactions, I’d like to use them to make cashflow forecasts for the non-profit I work for. We use YNAB to gather future costs and revenues as scheduled transactions (repeating or not).

In YNAB, a single future transaction is shown for every repeating transactions. Once in Coda, I could calculate cashflow for e.g. the coming six months. So, to answer your question regarding my use case, I don’t think a separate table is better than integrating the scheduled transactions with the past transactions — I have to generate more transactions anyways, either from a separate table, or from a single instance in the current transactions.

I see one advantage though in making them part of the Transactions table: filtering with date=Today() will work between two syncs.

The implementation you suggest seems great. I’m not sure date_next and date_first are necessary though: with the date of the current instance of the scheduled transaction and its frequency, date_next can be computed. And the previous instances are part of the past transactions any way.

Regarding creating and updated transactions, I was not aware of the intricacies of OAuth scopes, and I totally see your point to avoid giving a blank cheque when dealing with financial data. I would however be very happy to be able to create scheduled transactions from Coda, for every project in our project management doc. Given the number of existing community applications using the YNAB API, I hope YNAB will be interested in implementing a write OAuth scope as you suggested!

@Sebastien, what fields are most important to you in terms of creating and updating transactions? Would it still be useful to you if there were create and update functions that worked for simple transactions but not for split transactions?

Definitely! My use case foresees very few split transactions, and they would any way be created within YNAB, from bank transactions rather than scheduled transactions.

By decreasing order of importance: Amount, Payee, Category, Memo, Date, Account
And Clear, Flag and Repeat would not be used as far as I know.

That would be amazing to be able to create/update transactions from Coda using these six fields. Thank you for your willingness to extend your pack!

I’ve added a new “include scheduled” optional parameter to the transactions sync table to include scheduled transactions

I’ve also updated the pack with update & create actions. Not all fields or transaction types are supported. I haven’t documented the formulas yet in example doc, so if you try it out soon and anything feels off I might be able to make breaking changes before anyone else notices the feature exists.

Let me know if these updates meet your needs

1 Like

Hi David, my intention is to use this to develop a suite of reports that will track financial independence.
e.g. net worth, monthly expenses vs income (and rolling averages), savings ratio, personal inflation rate and so forth.

Your pack is a brilliant start, but I’ve realised I’m missing monthly data, especially account balance by month, and expenditure in each category by month. Is this something you would consider implementing in the future?

Spending by category by month is relatively simple to aggregate or filter

Coda supports grouping, for example, so you could make a calculated month column based on transaction date and make views of transactions grouped by month with the group summary column set to Sum the transaction values for each month

I don’t track my net worth monthly, but FYI here’s how I track it yearly: Yearly Net Worth Tracker

You could maybe aggregate account balance each month, but there are two challenges:

  • you need to create a table with each account and budget month, either manually or with a formula (using ForEach and AddOrModifyRows, probably). I could potentially create a sync table for this
  • currently a sync table can only have 10k rows, so if you depend on the transactions table to calculate net worth then there’s a theoretical limit to how far back in time you do it as the years go by and transactions add up. If/when that happens, in theory you could move the values into an editable cell using default values or buttons. If we wait long enough it’s also possible the 10k row limit for sync could get raised in time, avoiding this problem entirely

I did actually experiment with making a category balance per budget month sync table since the YNAB API supports that, but in my own budget I have over 100 categories and I ended up hitting the 10k sync table, so I would need to add parameters to help filter which categories and months to include to make that useful (for myself, at least)

Thanks for making this pack! I’ve gotten everything to sync up, but the create transaction action will absolutely not work for me. I have it matching the fields correctly, but I keep getting a server error.