Encrypted PDFs in Dropbox Automation

Encrypted PDFs in Dropbox Automation

Do you store sensitive or confidential documents in Dropbox and worry that they're not protected enough? Luckily, we've developed an automation that adds an extra layer of protection to your Dropbox documents by encrypting them. In this blog post, we'll walk you through setting up a powerful automation workflow using Dropbox and 0CodeKit.

How to set up this automation

Step 1: Automation platform

Sign up or log in to an automation platform (Make, Zapier, or n8n) and create a new scenario.

Step 2: Watch files

Add a Dropbox module with the "Watch Files" event so that Dropbox can detect when new files are added to a specific folder. Ideally, create a folder for sensitive or confidential files that need to be encrypted. Then, set up the module:

  • Folder Search Method: Select "Select from List."
  • Folder Path: Look for and select the folder containing the confidential documents.
  • Watch also subfolders: Select "Yes" if there are subfolders that also need to be examined.
  • Limit: Set the maximum number of results to be processed during one execution cycle.

Step 3: Download a file

Add another Dropbox module with the "Download a File" event. This will allow Dropbox to download the documents from the specified folder and send them to the next module. Then, set up the module.

  • Way of selecting files: Select "Map a file path."
  • File Path: Insert the "Path lower" item from the "Watch Files" module.

Step 4: Encrypt PDF

Add a 0CodeKit module with the "Encrypt PDF" event. This will allow 0CodeKit to take the downloaded documents and encrypt them. Then, set up the module:

  • URL or Buffer of the PDF File: Select "Buffer."
  • File: Choose the "Dropbox - Download a File" option.
  • Get As a URL: Choose the most convenient option for you.
  • User Password: Set a user password to allow other users to access the encrypted documents.
  • Owner Password: Set a password to access the document.

Step 5: Upload a file

Add another Dropbox module with the "Upload a File" event to upload the encrypted documents back to Dropbox. Then, set up the module:

  • Folder: Select the folder to which the encrypted documents will be uploaded.
  • File: Select "Map."
    • File Name: Give the encrypted document a name.
    • Data: Insert the "Data" item from the "Encrypt PDF" module.

Step 6: Delete a file/folder

Add another Dropbox module with the "Delete a File/Folder" event to delete the original, unencrypted file and prevent unauthorized access.. Then, set up the module:

  • Way of selecting files/folders: Select "Map a file/folder path."
  • File or Folder Path: Insert the "Path lower" item from the "Watch Files" module.

Step 7: Set up some filters

Setting some filters will make this automation flow more

Filter 1: PDF?

Set up a filter between the "Watch Files" and "Download a File" modules to ensure that the documents passed on to 0CodeKit are PDFs. Otherwise, 0CodeKit will not be able to process them. The following is needed to set up the filter:

  • Label: Give the filter a name.
  • Condition: Insert the "Name" item from the "Watch Files" module into the first empty field. Next, set up a text operator to "End with (case insensitive)" and enter ".pdf" in the second empty field.

Filter 2: Downloaded?

To ensure that the PDFs have been downloaded, set up a filter between the "Download a File" and "Encrypt PDF" modules. The following is needed to set up the filter:

  • Label: Give the filter a name.
  • Condition: Insert the "Data" item from the "Download a File" module into the first empty field. Next, set up the basic operator to "Exists."

Filter 3: Encrypted?

To ensure that the PDFs have been encrypted correctly, set up a filter between the "Encrypt" and "Upload a File" modules. The following is needed to set up the filter:

  • Label: Give the filter a name.
  • Condition: Insert the "Data" item from the "Encrypt PDF" module into the first empty field. Next, set up the basic operator to "Exists."

Filter 4: Uploaded?

To ensure that the PDFs have been uploaded correctly, set up a filter between the "Upload a File" and "Delete a File/Folder" modules. The following is needed to set up the filter:

  • Label: Give the filter a name.
  • Condition: Insert the "File/Folder ID" item from the "Upload a File" module into the first empty field. Next, set up the basic operator to "Exists."