Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

How to select New windows with different name , wildcard option?

(0) ShareShare
ReportReport
Posted on by

Background, using UI flow desktop to approve the request.

 

process, a open the request email--> b click the approve button, --> c new email generated, --> d type approve -->e send the email. 

 

now, have issue with select the newly generated email, due to everytime the email has a unique email name, could we use wildcard character to replace the email name:

 

one example below, Red part is the new email name, it will be changed everytime 

 

{
"type": "WinUIA",
"parameters": {
"elementStack": [
{
"automationId": "",
"boundingRectangle": "2,474,1890,544",
"className": "_WwG",
"controlType": "50030",
"frameworkId": "Win32",
"name": "Approve(2259815615b8e34b281eecf1151274481f8cbf79) for Requisition #227933 - Message",
"localizedControlType": "Document"
},
{
"automationId": "",
"boundingRectangle": "2,474,1916,544",
"className": "_WwB",
"controlType": "50033",
"frameworkId": "Win32",
"name": "Document28",
"localizedControlType": "Pane"
},
{
"automationId": "4159",
"boundingRectangle": "2,474,1916,544",
"className": "AfxWndA",
"controlType": "50033",
"frameworkId": "Win32",
"name": "",
"localizedControlType": "Pane"
},
{
"automationId": "258",
"boundingRectangle": "2,239,1916,779",
"className": "AfxWndW",
"controlType": "50033",
"frameworkId": "Win32",
"name": "Form Regions",
"localizedControlType": "Pane"
},
{
"automationId": "103",
"boundingRectangle": "2,239,1916,779",
"className": "AfxWndW",
"controlType": "50033",
"frameworkId": "Win32",
"name": "",
"localizedControlType": "Pane"
},
{
"automationId": "",
"boundingRectangle": "0,0,1920,1020",
"className": "rctrl_renwnd32",
"controlType": "50032",
"frameworkId": "Win32",
"name": "Approve(2259815615b8e34b281eecf1151274481f8cbf79) for Requisition #227933 - Message (HTML) ",
"localizedControlType": "Window"
}
],
"elementXPath": "/Window[@ClassName=\"rctrl_renwnd32\"][@Name=\"Approve(2259815615b8e34b281eecf1151274481f8cbf79) for Requisition #227933 - Message (HTML) \"]/Pane[@ClassName=\"AfxWndW\"]/Pane[@ClassName=\"AfxWndW\"][@Name=\"Form Regions\"]/Pane[@ClassName=\"AfxWndA\"]/Pane[@ClassName=\"_WwB\"][@Name=\"Document28\"]/Document[@ClassName=\"_WwG\"][@Name=\"Approve(2259815615b8e34b281eecf1151274481f8cbf79) for Requisition #227933 - Message\"]",
"desktopNodeXPath": "/Pane[@ClassName=\"#32769\"][@Name=\"Desktop 1\"]",
"applicationInfo": {
"applicationId": "LBbyFU35IkujzDH1T5ReWA=="
}
}
}

  • Verified answer
    sebastian3 Profile Picture
    51 on at
    Re: How to select New windows with different name , wildcard option?

    Hi TG11,

     

    I'm sorry, I don't know how to achive that.

    But maybe we could auotmate your flow completly. I guess the HTML of the mail looks something like this.

     

    <a href="mailto:test@example.com?subject=randomnumber">Approve Button</a>

     

    And then you could use WDL function according to here. 

    https://powerusers.microsoft.com/t5/General-Power-Automate/Using-a-flow-to-extract-email-body-details/td-p/149186 

     

    BR

  • TG11 Profile Picture
    on at
    Re: How to select New windows with different name , wildcard option?

    Thanks very much for your reply. 

     

    i dont want to replace the subject. i will explain it more detaily

     

    a open the request email--> b click the approve button in this request email, --> c "the click button" action will open a new email with a random email subject line, --> d i need to type approve in the new email body part -->e send out this new email with random email subject line.

     

    issue here is , the random name change everytime for every new request email, hence, UI flow not able to select at Step d and e. error message is "item can not be found" 

     

    so, may question, could i use wildcard option to let UI flow able to select the newly open the email

     

    thanks.

     

    BR
    Tedd

     

  • sebastian3 Profile Picture
    51 on at
    Re: How to select New windows with different name , wildcard option?

    Hi TG11,

     

    I don't know if I understand you correctly but if you want to just replace the subject or e-mail address you could use inputs like this:

    https://www.youtube.com/watch?v=tfJggC1LzUw

     

    What do you mean with click the approve button? Is it a button in the Mail?

    Maybe you could automate the whole process with a nomral "flow"?

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492