cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mk007
Level: Power Up

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

1 REPLY 1
Super User
Super User

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

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...

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 363 members 6,075 guests
Please welcome our newest community members: