Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

.pdf's not opening after automating an email

(0) ShareShare
ReportReport
Posted on by 25

Hi everyone, I have set up a flow to send 2 attachments gathered from a Sharepoint list, however when recieving these attachments, I cannot actually open the documents themselves and I'm getting an error that says 'We cant open this file'

sadasdassd.png

 

 

 

 

 

I have tried multiple send email flows even with 1 attachment and I still cannot open the files which leads me to think its an issue with 'Send Email V2' and .pdf documents.

 

My send email flow runs as followed:

ASDASDASDASDASDASDASSD.png

 

asdasdasdasdaSDAS.png

 

asdasdasd.png

 

Any help would be greatly appreciated!

  • CFernandes Profile Picture
    8,283 Most Valuable Professional on at
    Re: .pdf's not opening after automating an email

    @WilkinsLuke6 I am glad that your problem has been resolved. 

  • WilkinsLuke6 Profile Picture
    25 on at
    Re: .pdf's not opening after automating an email

    Perfect, it seems to be working fine now, I think the issue was, that I was using 'Get attachment content' over 'Get file content'.

     

    Thanks guys for your fast responses 😀

  • CFernandes Profile Picture
    8,283 Most Valuable Professional on at
    Re: .pdf's not opening after automating an email

    Hi @WilkinsLuke6 

     

    Please have a close look at my screenshot below:

     

    The 'File Content' is the Output of the 'Get File Content' action.

     

    CFernandes_0-1599209300003.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at
    Re: .pdf's not opening after automating an email

    @WilkinsLuke6 

     

    Instead of body in second action VarArray put 'file content' from get file content.

     

    Thanks

    Hardesh

     

     

  • WilkinsLuke6 Profile Picture
    25 on at
    Re: .pdf's not opening after automating an email

    Hi thanks for your reply,

    I have tried putting this bit of code on my 'append to array' function but I seem to get an 'invalid' JSON error. I have tried manually inputting this code through expressions, without expressions and copying and pasting directly. These are the outcomes:

    sadassdasdadas.png

     

    sadasdasdasdsa.png

    Sorry if I am missing something obvious here but I cant seem to work it out!

  • Verified answer
    CFernandes Profile Picture
    8,283 Most Valuable Professional on at
    Re: .pdf's not opening after automating an email

    Hi @WilkinsLuke6 

     

    You can directly pass the File-content.

     

    {
     "Name": @{items('Apply_to_each')?['DisplayName']},
     "ContentBytes": @{outputs('Get_file_content')?['body']}
    }

     

    CFernandes_0-1599152675032.png

     

     

    Screenshot of the full sample Power Automate solution:

     

    CFernandes_1-1599152809736.png

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

     

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at
    Re: .pdf's not opening after automating an email

    @WilkinsLuke6 

     

    You are passing name from Get file content. you should use 'Get File Metadata' Action then use dynamic name from this action.

     

    Thanks

    Hardesh

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,695 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow