OpenPGP on File Upload Event Rule

For this example, we will create an Event Rule to trigger when a file is uploaded to the destination folder of the Folder Monitor Rule created in the previous example. We want this Event Rule to do the following:

  1. Decrypt the uploaded encrypted file.

    • If the Action failed to decrypt the file, then:

      1. Send email notification

      2. Write to Windows Event Log

Prerequisites

  • Private OpenPGP key (part of original keypair)

  • Email address for notification

To create a File Upload Event Rule

  1. Create a new Rule.

  2. Select the File Uploaded event trigger and name the Rule.

  3. Add the File Name Condition to the Rule.

  4. Configure the File Name Condition to trigger only on files with the PGP extension.

  5. Add the OpenPGP Action.

  6. Configure the OpenPGP action to Decrypt.

  7. Add the Send notification email Action under the if action failed Condition.

  8. Configure the email as desired.

  9. Add the Write to Windows Event Log Action.

  10. Specify which variables to write to the Event Log, such as the file name.

  11. Click Apply to save the Event Rule.