I am struggling to upload a file to an update using power automate. I have managed using postman but I am unable to replicate it.
I would like to upload a file using a url and this is the query I am using:

I am struggling to upload a file to an update using power automate. I have managed using postman but I am unable to replicate it.
I would like to upload a file using a url and this is the query I am using:

+1 on this! Found several solutions on this but it’s not working on my end. The best one that I found is this, except the example uses BambooHR instead of Monday, and I have no idea on how to include the mutation into the request body.
Our API does not support uploading a file from a URL. You will have to upload the content of the file instead. Not sure if PowerAutomate supports that…
Thanks for the reply Dipro! Power Automate does indeed support uploading file content instead of the URL.
This is the multipart request that I’ve added in the HTTP body:
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"body": "3088397636",
"headers": {
"Content-Disposition": "form-data; name=\\"update_id\\""
}
},
{
"body": "iVBORw0KGgo ...",
"headers": {
"Content-Disposition": "form-data; name=\\"file\\"; filename=\\"test blue_logo.png\\""
}
}
]
}
Are there any other perimeters that I need to include in the body?
Aha, thanks for clarifying. I also read the article you linked and am starting to understand how PowerAutomate converts this JSON into a valid multipart.
For our API, you need to have three parts in the multipart:
In PowerAutomate JSON format, it would look somehting like this:
{
"$content-type": "multipart/form-data",
"$multipart": [
{
"body": "mutation ($file: File!) { add_file_to_update (file: $file, update_id: 1234567890) { id } }",
"headers": {
"Content-Disposition": "form-data; name=\\"query\\""
}
},
{
"body": "{\\"image\\":\\"variables.file\\"}",
"headers": {
"Content-Disposition": "form-data; name=\\"map\\""
}
},
{
"body": "iVBORw0KGgo ...",
"headers": {
"Content-Disposition": "form-data; name=\\"image\\"; filename=\\"test blue_logo.png\\"",
"Content-Type": "<Content-Type header here>"
}
}
]
}
I copied the content of each part from our Postman sample collection – Upload a file to an update
Hope this helps!
Wow you are a lifesaver. It works perfectly!
Thank you so much for your help 🙌
A post was split to a new topic: 500 error when uploading file to update using PowerAutomate
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.