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 / Process email messages...
Power Automate
Answered

Process email messages in outlook doesn't run according to order

(0) ShareShare
ReportReport
Posted on by 95

Hi All,

 

I set a certain actions from launching outlook to process email with certain action. After when it's done all the necessarily processes with each email, it should move that said email to another folder. 

First time i completed this flow it able to run & process email from first to last, but now it just randomly process my email list, and for each action it just keep looping the first email. 

 

May i know what's wrong with the flow?

 

step1.pngstep2.png

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Why exactly do you need the mouse clicks and the {Return} key? Do you do some more actions in Outlook itself, other than Retrieving the emails and moving them to a folder?

     

  • foxngn84 Profile Picture
    95 on at

    Hi, 

    The mouse click event was due to PAD unsure why unable to detect the ui element to click. As I need this action to navigate to a email subfolder. All the require email was in this subfolder.

     

    It needs to navigate to subfolder > open each email > scroll down to copy link > launch excel & paste the link > once done, move the email to another subfolder.

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You do not need any of that. You can retrieve emails from a specific sub-folder and the resulting list will contain the email messages with their subjects and bodies. You can retrieve the link from there. Will be much more efficient and stable than automating the UI of Outlook.

     

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution.
    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • foxngn84 Profile Picture
    95 on at

    Yes, i do note that, but how should i get it to open each of the email? As the link inside the email is a button, i have to navigate into the email to get that hyperlink(highlighted in red) by right click & copy it. 

     

    kindly advise how should i loop each email and do all the actions? To be honest the last step to move the email to another subfolder is optional, as long as the loop working. 

     

    step 3.png

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    You do not need to physically open the email. You will have a list of emails from the Retrieve emails action. Loop through those and read the Body of the email as %CurrentItem.Body%. This will contain some HTML code that will also have the link. You will then be able to use Parse text to get it.

  • foxngn84 Profile Picture
    95 on at

    Thanks. But each of the 4 color button contains dynamic links. How can i pinpoint it to only get the link for the view button?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you can share the body of the email in plain HTML, I can probably tell you how to parse it. Not really able to do that without seeing it first.

  • foxngn84 Profile Picture
    95 on at

    I tried to just copy that part of the View button, will this be sufficient? 

     

    <td style='background:#0077CC;padding:12.0pt 12.0pt 12.0pt 12.0pt;
    border-radius:20px'>
    <p align=center style='margin:0cm;text-align:center'><span
    style='color:black;mso-color-alt:windowtext'><a
    href="http://de**s.com/.....7213e1ff499"><b><span
    style='color:white;border:none windowtext 1.0pt;mso-border-alt:none windowtext 0cm;
    padding:0cm;background:#0077CC'><span data-ogsc=black>View PO</span></span></b></a></span></p>
    </td>

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Use the Parse text action on the body with Regular expressions enabled and use the following pattern as the text to search for:

    http[^"]+(?="[^//]*View PO)

    This should return the URL for the View PO button, while ignoring other URLs.

     

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution.

    If you like my response, please give it a Thumbs Up.

     

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • foxngn84 Profile Picture
    95 on at

    Thanks for the help so far, I did try to use this to parse text, but not sure why the result return empty.

     

    foxngn84_0-1688540135366.pngfoxngn84_1-1688540176065.png

     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard