web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Action 'Apply_to_each'...
Power Automate
Unanswered

Action 'Apply_to_each' failed

(0) ShareShare
ReportReport
Posted on by 1

Hi all, 

 

I would greatly appreciate some help with a simple flow that has been running into:

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

 

The flow is to automate saving the attachments of 4 emails from the same recipient to a SharePoint site.

Categories:
I have the same question (0)
  • Verified answer
    v-yujincui-msft Profile Picture
    on at

    Hi @rmyi ,

     

    Could you please share a screenshot of your flow setup ? That will make it much easier to assist.

     

    If you want to save multiple attachments from the mail into SharePoint Document Library, maybe you could try as follows:

    vyujincuimsft_0-1656918943061.png

    If the mail already exists in the inbox, maybe you could try as follows:

    vyujincuimsft_1-1656919233553.png

    vyujincuimsft_2-1656919275152.png

    In addition, here are some links for your reference.

    https://powerusers.microsoft.com/t5/Building-Flows/Downloaded-Attachments-from-Email-are-Broken/m-p/1579536#M176516

    https://powerusers.microsoft.com/t5/Building-Flows/How-to-save-multiple-different-types-of-attachments-from-the/m-p/1564227#M174814

     

     

    Best Regards,
    Charlie Choi

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard