Documents connector

This connector helps you to automatically generate and convert documents with the help of Microsoft Flow. Before starting, ensure that you added Plumsail Documents connector to Microsoft Flow.

Create document from DOCX template

Creates .docx document from .docx template with the help of Microsoft Flow. You can find more examples in this article.

Output Parameters

Parameter Description Example
File Content The content of the result .docx file. It is a Base64 encoded content of the result file.

Input Parameters

Parameter Description Example
DOCX document content

The raw content of the source .docx template file. You can extract file content from other connectors like:

  • SharePoint
  • Salesforce
  • Box
  • OneDrive
  • Google Drive
  • Dropbox
  • SFTP
  • File System

List of Microsoft Flow connectors

You can find insturctions about creation of a template file in this article.

Use this link to download the sample template.

Template data Data to bind to the template in JSON format. You can get this data from some other Microsoft Flow connector. For example you can query SharePoint list or some other system.
{
    "EmployerFullName": "David Navarro",
    "EmployeeFullName": "Anil Mittal",
    "CompanyName": "Contoso LLC",
    "Position": "Marketing manager",
    "SalaryAmount": 5000,
    "ListOfBenefits": "list of any benefits that come with employment",
    "BonusesPolicyDescription": "annual evaluation",
    "EffectiveDate": "10/27/2017",
    "TerminationDate": "10/27/2018",
    "State": "New York"
}

Example

Create document from DOCX template Example

Create HTML from template

Generates raw HTML from a raw HTML template with the help of Microsoft Flow. You can find more examples in this article.

Output Parameters

Parameter Description Example
Result HTML Raw HTML result created from a source HTML template.
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>HTML from template</title>
</head>
<body>
    <ul>
        <li>David Navarro </li>
        <li>Jessica Adams</li>
        <li>Derek Clark</li>
    </ul>
</body>
</html>

Input Parameters

Parameter Description Example
Source HTML

HTML content of a source template. You can specify raw HTML here or extract file content from other connectors like:

  • SharePoint
  • Salesforce
  • Box
  • OneDrive
  • Google Drive
  • Dropbox
  • SFTP
  • File System

List of Microsoft Flow connectors

You can find description of template syntax in this article.

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>HTML from template</title>
</head>
<body>
    <ul>
        {{#each data}}
        <li>{{name}}</li>
        {{/each}}
    </ul>
</body>
</html>
Template data Data to bind to the template in JSON format. You can get this data from some other Microsoft Flow connector. For example you can query SharePoint list or some other system.
{
    "data": [
        {
            "name": "David Navarro "
        },
        {
            "name": "Jessica Adams"
        },
        {
            "name": "Derek Clark"
        }
    ]
}

Example

Convert HTML document to PDF Example

Convert DOCX to PDF

Converts .docx document to PDF document with the help of Microsoft Flow. You can find more examples in this article.

Output Parameters

Parameter Description Example
File Content The content of the result PDF file. It is a Base64 encoded content of the result file.

Input Parameters

Parameter Description Example
Document content

The raw content of the source .docx file. You can extract file content from other connectors like:

  • SharePoint
  • Salesforce
  • Box
  • OneDrive
  • Google Drive
  • Dropbox
  • SFTP
  • File System

List of Microsoft Flow connectors

It is a Base64 encoded content of the source template file.

Example

Convert DOCX document to PDF Example

Convert HTML to PDF

Converts HTML document to PDF document with the help of Microsoft Flow. You can find more examples in this article.

Output Parameters

Parameter Description Example
File Content The content of the result PDF file. It is a Base64 encoded content of the result file.

Input Parameters

Parameter Description Example
Source HTML

HTML content of a source file. You can specify raw HTML here or extract file content from other connectors like:

  • SharePoint
  • Salesforce
  • Box
  • OneDrive
  • Google Drive
  • Dropbox
  • SFTP
  • File System

List of Microsoft Flow connectors

<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <title>HTML to PDF example
    <style>
        div {
            border: 1px solid lightgray;
            padding: 5px;
            float: left;
        }
    </style>
</head>
<body>
    <div>
        Text in box1
    </div>
    <div>
        Text in box2
    </div>
</body>
</html>
Papper Size Paper size for output PDF file.
  • A4
  • Letter
  • LetterSmall
  • Tabloid
  • Ledger
  • Legal
  • Statement
  • Executive
  • A2
  • A3
  • A4Small
  • A5
  • B4
  • B5
Orientation Page orientation for output PDF file.
  • Portrait
  • Landscape

Example

Convert HTML document to PDF Example