This is the error i am receiving when trying to post a message to a Teams Channel via Flow. I've added Flow to the channel
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@{triggerBody()?['attachments']}@{triggerBody()?['subject']}' is of type 'String'. The result must be a valid array.
Thank you so much I've upvoted you!
Hi @dgarcia,
It seems like you put an error expression into the body field within Apply to each action.
The input if the Apply to each action should be an array, if you want to loop attachments of Email, you should only append Attachments into it.
If you are not familiar with Apply to each action, please refer to this document:
https://docs.microsoft.com/en-us/power-automate/apply-to-each
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.
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional