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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Corrupt files when aut...
Power Automate
Answered

Corrupt files when automaticly send emails with attachments (pdf) to onedrive

(3) ShareShare
ReportReport
Posted on by 18
Hello,

Im trying to make a flow wich looks into my email and when i receive an email with attachment pdf it will send it to onedrive, and from there i want to to extract text from it.
If i upload the pdf manually to onedrive the flow detects the file and extracts the needed information for me.

But when i send an email and it saves to onedrive whatever i try to do the file is corrupted or blank, so it somehow changed the pdf so i cant use it anymore, does anyone know a solution for this?.

Greets Paul

Edit: i have to mention that the pdf file contains an png, (still when i upload manually it works, through email the file gets corrupted)
Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,684 Super User 2025 Season 2 on at
    Hi 
     
    Please try the following:
     
    File Attachments for Outlook Email Attachments, OneDrive and SharePoint Files
     
    See also: Office 365 Outlook - Connectors | Microsoft Learn: "In some cases when using Send an email V2 to send multiple attachments, the resulting files may be invalid. In those cases it is best to follow the below process as a workaround."

     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
     
     
     
  • GH-28041747-0 Profile Picture
    18 on at
    b
  • GH-28041747-0 Profile Picture
    18 on at
    @Ellis Karim

    I tried what u suggested but no succes, i removed the space and added what u said, see screenshots

     
  • Ellis Karim Profile Picture
    11,684 Super User 2025 Season 2 on at
    Hi 
    You need to wrap them the content of "contentBytes" in { } as shown below:
     
     
     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
  • GH-28041747-0 Profile Picture
    18 on at
    @Ellis Karim

    i tried this but no succes
  • GH-28041747-0 Profile Picture
    18 on at
    is it possible to share a working flow wich can detect pdf files in an outlook and sending them to onedrive, and see if i can use the flow?.

    i had a it specialist from my work looking at it and also he couldnt manage to do it.
    than he said he could use other pdf files that where working, but for me they didnt.. while we have the same flow.... i dont understand
  • Verified answer
    GH-28041747-0 Profile Picture
    18 on at
    Fixed my problem



    With this setup all the pdf files from outlook going to /AI_PDFs folder in my onedrive :)
    Hoping that this helps some other people to, 
    @Ellis thanks for your effort and time mate!.

    Greets Paul

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard