cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jevon
Helper I
Helper I

Power Automate approval with Attachments

I am trying to add an attachment to the Power Automate Approval using append array. However, it fails on the content bytes. 

 

Has anyone successfully attached an item from sharepoint to the power automate approval connector?

47 REPLIES 47
Anonymous
Not applicable

Hey @WarrenBelz - Thank you for the update, but I was able to figure it out awhile ago.

wonder why both are not using the same key, any suggestion if were to use both Email and Approval with attachments?

Thank you this solution looks great. However, i cannot get it to work - even though there is no error message, the attachments in MS Teams approvals do simply not show up. Does this work for you for a new flow as of 2022?

 

Thanks & Best regards

hemrhk
Super User
Super User

@Jevon 

 

For Approval action we need to pass the JSON differently to the Attachments,

 

 

{
  "Name": "@{items('Apply_to_each')?['DisplayName']}",
  "content": {
    "$content-type": "@{body('Get_attachment_content')['$content-type']}",
    "$content": "@{body('Get_attachment_content')['$content']}"
  }
}

 

 

https://365stack.in/index.php/2021/11/19/how-to-add-dynamic-attachments-in-power-automate-send-email... 

 

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

If it solved your problem give a kudo and accept it as a solution. 

Follow and Subscribe 365 Stack for more updates. 

 

 

Thanks for taking the time to reply. Yes that's exactly the code I used - yet where the attachment shows up in the email generated by approvals, it does not show up in the Teams Client 'Approvals App' (no attachments visible)... 

Yorkshire365
New Member

Hi, 

I'm working on a power automate flow for a group form, that when submit (with attachments) it goes to an approval workflow with the attachments... The videos I've watched has the 'get file content' from OneDrive at the point of Add an action in the screen shot, but the docs are in the group SharePoint site  and 'get file content' from SharePoint isn't working. 

Any help, much appreciated.  

Capture.PNG

 

What JSON worked for you? I am trying this and I am not able to solve it

alexaso
Regular Visitor

alexaso_0-1655290783150.png

How to add dynamic attachments in Send Email/Approval Action - 365 Stack

 

I used this one but with questionsmark in between. Now it works.

 

Original expression I tried as noted in this thread:   body('Get_attachment_content')['$content']

Updated working expression:  

 

"$content-type": body('Get_attachment_content')?['$content'-type]

"$content": body('Get_attachment_content')?['$content']

 

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (5,225)