cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ben_C
Resolver I
Resolver I

Email attachments 'Array' cannot be initialized or updated with value of type 'Object'.

I'm trying to create an email which has all attachments related to a list item, I'm using the following, which I have seen on multiple guides 

array.PNG

 

However I'm getting the following error: 

The variable 'AttachmentArray' of type 'Array' cannot be initialized or updated with value of type 'Object'. 
The variable 'AttachmentArray' only supports values of types 'Array'.

Any help would be most appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User III
Dual Super User III

Is the initialize variable set for an array, an object, or a string.  It needs to be an array and the action above needs to be Append to Array, not set variable.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

4 REPLIES 4
fchopo
Super User
Super User

Hello @Ben_C 

Could you add a " character before and after the display name and attachment_content values ?

{
 "Name": "....",
 "Content": "...."
}

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Thanks for the response, sadly this doesn't fix the issue. It's annoying as this flow was working before. 

Pstork1
Dual Super User III
Dual Super User III

Is the initialize variable set for an array, an object, or a string.  It needs to be an array and the action above needs to be Append to Array, not set variable.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

Hi @Pstork1 thanks for the heads up, I had a set variable rather than append to array variable. 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,424)