Let’s check a case when you need to add a watermark to a PDF document depending on approval results.
To automate the action we can construct a flow that will run whenever a new document is uploaded to a SharePoint library.
If it’s approved then the flow will place a text watermark “Approved” to the PDF document, otherwise it will add a text watermark “Rejected”.
To place the watermark I’ll use a Documents action Add watermark to PDF.
I place the text watermark to the top right corner of the PDF document and the result looks like this:
The Power Automate flow:
Let’s take a closer look at the actions.
Our flow starts automatically when a file is created in a SharePoint folder.
Then I add a standart Power Automate action Start and wait for an approval.
After that I add a condition that checks the previous action Start and wait for an approval outcome value and performs a certain action depending on the value.
If the outcome value equals Approve the flow adds a text type watermark “Approved” to the top right corner of the PDF document.
Otherwise, it adds a text watermark “Rejected”.
Add watermark to PDF allows adding 3 types of watermark: Text, Image and PDF.
For our case, the most suitable one is a text watermark. Also, I specify the font color (“green” for an Approved document and “red” for Rejected) and opacity:
There are other advanced options. You can find more information in the documentations.
To start using the action you need to create a Documents API key. Please check out the instructions.
Finally, I create a new PDF document with a text watermark in a SharePoint document library.