cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mk007
New Member

Upload File to SharePoint using "Send an HTTP Request to SharePoint"

Hi

 

My end goal is to take the attachments from an email and upload them to a document library with a dynamic path.

 

My action is configured as follows:

Flow Forum.jpg

I get the following error:

{
  "status": 400,
  "message": "Not well formatted JSON stream.\r\nclientRequestId: 74232faf-b203-4b92-a2b0-5d79edbad040\r\nserviceRequestId: 2f54a99e-5000-7000-a4bd-049a6320c1ae",
  "source": "https://xxx.sharepoint.com/sites/appQA/referralmanagement/_api/web/getfolderbyserverrelativeurl('Referral%20Attachments/QIM201812060042%E2%80%8B/Received%20Attachments/image612000.png')",
  "errors": [
    "-1",
    "Microsoft.SharePoint.Client.InvalidClientQueryException"
  ]
}

The issue seems to be in the way that I am trying to pass the data. I had tried:

{"data" : "bytes"}

I am not using the built in SharePoint action to upload files as this doesn't see to accept dynamic folders.

 

Any advice is much appreciated.

 

Thanks

2 REPLIES 2

Hi @mk007,

 

You don't need to worry about the X-RequestDigest. The Send an HTTP request to SharePoint handles all of this for you.

 

An example of how to use this action you can find here:

https://veenstra.me.uk/2018/08/09/microsoft-flow-create-a-folder-in-a-document-library-using-microso...

bkk
Helper I
Helper I

@mk007 I know this post is very old, were you ever able to solve uploading document via SharePoint HTTP?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Top Solution Authors
Users online (1,451)