Calling Azure Functions from Azure Logic Apps
    • Dark
      Light
    • PDF

    Calling Azure Functions from Azure Logic Apps

    • Dark
      Light
    • PDF

    Article Summary

    #ServerlessTips - Azure Logic Apps
    Author: Steef-Jan Wiggers Azure MVP

    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.

    Logic App Tip 24 - Call Azure Functions from Logic Apps Picture 1.png

    The Logic App and Function work together to enrich a message with another currency as shown below:
    Logic App Tip 24 - Call Azure Functions from Logic Apps Picture 2.png

    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.
    Logic App Tip 24 - Call Azure Functions from Logic Apps Picture 3.png

    The example in this tip is one of the many possibilities of Logic Apps integrating with Functions. Do note that working with Azure Functions you create a tightly coupled flow and solid governance is imperative.

    Logic Apps-2


    Was this article helpful?