web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Common sub-flows usabl...
Power Automate
Unanswered

Common sub-flows usable by multiple flows?

(0) ShareShare
ReportReport
Posted on by 225

Is it possible to have a set of common sub-flows that every flow would have access to? I'm thinking of a sub-flow that logs into a web site, which might be needed by many flows. In the free version of Power Automate, it appears that the sub-flows are limited to one flow. If true, this would be a major problem to using this tool extensively.

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    What about "Run Desktop Flow"?

     

    So, your subflow could be by itself in a Run Desktop Flow which can take input variables and produce output variables and you could direct your new flow to run the desktop flow containing 1 or multiple subflows.

     

    MichaelAnnis_0-1652460241164.png

     

  • LogicSmith Profile Picture
    225 on at

    That should take care of it, thanks! I just started using PA a few weeks ago, and obviously missed that particular action. At least I'm early enough in the process I can make major design mods if I need to. 

  • LogicSmith Profile Picture
    225 on at

    OK, this works great. Now, followup question. What happens when I accumulate hundreds of desktop subflows? It's similar to the UI Elements - what happens when I have hundreds of them? I am accumulating suggestions and certainly beefing up how it handles flow and UI element management is high on the list.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Yeah, this is difficult.  There are no groups; you just have the one text string.  So, I recommend normalizing your text strings to be systematic, for whatever works for you.  Example would be flow titles.  Maybe I have flows for logging into each of my bank accounts and can use a Who_What_Where system for creating my flow titles:

     

    Mike_Login_Chase
    Mike_Login_BofA
    etc.

     

    Good luck!

  • LogicSmith Profile Picture
    225 on at

    Yes, got past that point. Now only issue (that I've hit) is the inability to pass anything to a flow besides a string. Would love to have a flow that logs into browser and app, but cannot return the browser instance. Found a way to workaround by having every flow look for the browser, but that can get complicated if you want one test to run on more than one browser.

     

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Are you saying you can't pass a Browser Instance back from the child flow?

  • LogicSmith Profile Picture
    225 on at

    I have not yet found a way. The only output variable type is a string. I may be able to convert a browser object instance into a JSON string, but don't know that I can convert that string back into a browser instance. The workaround is to open the browser in the flow that does the login, then in any other subsequent flow, set the browser open to attach to the browser instead (it helps that all the URLs start the same). Takes it a few seconds to find and attach to the browser, but that's not a major problem right now.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Dang, that sucks.  I hadn't ever used it before, but just tried to troubleshoot this.  At least, you can set an outputvariable to the URL which can be retrieved by the flow and set as an output variable.  And then call the URL during "Attach to Chrome", so that you don't have to set those up individually:

     

    So, my login flow (the child flow) used a "Get details of web page" action just before it's conclusion and passes the %OutputURL% to the parent flow which then used %OutputURL% to attach to chrome and get the security question.

    MichaelAnnis_1-1652736551190.png

     

    MichaelAnnis_0-1652736529663.png

    Although this isn't ideal.  It gives you a blanket way to set all output URLs to the same variable and call those OutputURLs the same way.  So flow Parent Flow A doesn't need the specific Child Flow A URL, but rather the blanket %OutputURL% every single time.

  • LogicSmith Profile Picture
    225 on at

    I like your solution, but in my case the base URL is all I need to find the browser window, doesn't seem to matter if the actual full URL is different at the end. I'm still learning, so it's fun. Today's task is to modify my login flow to pass in url, username, password, and browser. So I get to learn how to do a case statement on the browser.  Then adapt the case statement into every flow so everything hooks together. Piece of cake. Large piece, but may be able to finish it today.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 233

#2
David_MA Profile Picture

David_MA 217 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 190

Last 30 days Overall leaderboard