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

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
Dual Super User

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
Dual Super User

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.

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

Helpful resources

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

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (2,627)