How to Watermark Inbound PDF Email Attachments in Power Automate

Cloudmersive
4 min read1 day ago

--

Creating a PDF watermark isn’t as difficult as it sounds. We don’t even need to open a dedicated PDF reader to do it — we can automate the entire process starting from the moment we receive the PDF we need via email.

Automating this process in Power Automate will save us a lot of valuable time if we’re frequently receiving PDF attachments, saving those attachments, opening those files in a PDF reader, and applying custom watermarks before exporting/updating the modified file. We can handle this workflow in Power Automate in 4 total steps using Office 365 Outlook, SharePoint, and Cloudmersive PDF connector actions.

We’ll start by creating an Automated cloud flow using the When a new email arrives (V3) trigger.

We’ll configure our trigger action to check for emails from one or more senders (in this case, just one), and we’ll make sure those emails have attachments. We don’t want to trigger this flow without any attached files.

We’ll next create a Condition that checks the Attachments Name value from our trigger step for “.pdf” extensions. This filters out non-PDF attachments.

When we select the Attachments Name value, Power Automate will place our Condition in a For each control to account for multiple attached files in any given email.

In the True branch of our condition, we’ll add our PDF watermark action.

We’ll find this action by first locating the Cloudmersive PDF connector. Once we find it, we’ll select the Add a text watermark to a PDF action from the actions list.

After we select this action, we’ll create our connection. We’ll name our connection and use a free Cloudmersive API key to authorize our connection (free API keys allow 800 API calls/month; we can get one by creating a free account on the Cloudmersive website).

We’ll then configure our Add text watermark to PDF action by entering our custom watermark text along with Attachments Content and Attachments Name values from our email trigger step.

In the Advanced parameters, we’ll find options to customize the font name, size, color, and transparency of our watermark text. In this example flow, we’ll ignore the customization options — but we can use these fields in the future to ensure our watermark is on-brand.

We’ll now wrap up our flow with a Create file action. We’ll write the watermarked PDF attachment to a SharePoint folder.

In this example, we’ll re-use the Attachments Name value to name our watermarked PDF file. We’ll add “watermarked” before the name string to avoid confusion with the original.

We’ll now save our flow and run a test. Since we’re testing an Automated cloud flow, we’ll send ourselves a PDF document to initiate the test.

When our flow finishes running, we’ll find the watermarked PDF we selected in our SharePoint folder.

With the default watermark font settings, we’ll find a watermark that looks like the below example:

Conclusion

And that’s all there is to it! In 4 steps, we created a flow that triggers from emails sent to us with attachments, checks the attachments for PDFs, watermarks the PDFs, and saves the updated files in a SharePoint folder.

We’ll cover many more easy workflows using Cloudmersive and Office 365 connectors in Power Automate moving forward — be sure to give us a follow!

--

--

Cloudmersive
Cloudmersive

Written by Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

No responses yet