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 / .pdf's not opening aft...
Power Automate
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!

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @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

  • Verified answer
    CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    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!

     

  • WilkinsLuke6 Profile Picture
    25 on at

    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!

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @WilkinsLuke6 

     

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

     

    Thanks

    Hardesh

     

     

  • CFernandes Profile Picture
    8,402 Most Valuable Professional on at

    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!

     

  • WilkinsLuke6 Profile Picture
    25 on at

    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,402 Most Valuable Professional on at

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

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 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard