Skip approver if also the creator of the request with Power Automate
Wouldn’t it be nice and kinda logical that, when someone creates a request via an app (i.e.: expenses, training), if the creator is also the first approver, we skip this particular approver? After all, if I create a request it’s because I “want” something? So I’m pretty sure I’ll approve it 😏
In this blog post, that’s why we’re going to do using SharePoint as a backend for the requests, and Power Automate for automating the approval process.
Setting up the scene
This is what we could have in SharePoint for a real :
- Training Requests –> This will store all the requests
Columns (Training Requests list):
- Products –> SharePoint, PowerApps, Azure AD, PowerShell, whatever else you’d like, etc… (Choice type)
- Approver1 –> The name of the first approver (Person/Group type)
- Approver1 Approval Status –> Pending, Approved, Rejected (Single line of Text type - and that’s for simplicity in conjunction with the PowerApps. Can also be a Choice if you’d prefer)
- Approver2 –> The name of the second approver (Person/Group type)
- Approver2 Approval Status –> Pending, Approved, Rejected (Single line of text - That’s for simplicity in conjunction with the PowerApps app. Can also be a Choice if you’d prefer)
Create an Automated Flow with the When an item is created trigger.
Then, we’ll have our condition to check if the CreatedBy (a.k.a the author) is equal or not to the Approver1 person.
Then, we may want to use the Start & Wait for an approval action, or we could just use the “Send Email” action with
Deep Linking, and redirect the approver(s) into the App directly. Choice is yours! 😉 We’ll keep it simple with a Start & Wait for an approval action.
Yes (meaning the
CreatedBy Email is NOT equal to the
Approver1 Email), then request approval from “Approver1”. A bit of formating, a salt of configuration, and poof! The process is started.
No (meaning the
CreatedBy Email IS equal to the
Approver1 Email), first update the item to mark
Approver1 Approval Status to “Approved” &
Approver2 to “Pending”, then request approval from “Approver2” directly.
Creating a request to test the Flow
Creating a request as myself, the flow should route to the
No part of the condition, and update the item first, then send for approval to
Approver2. and it does! 🥳
Thanks for reading! 🙂