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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / PDF Attachment - Send ...
Power Automate
Answered

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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 922

#2
Valantis Profile Picture

Valantis 837

#3
Haque Profile Picture

Haque 534

Last 30 days Overall leaderboard