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

Error "The execution of template action 'Apply_to_each' failed:

Im trying to create a flow that will take attachments from emails placed in a folder and place them in a onedrive folder based on the first 5 characters of the subject of the email that the attachment arrived in. Based on the split, the flow will select the folder in onedrive to place the attachment in.

To test the collection process, I was making the flow send me a message in teams when it detected the attachment and return the outputs of the flow. 

 

Instead this is what I got.

Error message received: The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@{triggerOutputs()?['body/attachments']}@{triggerOutputs()?['body/subject']}' is of type 'String'. The result must be a valid array.

damianjyates_DG_0-1605210937784.png

damianjyates_DG_1-1605210965434.png

 

Im close, but not quite there.  

Any ideas where I went wrong?  Be gentle, I'm new to this 🙂 

1 ACCEPTED SOLUTION

Accepted Solutions
Solution Sage
Solution Sage

Hi @damianjyates_DG ,

 

From the screenshot you have mentioned in Apply to each you should be only having Attachments and remove subject from there.

 

Thanks

View solution in original post

1 REPLY 1
Solution Sage
Solution Sage

Hi @damianjyates_DG ,

 

From the screenshot you have mentioned in Apply to each you should be only having Attachments and remove subject from there.

 

Thanks

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (32,188)