cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate III
Advocate III

Start an Approval - Assigned to Field - Dynamic Content

Hi,

 

Did anyone ever build a flow with an approval and adding a dynamic content in the assigned to field?

i have an approval  flow built with a SharePoint list, and I want to send an approval email based on the 'Manager' column i have in the SP List (people picker)
when i choose the dynamics content 'Email', it's returning the following error:

 
BadRequest. The request failed. Error code: 'InvalidApprovalSubscribeRequestAssignedToMissing'. Error Message: 'Required field 'assignedTo' is missing, empty, or contained no valid users.'.
 
Any ideas please?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Advocate III
Advocate III

Re: Start an Approval - Assigned to Field - Dynamic Content

I actually solved the issue by populating the manager field in exchange and using the get manager function

View solution in original post

4 REPLIES 4
Highlighted
Community Support
Community Support

Re: Start an Approval - Assigned to Field - Dynamic Content

Hi @Pripri804,

 

Could you please share a screenshot of your flow's configuration?

Further, could you please show more details about your SharePoint list?

 

The error message told that there is something wrong with the value that you filled within the Assigned to field of the "Start an approval" action, the value that you provided within the Assigned to field is invalid.

 

I have made a test on my side and don't have the issue that you mentioned. My flow's configuration as below:21.JPG

Note: The Manager column is a Person or Group type column in my SharePoint list.

 

The flow works successfully as below:22.JPG

 

Please check if you have filled a value within the Manager column of your SharePoint list. You could consider output the result the Manager Email dynamic content returned using the Compose action as below:23.JPGThen check if the Manager Email dynamic content contains a value. 

 

In addition, you could also take a try to add a Condition to check if the Manager Email dynamic content is empty, if yes, do nothing, if no, send an approval email:24.JPG

 Within Condition box, click "Edit in advanced mode", type the following formula:

@empty(triggerBody()?['Manager']?['Email'])

 

Best regards,

Kris

 

 

 

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Advocate III
Advocate III

Re: Start an Approval - Assigned to Field - Dynamic Content

Hi @v-xida-msft,

Thanks for your reply. I tried your suggestion and added a condition to check if the Approving Manager email field is empty and indeed it resulted as true - it is empty - even though i can see it populated in SP.

So here's my entire flow:

1. User inputs details in Microsoft Forms

Starting Point - Microsoft FormsStarting Point - Microsoft Forms

 

 

2. Then, the SP List gets populated with the info in the form

 

Leave Request SharePoint List - Gets populated via Flow once a Form has been submittedLeave Request SharePoint List - Gets populated via Flow once a Form has been submitted

 

--- The Approving Manager column is a people picker column which gets populated via a SP Designer Workflow which checks in another list who the user is and his equivalent manager ---

Approving Manager SharePoint ListApproving Manager SharePoint List

 

SharePoint Designer Workflow to check in Approving Manager list who is the manager for that user - and populate the Approving Manager column in the Leave Request ListSharePoint Designer Workflow to check in Approving Manager list who is the manager for that user - and populate the Approving Manager column in the Leave Request List

 

 

 

3. And here is the flow in Microsoft Flow

 

Step 3.png

 

I added a delay function so that I make sure that the approving manager column has been populated via the SP Designer workflow. And by monitoring, it does get populated before the Flow continues.... so i don't think that that is the issue


Thanks for your help.

Highlighted
Advocate III
Advocate III

Re: Start an Approval - Assigned to Field - Dynamic Content

I actually solved the issue by populating the manager field in exchange and using the get manager function

View solution in original post

Highlighted
Frequent Visitor

Re: Start an Approval - Assigned to Field - Dynamic Content

Hi @v-xida-msft

Is it possible to add the condition to check if the Manager Email dynamic content is empty, if yes, skip approval, if no, send an approval email?

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Users online (9,008)