web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Automate
Answered

Flow not working

(0) ShareShare
ReportReport
Posted on by 158

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"
}
}
Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,294 Most Valuable Professional on at

    @sammary 

    Try wrapping the content in a Base64() expression before creating the file.

     

  • sammary Profile Picture
    158 on at

    Scott, thanks for getting back to me. Not sure what that does or how to do it?

  • Verified answer
    sammary Profile Picture
    158 on at

    Very strange. I tried the flow using different types of files and they all worked fine. So I tried a couple of different PDF files and they too worked fine. Problem resolved.

    Thanks everyone for your help

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard