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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,112)