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 Attachment - Send ...
Power Automate
Unanswered

PDF Attachment - Send an email

(0) ShareShare
ReportReport
Posted on by 16

Hello,

 

I'm creating a flow which grabs the outputs of a MS Form into a PDF then emails this as an attachment.

To achieve this, I have done the following:

  1. Created a HTML template then replaced the answers with some set variables to look for
  2. Converted the HTML doc to PDF using OneDrive

 

All of this process works fine aside from one small issue, when the document is emailed I can't see the image I have put in the template but within the file save within OneDrive this is present.

 

Tobia_0-1668443172219.png

 

I am using the Send An Email (V2) option to send the email out.

I saw on some other forum about adding a delay, but this didn't make any difference

Any ideas?

 

HTML Code

 

<p><img src="https://linktophoto/photo.jpg" alt="" width="439" height="93" /></p>
<p>&nbsp;</p>
<p>Submitted by: {Submitted}</p>
<p>&nbsp;</p>
<p><span style="color: #47b2e8;"><strong>IT Asset Accident/Incident Report</strong></span></p>
<p>&nbsp;</p>
<p><span style="color: #47b2e8;"><strong>User </strong></span></p>
<p>First name: {First}</p>
<p>Surname: {Surname}</p>
<p>&nbsp;</p>
<p><span style="color: #47b2e8;"><strong>Device</strong></span></p>
<p>Affected IT device/equipment: {Affected}</p>
<p>Serial number of affected device/equipment: {Serial}</p>
<p>Current status/functionality of the affected IT device/equipment: {Current}</p>
<p>&nbsp;</p>
<p><span style="color: #47b2e8;"><strong>Situation</strong></span></p>
<p>How the accident/incident happened: {How}</p>
<p>What steps have been taken to prevent a reoccurrence in future: {What}</p>

 

Flow

 

Tobia_1-1668443254204.png

Tobia_2-1668443261600.png

 

Cheers

 

Tobia 

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

    Hi @Tobia ,

    The reason for this problem is:
    1. Images in URL form cannot be accessed due to restrictions
    Please try using image content:

    Here is a Test for your reference:

    Images submitted by users in Forms are saved in the App folder of OneDrive.

    vchengfenmsft_4-1668503428222.png

    We can get the content and detailed information of the picture through [Get file content using path] and [Get file metadata using path] and the picture name.

    [Prase JSON] Schema:

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "name": {
                    "type""string"
                },
                "link": {
                    "type""string"
                },
                "id": {
                    "type""string"
                },
                "type": {},
                "size": {
                    "type""integer"
                },
                "referenceId": {
                    "type""string"
                },
                "driveId": {
                    "type""string"
                },
                "status": {
                    "type""integer"
                },
                "uploadSessionUrl": {}
            },
            "required": [
                "name",
                "link",
                "id",
                "type",
                "size",
                "referenceId",
                "driveId",
                "status",
                "uploadSessionUrl"
            ]
        }
    }

    vchengfenmsft_0-1668503057889.pngvchengfenmsft_1-1668503066697.png

    vchengfenmsft_2-1668503088229.png

    Here is result:

    vchengfenmsft_3-1668503263316.png

     

    Here is a link for your reference:

    Solved: How we can use Libraray image in Powerautmate flow... - Power Platform Community (microsoft.com)

    Best Regards

    Cheng Feng

     

  • Tobia Profile Picture
    16 on at

    Hi Cheng,

     

    Tried to modify this to make it work with my setup as it slightly differs

    The user doesn't submit the image, the image is already pre done by myself and is just a logo i would like on the PDF

     

    I have changed my image to this

     

    <p><img src="{JPG}" width="321" height="68" /></p>
    <p>&nbsp;</p>
    <p>Submitted by:</p>
    <p><strong>{Submitted}</strong></p>
    <p>&nbsp;</p>
    <p><span style="color: #47b2e8;"><strong>IT Asset Accident/Incident Report</strong></span></p>
    <p>&nbsp;</p>
    <p><span style="color: #47b2e8;"><strong>User </strong></span></p>
    <p>First name:</p>
    <p><strong>{First}</strong></p>
    <p>Surname:</p>
    <p><strong>{Surname}</strong></p>
    <p>&nbsp;</p>
    <p><span style="color: #47b2e8;"><strong>Device</strong></span></p>
    <p>Affected IT device/equipment:</p>
    <p><strong>{Affected}</strong></p>
    <p>Serial number of affected device/equipment:</p>
    <p><strong>{Serial}</strong></p>
    <p>Current status/functionality of the affected IT device/equipment:</p>
    <p><strong>{Current}</strong></p>
    <p>&nbsp;</p>
    <p><span style="color: #47b2e8;"><strong>Situation</strong></span></p>
    <p>How the accident/incident happened:</p>
    <p><strong>{How}</strong></p>
    <p>What steps have been taken to prevent a reoccurrence in future:</p>
    <p><strong>{What}</strong></p>

     

    How would i change the {JPG} to the logo i have stored in onedrive

    I have tried to use the replace(GET-FILECONTENT OF ONEDRIVEFILE,{JPG},FILENAME) but couldn't get this to work.

     

    Cheers

     

    Tobia

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