- Print
- DarkLight
- PDF
Calling Azure Functions from Azure Logic Apps
- Print
- DarkLight
- PDF
With Logic Apps you can call a Function using the built-in connector Azure Functions. For instance, you can request a Function, to perform for example - conversion of Euro to Dollars or vice versa.
Let’s assume you are building a Logic App that receives an order request via a public facing website selling items in local currency. Once the Logic App consumes the order request, it will need to create a consistent message for a back-end system including the currency set to USD.
In Logic Apps, there are currently no expressions available to perform this type of conversion; hence you need to call to a function, which does the conversion for you.
The Logic App and Function work together to enrich a message with another currency as shown below:
The Function gets the latest exchange rates and converts the EURO amount to USD (internal currency). The Logic App picks up the message from the queue and passes on successful enrichment the message to another queue. On failure, the message ends up in the dead letter queue.