cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Brian-C
Frequent Visitor

Attachments in Approvals - Variable Quantity

Hello,

 

I read up recently that it was now possible to include attachments directly within the Approval email using the V2 Approval action. I want to test this out, but for my particular scenario, the email that triggers the Flow may have one or more attachments - the number of attachments isn't fixed.

 

I tried this out using the 'array' option but got a non-serialized error. Is there something specific I should be doing here, or is it not possible to include attachments if the quantity varies?

 

In flow:

attachments2.PNG 

On run:

attachments3.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

@Brian-C 

See my example below.  After the Get Attachment action, your steps for building the array should be the same.  Please note that emails frequently include images for logos, etc. and they are considered attachments.

EmailAttach.jpg

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

Scott

View solution in original post

6 REPLIES 6
ScottShearer
Super User
Super User

@Brian-C 

The following worked for me (just ran a test).  Note that I use Content rather than ContentBytes.

Attach1.jpg

Attach2.jpg

 

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

Scott
v-alzhan-msft
Community Support
Community Support

Hi @Brian-C ,

 

Could you share the value that you entered in the Attachment field?

The Array for the Attachments in the approval should as below:

[
  {
    "name": @{variables('name1')},
    "content": "@{outputs('content1')}"
  },
  {
    "name": @{variables('name1')},
    "content": "@{outputs('content2')}"
  }
]

 

Best Regards,

Alice

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, 

 

I see your steps are receiving attachments from SharePoint. In my case, the attachments are coming from an email. Can i still do the same with the 'Get Attachment' action for email?

 

Thanks

@Brian-C 

See my example below.  After the Get Attachment action, your steps for building the array should be the same.  Please note that emails frequently include images for logos, etc. and they are considered attachments.

EmailAttach.jpg

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

Scott

@ScottShearer 

 

Thanks for the help! Seems I got it working. The emails I use to trigger this particular flow arrive as plain text so I shouldn't have to worry about about extraneous content arriving as attachments. I wanted to get attachments directly in the approval email since I plan on using this within Teams.

 

teamsap.png

 
 

 

Appreciate the quick responses.

@Brian-C 

Glad you got it working!

Please mark your post as solved - that will help others with a similar issue find a solution.

 

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

Scott

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,385)