Add HTML watermark to PDF document using Power Automate
This is the fourth article in our How to use Watermarks series. These articles show how to use watermarking in PDFs using Plumsail Documents in Power Automate (Microsoft Flow).
If you need more control over your watermark, use the HTML watermark type. Unlike text watermarks, which support only basic formatting such as color, HTML watermarks give you full control over typography, layout, spacing, and mixed content.
Before we dive in, here is where we are in our How to use Watermarks series:
How to use an image type watermark to automatically add a company logo to PDF files and save them in a new folder.
How to use a text type watermark to prevent documents dissemination.
How to use a PDF type watermark to add a watermark with a specific design to PDF documents generated on submitting a form.
How to use an HTML type watermark to add a richly styled watermark with dynamic content to PDF documents.
Add watermark to PDF action supports a few types of watermarks — Text, Image, PDF and HTML:
Let’s look at how to add an HTML watermark to a document.
Use HTML watermark to protect your documents
A watermark such as “Confidential” helps indicate how a document should be handled. It reminds users that the content is sensitive and should not be shared or left exposed.
In this example, we will process a financial report that contains sensitive information. We will take a PDF document, apply a styled “Confidential” watermark with dynamic information such as the generation date. Then, we will send it by email.
Imagine, you have a document library where reports are stored. When a new file is added, we will add a watermark to it and send the document by email.
Here is how the flow looks:
Create the flow
Let’s go through each step of the flow and configure the required actions.
Flow trigger
Go to Power Automate, create a flow and find SharePoint — When a file is created (properties only) action. Using this trigger will allow you to start the flow on adding a file into a document library. Set your Site Address and Library Name:
Get file content
Then, add Get file content action to retrieve the source PDF file. Use Identifier from the previous action:
Add watermark to PDF
This is an action from the Plumsail Documents connector.
If this is your first time using the Plumsail Documents connector, Power Automate will request you to create a new connection. Provide the following details and then click Create new:
Connection name - you can type any name for the connection, for example Plumsail Documents (production key);
API Key - create an API key in your Plumsail Account, copy it, and paste it into the API Key field;
Data center location - make sure the selected data center location matches one of your account.

Select HTML as the watermark type. Use File content from the output of the Get file content action.
For our watermark, we will use the following HTML code with styles and dynamic date (current date when the flow is run):
<div style="
width: 250px;
height: 250px;
border: 2px solid #b00020;
border-radius: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transform: rotate(-25deg);
opacity: 0.2;
font-family: Arial, Helvetica, sans-serif;
color: #b00020;
text-align: center;
">
<div style="
font-size: 24px;
font-weight: bold;
letter-spacing: 4px;
">
CONFIDENTIAL
</div>
<div style="
font-size: 12px;
margin-top: 10px;
letter-spacing: 1px;
">
@{formatDateTime(utcNow(), 'dd MMMM yyyy')}
</div>
</div>
You can also get HTML from a file. For example, you can store the HTML code in a file in OneDrive or SharePoint and get it with the Get file content action.
And select position of the watermark on the page. You can check detailed information on how to use these and other settings.
Send document by email
We used Send an email action from Office 365 Outlook connector, but you can choose another one. Attachment content is the output of Add watermark to PDF action.
The process is complete. The recipient will receive the report. This will help to prevent the document from being shared with unauthorized people, as the watermark identifies the document as confidential and indicates when it was generated.
Conclusion
HTML watermarks give you full control over your watermark. You can combine styles, layouts, and dynamic data to fit your branding or workflow. We hope this series helps you get the most out of the Add watermark to PDF action.
If you haven’t used Plumsail Documents yet, registering an account is a quick way to get started.