Add Image Watermarks to Documents Using Power Automate

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.

when a file is created

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.

get file content

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

add image watermark

The following table is an overview of all the possible parameters you can set in the action.

NameKeyDescription
Source file namesource_file_nameName of the source file including extension
Source file contentsource_file_contentContent of the file to watermark
Imageimage_fileImage content or URL
PositionpositionWatermark position on the page
WidthwidthWidth of the watermark (in pts, 1/72 of an inch)
HeightheightHeight of the watermark (in pts, 1/72 of an inch)
X CoordinatexX Coordinate when 'Position' is set to 'Absolute' (in pts, 1/72 of an inch)
Y CoordinateyY Coordinate when 'Position' is set to 'Absolute' (in pts, 1/72 of an inch)
LayerlayerWatermark layer
RotationrotationAngle of rotation
opacityopacityOpacity in % (100 is fully visible and 1 is barely visible)
Watermark background colorfill_colorColor in #RRGGBB notation
Watermark outline colorline_colorColor in #RRGGBB notation
Watermark outline widthline_widthWidth of the watermark outline (in pts, 1/72 of an inch)
Watermark start pagestart_pageNumber of the first page the watermark applies to
Watermark end pageend_pageNumber of the last page the watermark applies to
Watermark page intervalpage_intervalWhich pages to display the watermark on (1=every page, 2=every other, etc.)
Watermark page orientationpage_orientationOrientation of pages the watermark applies to
Print onlyprint_onlyTells if the watermark is only visible when the document is printed
Watermark start sectionstart_sectionThe first section in a Word or Excel document where the watermark is visible
Watermark end sectionend_sectionThe last section in a Word or Excel document where the watermark is visible
Watermark page typepage_typeOne or more page types for Word and Excel documents, e.g. default
Fail on errorfail_on_errorFail 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 workflow

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.

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more