Showing results for 
Search instead for 
Did you mean: 

How to attach the pdf file in custom connector as an input parameter



I am using a custom connector to send API requests to a server. The API is working fine in postman and there is a option to attach the pdf file. But how can we attach the same pdf file in custom connector while making a API Request.

I am attaching the Postman and connector screenshot. Please Refer.


I am pretty sure Postman is converting any attached document in formdata to binary for you, so all you need to do in your custom connector is add a parameter to accept a binary input, then in the Flow where you call your connector convert your document to binary before sending it.


I tried to create a Flow which is converting Base64 to Binary Format and calling the custom connector, but it is giving error as-

{"statusCode":400,"headers":{"Transfer-Encoding":"chunked","x-correlation-id":"dolore reprehenderit laboris","x-envoy-upstream-service-time":"130","x-envoy-decorator-operation":"*","Strict-Transport-Security":"max-age=15724800; includeSubDomains","x-ms-apihub-cached-response":"false","Date":"Mon, 24 Jan 2022 11:12:34 GMT","Content-Type":"application/json; charset=utf-8","Content-Length":"114"},"body":{"message":"Validation Failed","details":{"":["Failed to read the request form. Missing content-type boundary."]}}}

Also, I am unable to update the file format as a binary in custom connector. Please refer attached screenshots.

While updating the file format as binary it is giving following error:

Specified swagger has the following errors: 'Definition is not valid. Error: 'Error : paths/~1loans~1{loanNumber}~1valuation-cases/post/parameters/3/schema/properties/file : A schema with type/format 'string/binary' can only be at the top level of a body or formData parameter.

Helpful resources

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.

New Process Advisor Capabilities carousel.png

Read the blog for the latest news

Read the latest about new experiences and capabilities in the Power Automate product blog.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Top Solution Authors
Users online (3,882)