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 / "Run Desktop Flow" and...
Power Automate
Answered

"Run Desktop Flow" and Output Browser Instance

(0) ShareShare
ReportReport
Posted on by 52

Hi All,

 

I have about 15 different flows where the first step involves signing into a webpage before proceeding on running various other tasks.  That login page was just redesigned and i've decided to take advantage of the Run Desktop Flow action instead of updating the individual flows.  

 

My parent flow has the updated actions and elements for the new website, and I've created an output variable which i use the "Set Variable" to set to the browser instance variable generated when the chrome browser is open.  In the child flow, I run the desktop flow, and set it to create a variable.  However, when those subsequent actions need to click on the browser elements, I get the "Argument 'BrowserInstance' must be 'Web browser instance' error.  

 

Can someone point me to what i'm doing wrong?

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

    My guess is your output is a text variable type, not a web browser variable type, so it's not identifying that.

     

    I have the same instance.  Honestly, I think you would be better off having your entire login as a single subflow.  Then you you can just put this subflow in each flow, rather than have to call a completely different flow and deal with inputs/outputs.

  • Ernie-Velazquez Profile Picture
    52 on at

    Thanks Michael.  I have it as a subflow (the logging in portion) in 15 other flows that accomplish different tasks, and that are triggered on different schedules.  Wouldn't I have to manually update those "logging in" subflows on each of the 15 flows?

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Right, but it is 1 time, and you can copy and paste an entire subflow.  I'm actually doing it right now, and I have about 50 flows that all use this, but my LoginAPX subflow is the subflow I always use to Login to APX.  

    But I simply fixed it once, and just copy and paste my entire subflow overwriting the existing subflow that I had:

    MichaelAnnis_0-1644603804028.png

     

  • Verified answer
    yoko2020 Profile Picture
    495 on at

    @Ernie-Velazquez 

     

    You already in correct direction.

    Currently "Run Desktop Flow" can not produce Output Variable "BrowserInstance", this is the limitation.

     

    Solution is:

     

    After you call your desktop flow login routine, combine it with action attach to browser using url.

    You still manage the browser instance from the flow who call it but all code for login routine is in its own flow, so in the future you don't need to wasting your time editing your flow one by one if there is a css change in the website.

    You just need to edit/update your login flow routine 1 time.

     

     

    ps: - Make note of reusable action when designing a process. (a.k.a library)

  • Ernie-Velazquez Profile Picture
    52 on at

    What a bummer, Run Desktop Flow seems like it would be perfect to prevent this.  Because next time the login screen changes you'd have to copy and paste the updated flow into those 50 flows again right?

     

    Okay, I just got it to work by opening a new instance of chrome and then having it attach to the tab by title.  Should be a decent work around for now. 

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    He is right, an attach to web browser action should work in this scenario.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    yeah, unfortunately, I'm on 2.8.  Run Desktop Flow doesn't exist.  😞

  • Ernie-Velazquez Profile Picture
    52 on at

    Ha!  I'd literally just said this was going to be my workaround for now.  Thanks Yoko, at least I wasn't totally far off.  Was hoping i didn't have to create that new attach to chrome instance...but better than nothing 🙂

  • yoko2020 Profile Picture
    495 on at

    @Ernie-Velazquez 

     

    Tune your attach to browser action with retry 20 Times and wait 1

     

    WebAutomation.LaunchChrome.AttachToChromeByUrl TabUrl: $'''google.com''' BrowserInstance=> Browser
    ON ERROR REPEAT 20 TIMES WAIT 1
    END
  • BoredFish Profile Picture
    26 on at

    Several updates later and still unable to pass browser instance natively, don't think it's going to be added soon either. This work-around is the best alternative I've found.

    One small addition, I pass the URL as an output variable from the dedicated login flow to make it more dynamic so the calling flow will always be able to find the browser instance just created even if the URL changes.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard