Skip to main content

Notifications

Power Automate - Using Connectors
Answered

Action 'Apply_to_each' failed

(0) ShareShare
ReportReport
Posted on by

I am trying to get  the Partner email from each row for a mail merge.

 

The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_2')?['Partner
Email']' is of type 'String'. The result must be a valid array.

 

I made it a table. Not sure what else I can do?

Its pulling data from a simple spreadsheet with 4 rows.

The issue seems to be with the email address.

  • Verified answer
    v-litu-msft Profile Picture
    v-litu-msft on at
    Re: Action 'Apply_to_each' failed

    Hi @Anonymous,

     

    The Apply to each action iterates through an array and performs actions on each array item. 

    Schema reference for trigger and action types - Azure Logic Apps | Microsoft Docs

     

    The reason for the issue happened is that the input is an invalid array.

    You could use JSON() function convert a string to object or array, for example:

    Screenshot 2020-12-10 151549.jpg

     

    Best Regards,
    Community Support Team _ Lin Tu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard

Featured topics