Hello guys,
i have a problem with attachments in "Send an email V2" in a flow.
i generate word documents with "Word online" and save it in sharepoint.
My flow can generate between 1 and 4 documents, so I created a variable-array and use the function "Append to array".
code view :
{
"type": "AppendToArrayVariable",
"inputs": {
"name": "VarAttachments",
"value": {
"Name": "@{outputs('Create_file_-_Attestation_Laptop_Word_Avocats')?['body/Name']}",
"ContentBytes": "@{body('Get_file_content_-_Attestation_laptop_Word_Avocats')?['$content']}"
}
},
"runAfter": {
"Get_file_content_-_Attestation_laptop_Word_Avocats": [
"Succeeded"
]
}
}
I receive the attachments with good name and the right extension (docx), but all file are corrupted, i don't understand why...
I have try to modifify my "ContentBytes" in append my array with :
-content from get file content
"ContentBytes": "@{body('Get_file_content_-_Attestation_laptop_Word_Avocats')?['$content']}"
-generic value from get file content
"ContentBytes": "@{body('Get_file_content_-_Attestation_laptop_Word_Avocats')}"
-content from "popupale a microsoft word document"
"ContentBytes": "@{body('Populate_a_Microsoft_Word_template_-_Laptop_Avocats')}"
Every time, the result is the same: my attachments have the correct names and the .docx extensions, but the files are corrupted and unreadable.
Please help me :(