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 / Flow works standalone,...
Power Automate
Unanswered

Flow works standalone, always fails when called from another flow

(0) ShareShare
ReportReport
Posted on by 225

I have a flow that logs into our web site. When I run it by itself, it brings up the browser and logs in, with no issues. I can literally run this flow hundreds of times and it always works. However, if I call it from another flow (that needs to login), it always fails. As near as I can tell, it always fails at the same spot. It cannot find the initial Login button. Yet, standalone, with the same parameters passed by the calling flow, it always works. I'm stumped.

 

I figured I could create a subflow in my main flow, and copy/paste the entire login flow into the subflow, then just call the login subflow instead of the login external flow. At worst, it would give me a better chance to find out what the issue maybe since I can debug into the subflow but not the flow. However, my main goal is to have a (global) login flow that gets called from any flow that uses that web site.

 

Any words of advice? Anyone ever had a flow that worked by itself but not if called from another flow? Thanks!

I have the same question (0)
  • AS-06081019-0 Profile Picture
    1,738 Super User 2024 Season 1 on at

    @LogicSmith I believe the issue seems to be with the browser instance.

     

    When calling form other script you can use attach to running instance, check if it helps.

  • LogicSmith Profile Picture
    225 on at

    The login flow starts the browser, not the main test flow. And since I cannot return the browser variable from a flow, the calling flow has to attach to the browser after login regardless.

  • AS-06081019-0 Profile Picture
    1,738 Super User 2024 Season 1 on at

    Is it a recorded script?

  • LogicSmith Profile Picture
    225 on at

    No, not recorded. I have not had great luck with recordings, but I do have 40+ years as a software engineer, so I always write my own.

  • AS-06081019-0 Profile Picture
    1,738 Super User 2024 Season 1 on at

    Could you please share a screenshot of the script along with error message?

  • LogicSmith Profile Picture
    225 on at

    Not easily. The login flow is currently 29 steps. The message was (from memory) Failed to Run Flow. The detail said it timed out. Presumably on that first check to look for the login button. First thing Monday I'm trying the subflow route and will see how that goes.

  • wnzn Profile Picture
    168 on at

    I have similar problems with browser automation. When running a PAD flow standalone (attended), everything works. When running the flow from a cloud flow, I get Element with selector X not found. The screenshot provided in the Error context in the Power Automate portal shows an empty desktop, no browser to be seen (however the previous actions: launch browser, some login interaction etc. report status Succeeded. I've logged a call with Microsoft Support about this issue and will post back if something comes out of it.

  • LogicSmith Profile Picture
    225 on at

    I was distracted by some other work for a few days, but I think I have this working. It turns out our first (login) screen is wonky - worked with FF but not Chrome or Edge. The login button itself was the issue - I switched to looking for the image of the button, captured in all 3 browsers, and click that. That seems to work. I still have a bit of work to do but so far looks like that should work.

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 245

#2
David_MA Profile Picture

David_MA 216 Super User 2026 Season 1

#3
Valantis Profile Picture

Valantis 212

Last 30 days Overall leaderboard