cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

auto-populating "apply to each" fields when trying to use dynamic content causes flow failure

Using Microsoft Lists as a data source, I am trying to generate a PowerFlow that sends an email 30 days prior to the due date to the owner.  

For my list I have the following 'table' structure: 

Title (type = single line text)Description (type = multi-line text)Due Date (type=date)Owner (type = person or group)
Obj 1This is a description8/15/2021[validated AD user]

 

Everything works fine if I specify a static email address in the "send an email v2" step.  If I try and pull the email address of the owner using content from the previous Get-items step, it throws me into a loop.  Here is a step-by-step depiction: 

Step 1: Select "Dynamic Content" and search for Owner.  Remember that the Owner column is a "people or groups" type column and validates the user upon entry into the list.  I select owner.

step2.jpg

Step 2: In the next step, I've already selected "owner" from the drop-down.  The "Apply to each" pane shows up magically with the "select an output from previous steps" auto-populated as "value".

step3.jpg

Step 3: I open up the "send email" pane and this is what's auto-populated.  If I try to save it with the "To:" field as the "owner" dynamic value, I get an error message, "Flow save failed with code 'OpenApiOperationParameterValidationFailed' and message 'Input parameter 'emailMessage' validation failed in workflow operation 'Send_an_email_(V2)': The parameter with value '"@items('Apply_to_each')['Owner']"' in path 'emailMessage/To' with type/format 'Array' is not convertibleto type/format 'String/email'.'.  Which means that there is no automatic conversion of the validated user to the email address.  So I change "Owner" to "Owner email" (see next step), which allows me to save it.

step4.jpg

Step 4: Change the dynamic value to Owner Email, which allows me to save. 

step6.jpg

Step 5: Notice that now there are TWO "Apply to each" steps (this happens automatically when I replace "owner" with "owner email" for the dynamic value.  Notice there was only one in the previous step.

step7.jpg

 

Step 5: The test run fails with the following error messages: 

step8.jpg

 

Any thoughts?  What am I doing that's so bone-headed here?  Thanks in advance.  

 

Al

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @Anonymous :

Could you please tell me:

Does the Owner column allow multiple selections?

I assume the Owner column do not allow multiple selections.The flow should be:

vbofengmsft_0-1626404359477.png

Best Regards,

Bof

 

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @Anonymous :

Could you please tell me:

Does the Owner column allow multiple selections?

I assume the Owner column do not allow multiple selections.The flow should be:

vbofengmsft_0-1626404359477.png

Best Regards,

Bof

 

Anonymous
Not applicable

I actually did have the multiple selections enabled.  Thank you so much for the help!

 

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,397)