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

 

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

 

Helpful resources

Announcements
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 tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Users online (2,284)