cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Add Attachment to SharePoint List?

I am trying to Send an HTTP Request to SharePoint, and add an attachment I have in OneDrive to a SharePoint List.

In my flow:

  • I list all files in OneDrive folder
  • I loop through each File
  • I get SharePoint List items
  • I loop through each SharePoint item
  • I then have a condition that checks if the OneDrive file name matches the SharePoint List name
  • If it does, then I have the POST method of 
    • _api/web/lists('@{variables('ListId')}')/items('@{items('Apply_to_each_2')?['ID']}')/AttachmentFiles/Add

 

I am stuck after this part. What do I need to add to the Uri and what Headers and Body do I enter? 

 

Snag_1468c1e7.png

Snag_14690345.png

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous

I Suggest you use the Add Attachment action instead of the Send HTTP Request

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

1 REPLY 1
Mira_Ghaly
Dual Super User II
Dual Super User II

@Anonymous

I Suggest you use the Add Attachment action instead of the Send HTTP Request

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Users online (1,337)