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

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,265)