Cannot upload file using API via Power Automate

Hi

Great forum this. Thanks to all the contributors.

Could some one please help me? I am having issues uploading file via API using Power Automate HTTP action step. Here is my HTTP action step.

Above I am getting my file from SharePoint.

The error I am getting is as follows:
{“success”:false,“error”:“No files were provided with the request.”,“error_info”:“Please check developers.pipedrive.com for more information about Pipedrive API.”,“data”:null,“additional_data”:null}

I have checked the run history and I can see the file binary content under that compose action step.

Any help in this is really appreciated.

Thanks

Hi @abm_abm,

this looks like a problem with Power Automate. We are not familiar with this tool internally, so we can’t help sadly. Hope that someone from the community steps in! :crossed_fingers:

Hi @Jakub_Kadlubiec

Thanks for your response. Definitely not the issue with Power Automate. When I tried via Postman it did worked that’s because Postman abstract a few things like file upload where users can specify whether its a text or file. Pipeline HTTP documentation (Upload file) is very general and doesn’t cover about multi-part form data. I managed to find out and for the further reference someone looking for a solution here it is.

Method: Post
URI: https://hubinternational2.pipedrive.com/api/v1/files
Headers:
{
“Accept”: “application/json”,
“Content-Type”: “multipart/form-data”
}

Queries:
{
“api_token”: “your api token”
}

Body:
{
“$content-type”: “multipart/form-data”,
“$multipart”: [
{
“body”: “your deal id”,
“headers”: {
“Content-Disposition”: “form-data; name="deal_id"”
}
},
{
“body”: {
“$content”: “your binary format of the file content”,
“$content-type”: “application/pdf”
},
“headers”: {
“Content-Disposition”: “form-data; name="file"; filename="yourfilename.pdf"”
}
}
]
}

HTTP action step look like this.

Thanks

Do I understand correctly that it works for you now? Thanks for sharing the solution!

1 Like

Yes it is working as expected.

Thanks