cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Deee
New Member

Different approvers for different users

We are currently using Sharepoint online communication site and I would like to know how to set up an approval process so that:

  • If user A adds an item to the Sharepoint site, Manager A gets the approval email to Approve
  • & if user B adds an item to the Sharepoint site Manager B gets approval email to Approve.

Also is there a way that the director doesn't need to get approval if an item is added?

 

I am fairly new to Flow\Power Automate\Approve process so any help would be appriciated

 

Thanks in Advance

7 REPLIES 7
efialttes
Super User
Super User

Hi!

Please note SP lists stores the identity of the user that created the item, also the date and time the item was created.

Now, I assume your trigger is 'When an item is created' or 'When an item is created or modified', right?

If so the identity of the item author is accesible through the Dynamic Content menu -I believe it's called "Created by'-, or by means of the following WDL expression:

triggerBody()?['Author']

Its format is of type object, one of its attributes the email address, also accesible from dynamic content menu -I believe it's called "Created by Email'- or by means of a WDL expression:

triggerBody()?['Author']?['Email']

So, just after your trigger, you can add a condition action block to check if Author email is equal to A email address, same approach can be adopted for B. 

Flow_AuthorEmail_2.png

Now let's assume C shall approve items created by A, D shall approve items created by B. You just need to 'initialize variable' to store the target approver. If your condition states that item was created by A, just 'Set variable' to C. Just replicate the same piece of logic for B and D.

Finally, you should assign the Approval to your variable

Flow_AuthorEmail_3.png

You can replace both 'Condition' action blocks and use a 'Switch' action block or, get rid of Condition/Switch action blocks and assign an WDL expression directly to your 'Create Approval'/'Create and wait for an Approval' input... there are different approaches to achieve your requirements

Hope this makes sense



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thanks, although i am getting stuck on the first section as below:

 

Deee_2-1594336927208.png

 

What is this list name i give and how do i set this up or can i put any name?

Hi @Deee ,

 

When you say users are adding item to sharepoint, are they adding to a sharepoint list or folder? If it is a sharepoint list, you can input the sharepoint list name that your  users are adding items to as per @efialttes solution

Staff are adding new pages\docs to the site pages section, not a list. Hence why I'm not sure what the list section is mentioned above.

Basically we are setting up a KB (Knowledge Base) site in Sharepoint for our IT department and the different IT teams (with different managers) will be adding\modifying KB pages to the site pages. 

So each team needs to get approval from a different manager.

 

nitika
Community Support
Community Support

@Deee 

 

Here the doc on how to create site page approval:

https://support.microsoft.com/en-us/office/configure-page-approval-using-power-automate-14ce6976-a0a...

 

 

Here is the doc for how to edit it as per your requirement

https://docs.microsoft.com/en-us/business-applications-release-notes/october18/microsoft-flow/custom...

 

Here is the article which shares one of your requirements on auto-approval when the director is creating the page(check the video in the article)

https://www.chakkaradeep.com/2019/03/12/customizing-sharepoint-page-approvals-to-your-needs/

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Ooops! Truly surry for the confusion and thanx @nitika for pointing on the right direction!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Thanks for your sugggestions, Although I did try this way but this seems to only work for all users sending to a few managers.

 

I want it so that when staff from Team A create a page the approval goes to Manager A and when staff from Team B create a page the approval goes to Manager.

The way you have posted describes all staff going to both managers.

 

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,764)