How to Encrypt and Password-Protect a PDF in Power Automate
Applying security policies to a PDF prevents unwanted document viewers from opening and accessing its contents.
In Power Automate, we can easily encrypt our PDF documents and lock them with a password using a Cloudmersive PDF connector action.
Walkthrough
In this walkthrough, we’ll set up a quick instant cloud flow in Power Automate that applies encryption & password protection policies to a PDF in our file system.
We’ll start by retrieving a PDF document from our file system using a Get file content action.
Next, we’ll add a new action and search for Cloudmersive connectors. We’ll scroll down until we find the Cloudmersive PDF connector on this list.
We’ll click “See more” to view the actions list, and from there, we’ll search for an action titled Encrypt, password-protect and set restricted permissions on a PDF.
After we select this action, we’ll need to create our Cloudmersive API connection.
We can use Cloudmersive connectors for free with a free API key. Free API keys allow a limit of 800 API calls per month with no additional commitments (once we reach our limit, our total will reset the following month).
After we’ve created our connection, we’ll add our PDF file bytes and file name to their respective parameters. We’ll then enter owner and reader passwords.
If we click “Show all” to view the advanced parameters, we’ll have the option to customize our encryption algorithm and set various restricted permissions for our PDF.
We’ll now add an Update file action to our flow and replace the original PDF file bytes with the encrypted & password-protected file bytes.
Just like that, we’ve applied custom security policies to our PDF document, ensuring unsolicited document viewers can’t access the PDF contents.