I have a flow that looks in a shared Outlook mailbox for mail. If the mail has an attachment, the attachment is downloaded to a share SharePoint folder. The flow works perfectly with Excel attachments however when there is a PDF attachment the file that is downloaded is corrupt. In one example the file attachment sizes are Excel is over 300KB and the PDF is less than 200KB. The downloaded PDF file is 1KB and the Excel file is the same size as the attachment. Any help would be appreciated.
This is the code
{
"type": "OpenApiConnection",
"inputs": {
"parameters": {
"folderPath": "/Shared Documents/General/Company Shared Directory/Sam_Dowload_Test",
"name": "@item()?['name']",
"body": "@item()?['contentBytes']"
},
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline",
"connection": "shared_sharepointonline",
"operationId": "CreateFile"
}
},
"runtimeConfiguration": {
"contentTransfer": {
"transferMode": "Chunked"
}
}