syncforynab / fintech-to-ynab

Automatically push Monzo and Starling transactions into YNAB in real time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Difficulty with webhook auto import

bjmd opened this issue · comments

Hey Scott.

I am struggling to get the Monzo auto import working.

I can run Import::Monzo.new(monzo_access_token, monzo_account_id, ynab_account_id).import which works (from local and Heroku), the webhook is created Monzo side but I get nothing in YNAB when I complete transactions in Monzo. Cant seem to find logs anywhere either?

Any pointers? This code will be amazing if I can get it working! 😀

I hadn't, but I just tried that and still no luck.

I have also tried defining the optional variables with no luck either.

I am right in thinking that it should be automatic, right? They don't queue and need the import manually running each time?

They will send the webhooks to the URL you defined when you make a transaction

Which was the Heroku URL. What I mean is that do they then get stored somewhere, queued up, and then you need to manually import from Ruby to push them into YNAB or should it be automatic?

Ah, no they get pushed in instantly.

I figured they would, I just thought I would eliminate user error!

Any other ideas? Does it log incoming requests anywhere? I tried to look but cant see anything obvious any know nothing about Ruby!

If you are tailing the heroku logs, you would see the requests coming in.

How are you triggering the transactions?

Ah ok, so I think I have the issue. The requests are indeed coming in and processing, it connects to YNAB and gets the following back:

ArgumentError (invalid value for 'type', must be one of ["checking", "savings", "creditCard", "cash", "otherAsset", "investmentAccount"].):

I am transferring back and forth between Starling and Monzo

Hmm ok. Sounds like YNAB have account types that are not present in the API specs, this has happened before. I don't have time to debug right now, but i will follow up with some questions as soon as i can.

Sure no problem, thanks Scott.

I found the bug you raised on the ynab SDK which was fixed but your latest fork of it was just before the fix.

I forked your repo and switched to upstream which resolved the issue. Hope that saves you troubleshooting 😃

Ah, forgot i still had this on my fork. Will sort that!