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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (4,621)