Udostępnij za pośrednictwem


Using an Azure Function in a Microsoft Flow

In the previous blog I wrote how easy it is to use an Azure Function as a Custom API for PowerApps, and got a question on how would that look like for Microsoft Flow. The great news is that if you have followed the first three steps in the previous blog, you are done! PowerApps and Microsoft Flow share the same connector infrastructure which means your connector will work for PowerApps and Microsoft Flow automatically.

To use that just:

  1. Go to https://flow.microsoft.com/
  2. Click My Flows
  3. Click Create from blank
  4. In this case I will create a very simple flow that runs every hour and that emails me the output of the Azure Function that we created for PowerApps. Notice how as you start typing in the flow designer it will auto complete and find your new Azure Function Custom API:
  5. flow-intellisense
  6. After selecting that, it will correctly understand the Swagger definition and the input and output parameters and correctly allow you to enter the values, and even cascade and reuse the output results from the function for any other step/action in the flow as below using it as part of the body of the email to be sent.
  7. flow

 

Summary

One of the great things you get with the new Microsoft Flow and PowerApps is the great story they have to integrate with each other, and the fact that both “speak Swagger” allows you to build a Custom API once and reuse in both. Note that authoring triggers is a bit more work where you need to annotate the Swagger appropriately as well as have a different signature for your APIs so I will leave that for a future post.

Comments

  • Anonymous
    May 14, 2016
    I am writing PowerApps since the first day. I / We are excited with Logic Flow and create very. Simple flow - PowerApps action and Fire email. It has never success. No one from PowerApps Group replied why. Then it comes Microsoft Flow and the same thing I / we did, and failed, too. After debugging using Microsoft Flow web, it gives us something like Officer 365 problem... Can you help so that we can actually embed into PowerApps? Appreciate.
  • Anonymous
    September 29, 2016
    One of the great things you get with the new Microsoft Flow and PowerApps
  • Anonymous
    October 01, 2016
    I am also using microsoft Flow and power apps on my website http://timepass.com.pk and i am really enjoying it. But problem is that it is running too much processes and CPU resources. Any help
  • Anonymous
    November 06, 2016
    Hi Carlos,is your code still running with the RTM Flow? I get an Internal 500 error (Azure function side)Serge LucaSharePoint MVP