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.
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:
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.