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 / Multiple conditions fo...
Power Automate
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
Categories:
  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    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


    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

    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
    Microsoft Employee on at

    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
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 426

#2
11manish Profile Picture

11manish 345 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 308

Last 30 days Overall leaderboard