In this guide, you’ll add image watermarks to a PDF or MS Office document using Power Automate and Muhimbi PDF Connector. Integrating the Muhimbi Power Automate connector unlocks robust and dynamic watermarking capabilities for your workflows.
It’s important to note that this guide shows how to add a simple image watermark to a file when it’s created in OneDrive. However, you can add image watermarks to files on other platforms like SharePoint, Google Drive, and Dropbox — or any platform supported by Power Automate. You can also extend our example by adding additional automation, like sending a watermarked PDF in an email.
Prerequisites
Before you start building the workflow, ensure all the prerequisites are in place:
- An Office 365 subscription with OneDrive for Business, SharePoint Online, and a Power Automate license.
- A full or free trial subscription to Muhimbi PDF Converter for Power Automate.
- The appropriate privileges to create flows.
Creating a Flow
Create a flow and find the When a file is created OneDrive for Business trigger. Using this trigger will allow you to start the flow when adding or modifying a property of a file in a folder.
In the action, specify the path to the folder to monitor for new items.
Getting File Content
Add the OneDrive for Business Get file content using path action to the Power Automate canvas and specify the path to the image you want to add as the watermark.
Adding the Image Watermark
Add the Muhimbi Add image watermark action to Power Automate and configure it as outlined below:
- Source file content — File content
- Image — Body
- Position — Top Left
- Width – 72
- Height — 72
- Source file name — File name
The following table is an overview of all the possible parameters you can set in the action.
Name | Key | Description |
---|---|---|
Source file name | source_file_name | Name of the source file including extension |
Source file content | source_file_content | Content of the file to watermark |
Image | image_file | Image content or URL |
Position | position | Watermark position on the page |
Width | width | Width of the watermark (in pts, 1/72 of an inch) |
Height | height | Height of the watermark (in pts, 1/72 of an inch) |
X Coordinate | x | X Coordinate when 'Position' is set to 'Absolute' (in pts, 1/72 of an inch) |
Y Coordinate | y | Y Coordinate when 'Position' is set to 'Absolute' (in pts, 1/72 of an inch) |
Layer | layer | Watermark layer |
Rotation | rotation | Angle of rotation |
opacity | opacity | Opacity in % (100 is fully visible and 1 is barely visible) |
Watermark background color | fill_color | Color in #RRGGBB notation |
Watermark outline color | line_color | Color in #RRGGBB notation |
Watermark outline width | line_width | Width of the watermark outline (in pts, 1/72 of an inch) |
Watermark start page | start_page | Number of the first page the watermark applies to |
Watermark end page | end_page | Number of the last page the watermark applies to |
Watermark page interval | page_interval | Which pages to display the watermark on (1=every page, 2=every other, etc.) |
Watermark page orientation | page_orientation | Orientation of pages the watermark applies to |
Print only | print_only | Tells if the watermark is only visible when the document is printed |
Watermark start section | start_section | The first section in a Word or Excel document where the watermark is visible |
Watermark end section | end_section | The last section in a Word or Excel document where the watermark is visible |
Watermark page type | page_type | One or more page types for Word and Excel documents, e.g. default |
Fail on error | fail_on_error | Fail on error |
Creating a File
To create a file, add the Create file SharePoint action to store the document in the SharePoint library using the following information:
- File Name > Base file name
- File Content > Processed file content
These are the output variables of the Add image watermark action.
Publish your flow and upload a file (e.g. DOCX, PDF, XLSX, or PPTX) to the folder that’s monitored by the configured OneDrive trigger. After a short wait, you’ll find the watermarked document in the destination document folder in SharePoint.