I am trying to upload a file to a column using Power Automate. I am using the HTTP action along with Graph QL in a compose Action and compose actions to map the parts, including File Content with Base64 decoding. The flow works and I can upload the file to Monday.com column, but the file is unreadable when in Base64. The content in the file is there, but it is as a .txt file. If I remove the base64 coding then the file will appear, as a pdf but it is blank. Any suggestions?
The upload works in postman.
If I decode the pdf as base64 and add this in a compose action as a string of data, it still doesn’t work, which leads me to thing there’s an error with my coding or the conversion of the file into monday.com.
I am using a pdf, version 1.7.
I have tried an image file png and jpeg with no success either (error with the image format).
{ "type": "Scope", "actions": { "Graphic_QL": { "type": "Compose", "inputs": "mutation add_file($file: File!) { add_file_to_column(item_id: 123456789, column_id: \"upload_file\", file: $file) { id } }" }, "Compose_MAP": { "type": "Compose", "inputs": { "image": [ "variables.file" ] }, "runAfter": { "Graphic_QL": [ "Succeeded" ] } }, "Compose_MultiPart": { "type": "Compose", "inputs": { "$content-type": "multipart/form-data; boundary=---------------------------7da24f2e5004", "$multipart": [ { "headers": { "Content-Disposition": "form-data; name=\"query\"" }, "body": "@{outputs('Graphic_QL')}" }, { "headers": { "Content-Disposition": "form-data; name=\"map\"" }, "body": "@{outputs('Compose_MAP')}" }, { "headers": { "Content-Disposition": "form-data; name=\"image\"; filename=\"3.pdf\"", "Content-Type": "application/pdf" }, "body": "@{variables('Content')}" } ] }, "runAfter": { "Compose_MAP": [ "Succeeded" ] } }, "HTTP-copy": { "type": "Http", "inputs": { "uri": "https://api.monday.com/v2/file", "method": "POST", "headers": { "Content-Type": "multipart/form-data; boundary=---------------------------7da24f2e50046", "Authorization": "Santised" }, "body": "@outputs('Compose_MultiPart')" }, "runAfter": { "Compose_MultiPart": [ "Succeeded" ] }, "operationOptions": "DisableAutomaticDecompression", "metadata": { "operationMetadataId": "7353861e-17c7-4ba7-a7a2-bf69a669bbb6" } } }, "runAfter": { "Append_to_string_variable": [ "Succeeded" ] } }