cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
gbuhre
Helper III
Helper III

Post File via HTTP

I can't get this to work in flow. I get bad request. Below is the 400 status code and the header and body I'm sending. { "code": "InvalidObject", "message": "request object is invalid", "errors": [ { "code": "MissingRequiredField", "message": "The RecordId field is required.", "resource": "request", "field": "RecordId" }, { "code": "MissingRequiredField", "message": "The RecordType field is required.", "resource": "request", "field": "RecordType" }, { "code": "MissingRequiredField", "message": "The Title field is required.", "resource": "request", "field": "Title" }, { "code": "MissingRequiredField", "message": "File or Url is required.", "resource": "request", "field": "File" } ] } POST /v4_6_release/apis/3.0/system/documents HTTP/1.1 Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW Content-Disposition: form-data; name="recordid" 81014 ------WebKitFormBoundary7MA4YWxkTrZu0gW-- Content-Disposition: form-data; name="recordType" Opportunity ------WebKitFormBoundary7MA4YWxkTrZu0gW-- Content-Disposition: form-data; name="title" Test document ------WebKitFormBoundary7MA4YWxkTrZu0gW-- Content-Disposition: form-data; name="url" https:/********************/sites/*************s/************es/SI-160829.pdf ------WebKitFormBoundary7MA4YWxkTrZu0gW--

23 REPLIES 23

Just a hint: When you follow the OpenAPI 2.0 spec then you should be successful. 

Prof_E
New Member

@gbuhre 

@juresti 

 

are you still struggling with this? Please look at this work by @WillPage  and @SamPo 

 

https://powerusers.microsoft.com/t5/Building-Flows/HTTP-Post-multipart-form-data/m-p/332170/highligh...

 

Cheers

juresti
Continued Contributor
Continued Contributor

@Prof_E 

 

I no longer attempted to post via http. I could not post via the custom connector either.
FTP was the solution I ended up using to copy files into a remote server.

Anonymous
Not applicable

Dear Sven, I tried to figure out how to make it work with lexoffice, but get the follwing message:

 

Ihr Flow wurde gespeichert, konnte aber nicht aktiviert werden, weil er Connectors für Anwendungen enthält, die nicht mit dem in diesem Flow verwendeten Gmail-Connector kompatibel sind. Weitere Informationen

 

Any idea what to do? Which trigger / Connector do you use? GMail is apparently a problem.

 

Can you help me? 

Thanks!

Manuel

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.

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!

Top Solution Authors
Top Kudoed Authors
Users online (2,427)