This flow protects with a password each PDF document added to the Demo folder in your OneDrive account. The password-protected PDF documents are then stored in the Protected folder.
This flow results in a password protected file like this one. The password to open the sample document is s3cr3t.
After following the steps, your flow will look like this:
When a file is created (Trigger)
To start the flow, use the When a file is created trigger in the OneDrive for Business connector. If you use your personal OneDrive account, use the OneDrive connector instead.
- Folder: /Demo (or any other that you want to use)
Password Protect PDF
- File Content: File Content (dynamic field from the trigger)
- Password: s3cr3t
To save the password-protected PDF document in OneDrive, add a Create file action in the OneDrive for Business connector.
- Folder Path: /Protected (Must be different from the input folder to avoid a loop)
- File Name: File Name (from the trigger) with -password-protected.pdf appended
- File Content: Password Protected PDF File Content (from the Password Protect PDF action)