Uploading File Attachments on Monday.com Board via API

I’m automating item creation on a Monday board using responses from Microsoft Forms via Power Automate. The item and updates work smoothly, but I’m stuck on getting file attachments (images, Word, Excel, etc.) added to the item. The files appear on the board but in an unreadable format—I’ve tried both Base64 and binary without luck. Any tips or tricks to make these attachments viewable?

HTTP part from Power Automate

Output:

Hello there @Amrutha and welcome to the community!

I am not familiar with Power Automate, but I wonder if the issue might lie in the body. I see you are passing multiple headers with different content types. I do not know how that works in Power Automate.

For reference here is a working example on a column (it works basically in the same way):

curl --location 'https://api.monday.com/v2/file' \
--header 'Authorization: APITOKENHERE' \
--form 'query="mutation add_file(\$file: File\!) {add_file_to_column(item_id: 1234567890, column_id:\"files__1\" file: \$file) {id}}
"' \
--form 'map="{\"image\":\"variables.file\"}
"' \
--form 'image=@"/Users/matias/Documents/myDocument.xlsx"'

JS:

const myHeaders = new Headers();
myHeaders.append("Authorization", "APITOKENHERE");
const formdata = new FormData();
formdata.append("query", "mutation add_file($file: File!) {add_file_to_column(item_id: 1234567890, column_id:\"files__1\" file: $file) {id}}\n");
formdata.append("map", "{\"image\":\"variables.file\"}\n");
formdata.append("image", fileInput.files[0], "myDocument.xlsx");

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: formdata,
  redirect: "follow"
};

fetch("https://api.monday.com/v2/file", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));