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

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Add condition to flow, if it fails, send the enduser that it failed and why

(0) ShareShare
ReportReport
Posted on by 30

So i have a flow for the enduser to apply a workID which i use the "get userprofile" function for via a forms setup.

 

However, its very dependent on the user to type the correct workID, otherwise the flow fails, i want to add a condition that if the flow succeed the normal flows go about and does what it does.

 

In the case the enduser provide a workID that does not exist, either by mistyping or whatever, i want it to send a mail to the responder mail that the flow failed and tell them to enter an existing workID correctly.

 

This is how it looks right now:

Snaze_0-1699261438956.png


What would the best way to go about it? I assume i would use the Condition (Villkor in swedish) function, but im unsure where to put it and how i should use it correctly.

I have the same question (0)
  • ManishSolanki Profile Picture
    15,089 Super User 2025 Season 2 on at
    Re: Add condition to flow, if it fails, send the enduser that it failed and why

    Hi @Snaze 

     

    Could you pls share the English name of the action which you have chosen for searching the user based on the workID? 

     

    Thanks

  • Snaze Profile Picture
    30 on at
    Re: Add condition to flow, if it fails, send the enduser that it failed and why

    Hi!

     

    Its as follows:

    When a new answer is sent

    -

    Get answer information

    -

    Get userprofile v2

    -

    Send email v2

     

    The condition should be if the "get userprofile v2" fails, i'd like an email to be sent to the responder email (from forms) that they need to enter a valid workID.

  • Verified answer
    ManishSolanki Profile Picture
    15,089 Super User 2025 Season 2 on at
    Re: Add condition to flow, if it fails, send the enduser that it failed and why

    Hi @Snaze 

     

    Here are the steps & actions you need to add:

     

    Just after the "Get user profile" action, add another parallel branch:

    ManishSolanki_0-1699273513682.png

     

    A new branch will be added on the right side of the screen, in that branch add "Send an email" action that notifies the user about entering incorrect workID when get user profile action fails. We need to set up the 'Configure to run after' setting for the send an email action. For that, click on ellipses menu(...) & select 'Configure run after' from sub menu:

    ManishSolanki_1-1699273938748.png

    Uncheck 'is successful' option & check 'has failed' check box. Press "Done" to save the changes:

    ManishSolanki_2-1699274010770.png

     

    Next, add "Terminate" action in the parallel branch after send an email action to stop the execution of flow:

    ManishSolanki_3-1699274089910.png

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

     

  • Snaze Profile Picture
    30 on at
    Re: Add condition to flow, if it fails, send the enduser that it failed and why

    That is hecking perfect. Amazing, thanks a lot! It works exactly as i wanted it!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 560 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 347 Moderator

#3
Expiscornovus Profile Picture

Expiscornovus 262 Most Valuable Professional

Last 30 days Overall leaderboard