72A99537-A0FB-4A61-A850-0BF2BAA6120A

Synchronizing MNB Exchange Rates with ERPNext via n8n

Although we previously developed an app for synchronizing MNB exchange rates with ERPNext, we generally try to keep ERPNext instances in a vanilla st…
Synchronizing MNB Exchange Rates with ERPNext via n8n

Although we previously developed an app for synchronizing MNB exchange rates with ERPNext, we generally try to keep ERPNext instances in a vanilla state—customizing them without installing external apps—to ensure that version updates remain simple. Therefore, we had to look for another solution.

We didn't have to think too hard, as the task could be accomplished using the n8n system, which we both use and recommend, thanks to the fact that the ERPNext node is available by default.

Synchronizing MNB Exchange Rates with ERPNext via n8n
Synchronizing MNB Exchange Rates with ERPNext via n8n

What is this all about? The MNB provides daily exchange rates via SOAP. So, it’s neither JSON nor XML but rather a "multi-layered XML package," which required some tricks to process the received package. Of course, it was possible to solve, although JSON and XML are much more common, modern, and practical.

What was needed for this? Since the exchange rates update once a day—based on our experience, between 11 AM and 12 PM—we initiate the request daily using a timer.

At this point, we fetch the exchange rates, convert them to XML, clean them of unnecessary codes, and filter them to only include the currencies we need.

We only send new exchange rates to ERPNext if they are actually new and apply to the given day.

Synchronizing MNB Exchange Rates with ERPNext via n8n


Explore more articles by Admin