Go to Page

Add a password to a PDF

Encrypt a PDF so it requires a password to open, in a Power Automate flow. No code to write, and no document is stored after the run.

Use this action to encrypt and protect a PDF document with a password to prevent unauthorized access.

Add a password to a PDF
ParametersSettingsCode viewTestingAbout
File Content
File Content
Password
The password required to open the file
Add a password to a PDF.

Some parameters below are rolling out to the published PDF Blocks connector and may not appear in your environment yet. To use them today, import the connector from GitHub as a custom connector.

Parameters

File ContentFilerequired

The content of the input PDF document.

PasswordStringrequired

The password required to open the file. The length is between 4 and 32 characters. The characters in the password must be in the ASCII printable range (between positions 32 and 126). This range includes lowercase and uppercase letters, numbers, space, and some commonly used symbols like . , : ; # $ % & ( ) * + = ? !

Encryption AlgorithmStringdefault:AES-128

The algorithm used to encrypt the PDF document. This field is optional. Valid values are AES-128 and AES-256.

Response

Password Protected PDF File ContentFile

The content of the password protected PDF document. You can use it as an input to other actions in your flow.