web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Desktop...
Power Automate
Unanswered

Power Automate Desktop if Conditions

(0) ShareShare
ReportReport
Posted on by 146

Hi everyone!

 

I need some help regarding a power automate desktop condition. So in short, i want to copy the outlet code in excel and paste it to telegram to see if there and outlet code. If there is, i select the top search and copy message from excel and send to that outlet but if the search did not show any outlets i want it to mark as red highlight in excel or write down as cannot find in excel. But i am struggle with the if condition as i am testing the condition when the outlet code is not found somehow it copy the message and paste it into the search bar instead of using the else if condition. May i know how can i fix it? I have attached the flow and the example result below: 

Seth18_0-1716457146567.png

Seth18_1-1716457184499.png

Seth18_2-1716457207777.png

 

Looking forward to hearing from the expert as this is an urgent task for the company!! Thank you!

I have the same question (0)
  • eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at

    If I understand your flow correctly you have forgotten to add an action that actually checks if the search returned anything. It just pastes the %OutletCode% variable but doesn't actually check if that returned anything in the app. 
    And then your if condition is checking if %OutletCode% is blank which is never is since that is the data from your excel.

    eetuRobo_1-1716458536657.png


    So add Extract data from window-action after step 15. Take the UI element from the telegram search results. Then use the variable in your if conditions.

    eetuRobo_0-1716458375312.png

    Make the action to store it in variable.



  • Seth18 Profile Picture
    146 on at

    Hi! Thank you for your quick response! it does make sense on the answer you provided and i did do the same from what you said but it shown as the below error: 

    Seth18_0-1716458833286.png

    I wonder why is it tho? 

  • Deenuji_Loganathan_ Profile Picture
    6,250 Super User 2025 Season 2 on at

    @Seth18 

     

    I think please bring your target application in the foreground by setting focus window so that it will extract your data at right way without throwing any error. 

     

    As already @eetuRobo assisting you I will leave it with him 🙂

  • eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at

    Check the element and the window of that element you picked from telegram search results.

    eetuRobo_0-1716459084196.png

    So that they are not too specific. Use Test button in your UI element to see if it works and if not then you can see which sub element is broken:

    eetuRobo_0-1716459436660.png

     


    For example you picture seems like the Window is named 'Telegram (39040)' and that number might indicate number of posts or something which is dynamic and might change. So make sure the elements are not set to searching something that might change (like dynamic id or amount of posts in the channel or something)

    eetuRobo_1-1716459195693.png

     

  • Seth18 Profile Picture
    146 on at

    Hi! Can u clarify this please? As i am new to the power automate desktop!

  • Seth18 Profile Picture
    146 on at

    Hi! May i know how can i so that? As i am a bit new to the automate desktop in which it hard to somehow not make it dynamic 

  • Deenuji_Loganathan_ Profile Picture
    6,250 Super User 2025 Season 2 on at

    @Seth18 

     

    If you feel complex to automate in windows based telegram. why not just you login into your telegram web based app and do the same stuffs. I believe its quite easy compare to windows one.

     

    @eetuRobo - Your thoughts pls?

  • eetuRobo Profile Picture
    4,204 Super User 2025 Season 2 on at

    Go to the UI elements in the side bar:

    eetuRobo_1-1716459551995.png

     

    Then search for the Group 'TWidget' element and double click that.

    eetuRobo_2-1716459647432.png


    Then take a screenshot of the window like so(this is just an example ui element from onenote so yours shouldnt look like that):

    eetuRobo_3-1716459668712.png

    Then I can help you better. Also try the Test button and see if that gives error or green check marks. 
    Do the same with the parent window ( it should be named Window 'Telegram 39040')

    I havent used Telegram but @Deenuji might be correct that it could be easier to automate the web portal side of telegram.

  • Seth18 Profile Picture
    146 on at

    Here is the screenshot of the Widget that u asked for:
    Seth18_0-1716470039252.png

     

  • Seth18 Profile Picture
    146 on at

    As stakeholders preferred the telegram window-based app over the web telegram i had no choice but to do it on the window-based app.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard