Power Automate: Create A PDF File From HTML [No Premium]

power automate Create A PDF File From HTML

Learn how to create a PDF file from HTML with Power Automate without any premium connectors.

Step by step: How to create PDF from HTML with Power automate

Power Automate Created PDF

Learn how to create a PDF file from HTML step by step.

  1. Create a flow with manual trigger

    power automate create instant flow

    Create instant flow

  2. Add a ‘Compose’ action

    Power Automate Add Compose Action

    Add Compose Step

  3. Copy the HTML into Compose

    Power Automate Copy HTML To Compose Inputs

    Paste HTML

  4. Add a ‘Create file’ action

    Power Automate Create File Action

    Create file

  5. Set ‘Create file’ Folder Path, File Name and File Content

    Power Automate Create File Setup

    Create File configuration

  6. Add a ‘Convert file using path’ action

    Power Automate Convert File Using Path

    Convert file using path

  7. Configure ‘Convert file using path’ action’s File Path and set Target Type to PDF

    Power Automate Convert File Using Path Configuration

    Convert file using path configuration

  8. Add another ‘Create File’ action

    Power Automate Create File Action

    Create file action

  9. Set ‘Create file’ Folder Path, File Name and File Content

    Power Automate Create File PDF

    Configuration of ‘Create file’

  10. Add a ‘Send an email (V2)’ action

    Power Automate Send an Email Action

    Send an email (V2)

  11. Finally send the PDF file via email

    Power Automate Send An Email Configuration

    Configuration ‘Send an email (V2)’

HTML for Copy and Paste

<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<style>
    * {
        font-family: Arial;
        font-size: 11px;
    }
    th,td {
        padding:6px;
        text-align: start;
        vertical-align: text-top;
    }

    th{
        max-width: 100px;
        min-width: 100px;
    }
    td{
        max-width: 340px;
        min-width: 340px;
    }
    h3{
        font-size: 20px;
        font-weight: bolder;
        padding-bottom: 4px;
        margin-bottom: 0px;
    }
   td{
        background-color:#f3f3f3;
    }

</style>
 <h3>Sample PDF</h3>
<table>
    <tr>
        <th>First name </th>
        <td>John</td>
        <th>Last name</th>
        <td>Doe</td>
    </tr>
    <tr>
        <th>Age</th>
        <td>27</td>
        <th>Gender</th>
        <td>Male</td>
    </tr>
    <tr>
        <th>Country</th>
        <td>USA</td>
        <th>City</th>
        <td>New York</td>
    </tr>
</table>
</body>
</html>

Leave a Comment

Your email address will not be published.