Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Can't convert SharePoint Attachments to Base64ToBinary


I've been stuck on this flow for a little while now...  The error states: The execution of template action 'Attachment_to_Ticket' failed: the result of the evaluation of 'foreach' expression '@outputs('Get_attachment_content')?['body']' is of type 'Object'. The result must be a valid array.

This flow is supposed to take a SharePoint item attachment and upload it via HTTP connector.  The ideal result would be similar to what is shown in the Attaching a file in Zendesk section here:

I would appreciate any help! Thank you!




Super User
Super User

Hello @ccammack ,

the error message tells you that the input of 'Attachment to ticket' loop is an object, not an array. You're using the attachment content, that's not something you can loop through. Move the actions inside 'Attachments to ticket' directly in the 'Apply to each 2' and then remove 'Attachment to ticket'.

[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Users online (2,334)