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 / Workflow Deviating Fro...
Power Automate
Unanswered

Workflow Deviating From Excel List in For Each Loop

(0) ShareShare
ReportReport
Posted on by 10

Hi. I have a Power Automate Desktop workflow that is supposed to close tickets that meet a certain criteria on a website. I run an SQL query that outputs the ticket numbers to be actioned to an excel file. I then have the workflow open a Chrome instance. Then I start a For Each loop that takes each ticket number and enters it into the website, goes through the clicks to close the ticket and then loops through the process again. This has worked with small amounts of tickets. When I try a full-scale test, something strange always happens. About 10 - 30 tickets into the flow, it deviates from the excel list and gets ticket numbers that are not on the excel list and walks through the process to close those. I have no instruction in the flow that tells it to search for additional tickets (the tickets it is going out and finding off the list are not supposed to be closed). I have tried different variations of loops and no matter what I do, it always starts to deviate from the list. I am at a loss. The website I am using does lag a bit, I don't know if that has anything to do with the issue, but no matter what I do, the workflows always deviate. 

DanielS79_0-1712244106188.png

DanielS79_2-1712244183336.png

 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @DanielS79 

    Just a quick observation (I may be mistaken in my understanding), you mentioned that you are using a Chrome instance to open a ticketing app, then you are using window-based actions but you supposed to be work with browser automation package actions?

     

    Please refer to the screenshot below. If you are interacting with a Windows application, you should use UI automation package actions (highlighted on the left side).

     

    However, if you are interacting with a web app, you should use browser automation package actions. For example, in the screenshot above, you are using "populate text on window" instead of "populate text on webpage."

     

    So please consider modifying those actions and see if these changes resolve your issue.

     

    Deenuji_0-1712246798262.png

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     
  • DanielS79 Profile Picture
    10 on at

    Thanks @Deenuji ,

    That was another issue I was having. When I open the Chrome instance, the flow clicks on a link that opens another tab in the chrome instance. All of my work then takes place in that second tab. When I tried to use the webpage tools, the workflow automatically kicks back to the first tab and errors out because it can't find the UI element. The only way I could find to prevent this from happening was to use those other tools. 

     

    I also have a theory as to why the issue above is happening. The webpage the flow is accessing (in the second tab) has a default view of a search bar and a list of the most recently created tickets. The workflow enters the ticket number into the search bar and searches. The results look exactly like the default view, but instead of a list of tickets, there is only one. 

    What I theorize might be happening is that because the site lags so much, the step in the workflow that enters the ticket number into the search bar might get left behind, and instead the flow clicks on the ticket in the default view that is in the same physical place as the search result ticket. That would explain why the flow is finding recently created tickets (the most recently created tickets are listed at the top in the default view). Could this possibly be why the flow is closing tickets that are not on the excel list? Today, it closed 9 tickets from the list before it deviated and closed a brand new ticket. I put some waits into various steps of the flow, and I am hoping that might solve the issue. What do you think?

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @DanielS79 

     

    I see your point. While the theoretical aspects you've provided are insightful, it's challenging to draw a conclusion without delving deeper into your code. To make an informed assessment, further analysis and understanding of your specific issue would be necessary. I'll defer to other community members who may be able to provide insights based on the story of your issue.

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 482

#2
11manish Profile Picture

11manish 280

#3
David_MA Profile Picture

David_MA 268 Super User 2026 Season 1

Last 30 days Overall leaderboard