Skip to content
Podlesnyy Andrey edited this page Jan 14, 2020 · 3 revisions

YNAB + Telegram bot = 🧡

I love YNAB for giving me control over my finances. I use YNAB almost every day. And little discontent inevitably arises with such heavy use.

Have you tried to calculate how many actions you need to add a transaction at the time of purchase? Seven, Carl!!!

Launch YNAB app Fingerprint Unlock Click Add transaction Enter amount Enter payee Enter category Click Save transaction

Now imagine: I'm on the market. I buy apples, potatoes, carrots, onions, greens, berries, fish, meat, butter. All this from different sellers. There are a lot of people around. Remembering everything and driving home transactions is not an option for me. To drive right into the application right away is a long time! And I don’t want to show my balance to everyone around me. What to do?

Or now imagine that it’s not you in the market, but your 12 year old child. I am absolutely sure that you will never put the YNAB app on his phone. But it would be convenient for him to immediately drive in transactions.

And I thought: my salvation is telegram bot! But here's a bummer. Of course, I did not find such a bot…

So I continued to cry, but use the YNAB app in the market)

But that's not all that annoyed me. I live in Moscow, Russia. And YNAB has no native integration with any Russian bank. How inconvenient to transfer data on bank transactions manually. YNAB has the ability to import data from a csv file, and banks have the ability to upload transactions to a csv file. But the format of these files is different!

And then I remembered that I am a programmer. I wrote a desktop application that parses bank files and exports them to csv. Then I did Drag & Drop in the YNAB app in the browser. It worked. But there were minuses. Again, a bunch of handmade. And my application only worked on the desktop.I couldn’t run it up on the phone. But it would be convenient - you download a file with transactions from your bank and send it to the bot. The bot parses and adds transactions to YNAB.

I got tired of this situation and I decided to abandon YNAB to write such a bot myself.

So, I present to you @ynabandr_bot

First you need to run the / setup command. The bot will ask you to enter YNAB access token.

Then you select Budget, and then Account for which transactions will be created

That's all. Now you can add transactions:

Now we turn to the import of bank transactions. I wrote an import for Sberbank, Alfa Bank, Citibank Russia and Tinkoff Bank. All this is implemented by plugins and adding a new bank is quite simple.

To import from these banks, a correspondence must be added between the bank account and the YNAB account.

Correspondence is specified in the yaml file. Example file:

  • BankAccount: 816 YnabAccount: Budget: RUB Account: Alfa

  • BankAccount: 5304 YnabAccount: Budget: RUB Account: Tinkoff

  • BankAccount: 18832 YnabAccount: Budget: RUB Account: Sber

Create this file and drop it to the bot. Now import the file from the bank and throw it to the bot.

Of course I do not expect that you will trust my bot. I would not)

Therefore, I posted all the sources on https://github.com/Podlesnyy/YnabBot You can safely build a bot from source. There are instructions for the docker, so you can deploy it to any cloud.

If you have any questions about the code, feel free to ask.

If you decide to use my bot, then keep in mind that it is running on my home computer and will not be available 24/7.

I can transfer it to a cloud, but for me alone this is an overhead. If anyone needs it, then feel free to donate paypal.me/podlesnyy

Clone this wiki locally