cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Eyk
Frequent Visitor

Attach multiple attachments to approval email

I'm trying to create an approval flow which requires me to attach multiple attachments to the approval email sent out. I'm using "Start and Wait for an Approval" step, with an "attachmentArray" in the attachment section. When I run the flow, the approval step fails:

 

Screenshot 2019-12-06 at 11.43.28 AM.pngScreenshot 2019-12-06 at 11.44.45 AM.pngScreenshot 2019-12-06 at 11.46.08 AM.png

For the "Append to Array" step, I'm using the following expression to get the "ContentBytes":

 

body('Get_attachment_content').$content
 
Any advice?

 

1 ACCEPTED SOLUTION

Accepted Solutions
yashag2255
Dual Super User II
Dual Super User II

Hi @Eyk 

 

The Attachments in Approvals are a bit different. While creating the array you need to use content instead of content bytes. You can checked my solved post here for more: https://powerusers.microsoft.com/t5/General-Power-Automate/Power-Automate-approval-with-Attachments/... 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

5 REPLIES 5
Jay-Encodian
Super User II
Super User II

Hi @Eyk 

In the append variable action where you are writing in the attachment content can you change the expression to: Base64(<attachementContentsVariable/>).

This should ensure the Base64 representation of the attachment content (the $content) is correctly appended to the variable.

If you're still having an issue, try adding the AttachmentContents variables in it's entirety to the array variable...

HTH

Jay

-------------------------------------------------------------------------

If I have answered your question, please mark your post as Solved.

If you like my response, please give it a Thumbs Up

Eyk
Frequent Visitor

Hi @Jay-Encodian,

 

I tried your suggestion and changed my expression to:

 

base64(body('Get_attachment_content').$content)
 
but unfortunately, the error persists. I tried attaching the AttachmentContent variable without any success as well. Thanks for the suggestion though!
yashag2255
Dual Super User II
Dual Super User II

Hi @Eyk 

 

The Attachments in Approvals are a bit different. While creating the array you need to use content instead of content bytes. You can checked my solved post here for more: https://powerusers.microsoft.com/t5/General-Power-Automate/Power-Automate-approval-with-Attachments/... 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Eyk
Frequent Visitor

Hi @yashag2255,

 

Thanks for this solution! Tried it and now my attachments are successfully sent with the approval request.

Hi @Eyk 

As per first post 😉

"If you're still having an issue, try adding the Attachment Contents variable in it's entirety to the array variable"

No worries I see you've got it working as @yashag2255 added the same instruction 🙂

My best

Jay

 

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (51,747)