In part 2 of this mini series about organising your flows into functions I will look at calling multiple functions. If you missed part 1 then please have a look at Function Libraries in Microsoft Flow, for the introduction of the function library pattern.
In this post I’m looking at calling multiple function branches in my flow.
I’ve made some changes in my PowerApp, so that when the submit button is pressed an additional function call is added to the data sent to my flow.
Note: In my example I’m using PowerApps to call the functions but of course you could use anything else to pass these to a flow. It doesn’t have to be a PowerApp.
In my example above, I’m first repeating the same function as in my previous post and then I’m sending an email.
The above is done with an action like this:
Now I’ll have a variable called FunctionsQueue containing all the functions to process.
Processing the function queue
Now i can process the queue with the following steps
I now simply keep processing the functions until all the functions have been processed. The big difference here is that the filter array and Set variable actions will remove the processed action from the queue before the next function is processed.
Finally I’ve added another function in my switch to send emails.
In the above send mail example I’ve only taken the email address form the function parameters but you could of course add more parameters to the email subject or body.
Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like.
I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide.
For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions.
SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/
Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/
You can contact me using contact@sharepains.com
Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like.
I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide.
For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions.
SharePains is not just any blog run by a Microsoft MVP. Have you ever used Try-Catch in Power Automate? The original post about Try-Catch in Power Automate can still be found on this site, https://sharepains.com/2018/02/07/try-catch-finally-in-power-automate-flow/
Or have you ever used the Pieter’s method to avoid variables and speed up your flows? https://sharepains.com/2020/03/11/pieters-method-for-advanced-in-flows/
You can contact me using contact@sharepains.com