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 / Email does not recogni...
Power Automate
Unanswered

Email does not recognize attachment as PDF File

(0) ShareShare
ReportReport
Posted on by 23

Hi! 

 

I want to forward an email with a PDF document, with the trigger 'When an email arrives in a shared mailbox', but I have to change the subject line. The info for this subject line is stored in Excel under the name of the PDF document.

 

I have made a variable which gets the name of the PDF document from the email, use Get a row to get the data from Excel, and parse this info in the subject line in 'send an email (V2)'. This all works well, however, I cannot get the original attachment (from the trigger email) attached to the email I want to send.  I have tried all dynamic contents which are related to attachments, but I cannot get it to work. Am I missing something?

 

Thanks in advance! 

 

EDIT: I managed to get the attachment to arrive in the email, however, the email does not recognize it as a PDF file. It is just stored as 'file'. If I open it with a PDF reader it does open the file. How can I get it to show a PDF file? the email looks a bit like phishing now.. For Attachment content I used 'Attachment Contents'

Screenshot 2022-11-07 151735.png

Screenshot 2022-11-07 123604.png

Categories:
I have the same question (0)
  • Verified answer
    v-chengfen-msft Profile Picture
    on at

    Hi @ANNEMAP ,

    The reason for this problem is:

    The file name needs to add a suffix, for example: File.pdf

     

    Here is a test for your reference:

    Here is excel table:

    vchengfenmsft_0-1667875861055.png

     

    vchengfenmsft_1-1667875861062.png

    vchengfenmsft_2-1667875861067.png

    vchengfenmsft_3-1667875861078.png

     

    Here is result:

    vchengfenmsft_4-1667875861079.png

     

    Best Regards

    Cheng Feng

  • ANNEMAP Profile Picture
    23 on at

    Thank you!! 

     

    I am now indeed able to have the attachment show up as a PDF file, but when I open the file I get the following message. I tried this with several PDF files, all of which open when the .PDF extention is not mentioned (but do not show up as PDF) but don't open when .PDF is added. 

     

    Do you have any idea how to fix this?

     

    Thanks in advance! 

     

    ANNEMAP_0-1667897555941.png

     

  • Verified answer
    v-chengfen-msft Profile Picture
    on at

    Hi @ANNEMAP ,

    Could you please tell me you use [Get attachments] to get email attachments?

    If no,

    Please try to use [Get attachments] to get email attachments

    If yes,

    Here is a link for your reference:

    Fix the PDF Error “The file is damaged and could not be repaired” (nucleustechnologies.com)

    Best Regards

    Cheng Feng

  • ANNEMAP Profile Picture
    23 on at

    Thank you! I was indeed not using Get Attachments, I was just working on adding this. However, I get an error using it. I have set it up like you did, but it fails.. (dynamic content for Attachment ID is 'Attachments Attachment ID' correct?)

     

    It looks like it cannot find the message ID, but before the Get Attachment it worked fine.

     

    Thank you for your insight!

     

    ANNEMAP_0-1667898458738.png

     

  • ANNEMAP Profile Picture
    23 on at

    Never mind! I tried sending a new email to the mailbox, and it worked fine now. I think the issue was in the trigger.

     

    Thank you 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

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

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard