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
Unanswered

Multiple conditions for approval flow

(0) ShareShare
ReportReport
Posted on by 222
I'm trying to build a flow that will move a sharepoint document after it's been approved and notify the approval admin if the incorrect comment syntax has been used. Currently the flow successfully starts an approval process and links to the relevant document. I have a basic condition that checks whether the "approval response" is equal to "approve" and if not, to send an email and delete the file. The tricky part is if the condition is correct, to then check the "approval comment" field and decide what to do with the file in question. I am using these conditions as a means to scan the comment section and then redirect the file into the relevant folder. @or(equals(body('Start_an_approval')?['comments'],'Approved'),contains(body('Start_an_approval')?['approved'], 'approved')) @or(equals(body('Start_an_approval')?['comments'],'asap'),contains(body('Start_an_approval')?['comments'], 'ASAP')) @or(equals(body('Start_an_approval')?['comments'],'Follow'),contains(body('Start_an_approval')?['comments'], 'follow')) I would like to add a notification so that if none of the above conditions are met the user is notified once. I guess it would would look something like: condition 1 If yes > move file to location 1 If no > proceed to final notification step condition 2 If yes > move file to locaiton 2 If no > proceed to final notification step etc
I have the same question (0)
  • v-bacao-msft Profile Picture
    on at
    Re: Multiple conditions for approval flow

    Hi @rsymmons,

     

    Could you provide a screenshot of your Flow configuration?

    I want to know if you have an issue that needs to be resolved right now, if there is more details about it.

    If you want to improve your existing Flow configuration for the best results, please provide more details about your Flow configuration.

    This is very helpful for us to provide effective workarounds.

     

    Best Regards,

    Barry

  • rsymmons Profile Picture
    222 on at
    Re: Multiple conditions for approval flow


    Hi Barry, 

     

    I managed to get it working, here's my flow in its current state:

     

    flow1.pngflow2.pngflow3.png

     

     

     

     

     

     

  • rsymmons Profile Picture
    222 on at
    Re: Multiple conditions for approval flow

    One thing - under "Condition 2 Does the response contain trigger words", if the processor does not provide a valid response the flow fails. Is there a way of including "Null" to the below condition? 

     

    "@or(contains(body('Start_an_approval')?['response'], 'Approve'),contains(body('Start_an_approval')?['response'], 'approve'),contains(body('Start_an_approval')?['response'], 'asap'),contains(body('Start_an_approval')?['response'], 'ASAP'),contains(body('Start_an_approval')?['response'], 'follow'),contains(body('Start_an_approval')?['response'], 'Follow'))" 

     

    Thanks,

    Rob

  • v-bacao-msft Profile Picture
    on at
    Re: Multiple conditions for approval flow

    Hi @rsymmons,

     

    I am afraid I did not understand what you mean by "processor does not provide a valid response".

    As long as approver completes the approval, whether it is to choose approve or reject, Response will contain the content, it should not be empty, and it is a reasonable response.

    If you want to avoid this, you could consider adding empty() function to your Expression.

    Like: 

    empty(body('Start_an_approval')?['response'])

     

    Best Regards,

    Barry

  • rsymmons Profile Picture
    222 on at
    Re: Multiple conditions for approval flow
    Sorry I wasn't very clear. Due to one of the conditions scanning for key terms within the comments box under the approval section (such as "Approved", "ASAP" or "Follow") if an approval is accepted without any of these terms the flow will fail and the document is lost. Can I add the empty function below to my existing function without bypassing the conditions set?

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 659 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 386 Moderator

#3
chiaraalina Profile Picture

chiaraalina 290

Last 30 days Overall leaderboard