How to Watermark an Excel to PDF Report in Power Automate
Combining Excel & PDF workflows in Power Automate can save us meaningful time in the long run.
If we’re planning to convert our Excel spreadsheets to PDF and watermark them as “confidential” somewhere along the way — why not combine both operations into a single workflow?
We can handle that easily with a pair of Cloudmersive connectors in Power Automate. Specifically, we can convert our Excel spreadsheets to PDF using an action available on the Cloudmersive Document Conversion connector, and we can subsequently create a custom watermark for that PDF report using the Cloudmersive PDF connector.
Let’s see how this works in a basic Instant cloud flow!
Getting started: picking an Excel report to convert
We’ll only perform this pair of flow actions on one Excel file in the below walkthrough flow. In this example, we’ll use an Excel report with some annual and quarterly financial reporting & graphs:
Get the Excel file from your system in Power Automate
In our Power Automate flow, we’ll start by using a Get file content action to retrieve our Excel file bytes from SharePoint.
Find the Cloudmersive Document Conversion connector
Next, we’ll add the Excel to PDF conversion action into our flow. We’ll find this action by searching for Cloudmersive connectors, locating the Document Conversion connector (with the green logo), and then searching Convert Excel XLSX Spreadsheet to PDF from the full actions list.
Get a free Cloudmersive API key to authorize connections
After we select this action, we’ll create our Cloudmersive Document Conversion API connection. To do that, we’ll just need a free API key, which we can get by registering a free account on the Cloudmersive website (these allow a limit of 800 API calls/month with no commitments).
With our connection created and authorized, we’ll pass arguments to our two request parameters. We’ll use dynamic content from our Get file content action in the first field, and we’ll then enter a random name in the second field (if we want, we can copy the file name from our Get file content step, but we don’t need the real file name in our API request header).
Now that we’ve converted our Excel file contents to PDF contents, we’ll watermark the PDF with our next Cloudmersive action.
Find the PDF connector
We’ll find this action by once again searching Cloudmersive connectors; this time, however, we’ll locate the Cloudmersive PDF connector with the pink logo, and we’ll search the PDF connector actions list for the Add a text watermark to a PDF action.
We’ll need to create a connection for this connector too. We’ll use the same API key we created for the prior connector.
Create a custom PDF watermark
To configure our Watermark PDF request, we’ll first enter the text we’d like to see appear across our PDF report page. In this example, we’ll use the string “Watermark”.
We’ll then pass our converted file bytes from the Excel to PDF conversion action as our Input file argument, and we’ll once again use a random name in the file name field.
Next, we’ll click “Show all” to enumerate our Advanced parameters.
In the Advanced parameter section of our request, we’ll find the option to customize the appearance of watermark text on our Excel to PDF report document.
As we can see in the above screenshot, we have the option to select the font family, size, color, and transparency of our PDF watermark. If we leave these fields blank, our watermark will default to Times New Roman, size 150, red, and 0.5 transparency; we’ll leave them all at their defaults in this example.
In the final step of our flow, we’ll add a Create file action to save the watermarked version of our Excel to PDF report in a SharePoint folder.
We’ll use OutputContent from our Watermark PDF action to define our new file’s contents.
Run a test & review the watermarked Excel to PDF report
We’ll now save our flow and run a test, which will place the new PDF in our SharePoint folder.
Just like that, we’ve generated a watermarked PDF containing reports & graphs from our original Excel spreadsheet!
Conclusion
In this article, we learned how to combine the process of converting Excel reports to PDF & applying a watermark to those reports into a single Power Automate flow using the Cloudmersive Document Conversion and PDF connectors.
If you found this walkthrough helpful & you’re interested to see more time-saving Power Automate walkthroughs, be sure to give us a follow and check in on our daily blog!