nielsmaerten/ynab-buddy

Banks "not cleared" indicator in date or some other field

Closed this issue ยท 4 comments

First of all thanks for this great tool. It was very easy to configure because your documentation was done really well. ๐Ÿ‘

My bank Nordea describes upcoming not cleared transactions in the date field with a text "Varaus" (reservation).

Would it be possible to either have transactions with specific text value in some column as a not cleared transaction or alternatively simply to ignore them.

This is not a big issue. For now I just delete those rows manually. I also know that my banks CSV is crap so I understand if this kind of feature would be a feature creep. ๐Ÿ˜„

Hey rauhasto

It's an interesting topic. On the one hand you're right about this being a bit of a feature creep.
ynab-buddy is supposed to be a generic tool, so adding an exception for 1 bank does go against that philosophy. (This is how projects like YNAP end up having to maintain 100+ different formats.)

On the other hand... if this is supposed to be a generic tool, then it should work with any (csv) format, no matter how weird the bank makes it. ๐Ÿค”

๐Ÿ’ก With that in mind, here's a (possible) solution I came up with:
ynab-buddy could be extended using a hooks system.

Here's what that could look like:

  • Alongside the config file in ~/ynab-buddy/config.yaml, there would be a javascript file: hooks.js
  • That file would contain several functions that each get called at certain points in the process of parsing a file, extracting transactions, and uploading them to YNAB.
  • By adding your own code, you could "hook into" any part of the process, and modify the behavior. In your case: you could delete any line containing the text "Varaus", after ynab-buddy has finished parsing the file, but before it starts converting lines into transactions.

Of course this approach is assuming you're comfortable writing a bit of javascript code. (Or maybe, have ChatGPT do it?)
This is still in the 'idea' phase, so I'd love to hear your thoughts!

Hi,

And thanks for help!

This would be a good idea! For now I've made a batch script that deletes these problematic lines from the input csv and then calls ynab-buddy. It seems to work pretty ok. However your solution does sound better.

By the way have you planned to add cleared/not cleared support for transactions? I actually meant that when I incorrectly used term "reservation". Those Nordea "Varaus" lines are transactions that have not yet been cleared. It does seem that the api supports importing them but I'm not so sure about the csv uploader.

Hi again @rauhasto , hope you're doing well
Good news: the Hooks ๐Ÿช feature is now in Beta!

This should not only allow you to remove certain transactions from your CSV files, but also mark transactions as 'uncleared' before they're uploaded to your budget.

I've already started using a hook of my own to clean up the "memo" field in my own CSV files. (My bank loves putting random junk there)

If you have some time to give Hooks a try, I'd love to get your feedback.
Just let me know if you need some help getting set up, or if you run into any issues. After all, it's still a beta ๐Ÿ—๏ธ๐Ÿ˜‰

Great! I'll have a look as soon as possible. This would likely be a good alternative for my current messy batch script (why on earth did I make it with batch? ๐Ÿ˜…).

Big thanks for developing this tool further and listening to ideas! ๐Ÿ’ช