cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Liam-Billington
Level: Powered On

Approval based on User in SharePoint List

Hi All,

 

Fairly new to Flow, only been using it for a week or so now with our new Sharepoint 365 infrastructure. Trying to create a Flow that sends an approval request to a manager based off who you select as the Approver in the sharepoint list:

Basically its a timesheet, you fill in your hours and at the bottom it asks for you to select your approver, which searches the directory when you type the name in.

The built in approval flow however looks up your manager as its assigned in AD - which is not useful for us, as some of us do not have managers assigned in AD, and in the case of most contractors, get assigned to local HR (but they would not be the ones signing off the timesheet) so being able to select your manager is a must.

 

Flow - Manager Approval.png

 

In the manager approval flow - I have tried swapping out the "Get Manager" section (as this is the AD lookup which is not ideal for us) and need it to look at the list which has been created, look for the specific value of "Approver" and use the name thats listed to start the approval flow.

 

screencapture-us-flow-microsoft-manage-environments-Default-b5da5f35-6442-4f5a-9622-92ec6a535127-flows-e6df063d-33e1-43fc-ab10-1d4749e0e494-2018-07-02-10_16_58.png

 

I tried using a "Select" function with Last(item()?['Approver'])?['Value'] - which, when the flow ran, did pull down the information of the approver I had selected in the list but returned the error: "BadRequest. The 'from' property value in the 'select' action inputs is of type 'Object'. The value must be an array." - But can see the script ran and got the approvers name, email, job title, etc.

 

Any help on this would be great:

 

Also just as some extra information - I cant use any external apps which need adding from the SharePoint so this sharepoint list is all custom made so anything which does this from another app (which im sure there are plenty) cant be used at this time.

 

Many Thanks

 

Liam

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Approval based on User in SharePoint List

@Liam-Billington- If I understand your question correctly, you have a SharePoint list.  A Flow runs on a selected item.  An approval should be assigned to an individual specified in a person or group column in the SharePoint list.

 

If that is the case, it is very easy to do.  The approval action wants the email of the individual to whom the approval will be assigned.  The email of the individual specified in the person or group column is available to you in Dynamic properties.  I am assuming that the person or group column will not allow multiple selections.

 

Please see my example below.

 

SPManager.jpg

 

In my example, I am using the When a new item is created trigger, but that does not impact how this works.

 

If this solves your issue, please mark your post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Approval based on User in SharePoint List

@Liam-Billington- If I understand your question correctly, you have a SharePoint list.  A Flow runs on a selected item.  An approval should be assigned to an individual specified in a person or group column in the SharePoint list.

 

If that is the case, it is very easy to do.  The approval action wants the email of the individual to whom the approval will be assigned.  The email of the individual specified in the person or group column is available to you in Dynamic properties.  I am assuming that the person or group column will not allow multiple selections.

 

Please see my example below.

 

SPManager.jpg

 

In my example, I am using the When a new item is created trigger, but that does not impact how this works.

 

If this solves your issue, please mark your post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Liam-Billington
Level: Powered On

Re: Approval based on User in SharePoint List

@ScottShearer

Thanks for this! Didn't occur to me the dynamic properties were already being populated from the people / persons and groups column from the list!.

 

I made the change and re-ran the flow, and now it passes the request through to who ever is listed as the approver in the list.

 

Many Thanks!

 

Liam

Anonymous
Not applicable

Re: Approval based on User in SharePoint List - Further Question

Dear Scott,

 

 

Many thanks for your answer on this as it was helpful. However, when I input any name apart from my own in the Manager's Name field, which is linked to the flow, they do not receive an approval request email. Do you have any idea why this might be? Maybe we have created a test organisation hierarchy that is interrupting this? I can't think of another reason why this could be going wrong. Any help would be much appreciated.

 

 

Cheers,

 

Alex

Super User
Super User

Re: Approval based on User in SharePoint List - Further Question

@Anonymous:

 

Please post a screen shot of your Flow and I'll try to assist.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott
Anonymous
Not applicable

Re: Approval based on User in SharePoint List - Further Question

Hi Scott,

 

help.jpgHere are the images you asked for. The problem arises when I submit a request that isn't assigned to myself. If I insert the manager's name as somebody else, it will not send them a notification email asking them to approve. Do you have any idea why this might be?

 

Cheers,

 

Alex

help2.jpg

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,613)