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

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 @alwhi :

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 @alwhi :

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

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

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,234)