JSCAPE
  • Products
    • Managed File Transfer
    • JSCAPE SaaS
    • MFT Gateway
    • MFT Monitor
    • All Products
  • Solutions
    • All Solutions
    • Secure File Transfer
    • AS2 Server Software
    • File Synchronization
    • Reverse Proxy
    • Compliance
    • DMZ Streaming
  • Pricing
  • Company
    • Blog
    • Company
    • Contact Us
    • Clients
    • Case Studies
    • Testimonials
    • Certifications
  • Support
    • Help Desk
    • Documentation
    • Customer Downloads
Get a demo

How to automatically decrypt PGP-Encrypted files upon upload

Words by

John Carl Villanueva

Overview Whenever PGP files uploaded to your server happen to contain data needed for business processes, you might want to have those files decrypted automatically. That way, they can then be forwarded to the applications waiting to process them. JSCAPE MFT Server has an easy way of doing that and it’s what we’re going to…

Published in:

Blog

/

Business Process Automation, JSCAPE MFT, Managed File Transfer, Secure File Transfer, Triggers, Tutorials

Overview

Whenever PGP files uploaded to your server happen to contain data needed for business processes, you might want to have those files decrypted automatically. That way, they can then be forwarded to the applications waiting to process them. JSCAPE MFT Server has an easy way of doing that and it’s what we’re going to show you today.

What we’d like to do

Figure 1

pgp_decrypt_for_business_processes

How to do it

In a nutshell, this method consists of creating a trigger that:

1. Listens to a file upload event,

2. Limits the succeeding action to files that end with “pgp” (the file extension of most PGP files), and

3. Executes a trigger action that decrypts the file that was uploaded.

Let’s walk you through those steps now.

1. Create a trigger

Go to the Triggers module and click the Add button to create a new trigger.

Figure 2

01-mft-server-pgp-decrypt-upon-upload

2. Select the “File Upload” Trigger Event Type

Start by assigning a name to this trigger. Use something descriptive, like “Auto Decrypt PGP Files for Processing”.

After that, expand the Event type drop-down list and select File Upload.

Click the Next button to proceed.

Figure 3

02-mft-server-pgp-decrypt-upon-upload

3. Enter a Trigger Condition that limits the trigger to PGP files

For this example, we would like the decryption action to be carried out only if the following conditions are met:

✔ The file upload was successful, and

✔ The uploaded file has a “pgp” extension, which would mean it is a PGP-encrypted file.

This can be expressed using this logical expression:

(Success = TRUE) AND (LocalPath ~ “.*\.pgp”)

wherein LocalPath is one of the variables pertinent to this particular trigger (the event type determines what variables are generated) and the expression that follows the ~ is what we call a regular expression.

Enter the logical expression into the Trigger Conditions box and then click Next.

Figure 4

03-mft-server-pgp-decrypt-upon-upload

4. Add the “PGP Decrypt File” Trigger Action

Click the Add button to add the decrypt trigger action to this trigger.

Figure 5

04-mft-server-pgp-decrypt-upon-upload

Select the PGP Decrypt File trigger action from the drop-down list and then click OK.

Figure 6

05-mft-server-pgp-decrypt-upon-upload

Because we want JSCAPE MFT Server to decrypt the file that was recently uploaded, we simply enter %LocalPath% into the File text box. %LocalPath% is a variable that holds the complete path of the file that was recently uploaded.

You can then enter the destination path of the resulting decrypted file. For now, let’s just leave that entry blank. This would tell the system to simply place the decrypted file in the same directory as the source file (the uploaded file).

Next, tick the Private Decryption Key checkbox and then select the decryption key from the drop-down list. If you don’t know how to generate OpenPGP keys for your server, read the article “3 Ways To Generate OpenPGP Keys“.

Notice that check box labeled Delete Source? If you leave that unchecked, JSCAPE MFT Server will simply retain the source file after creating a decrypted version. Check out Figure 8 to see what we mean. The right panel of AnyClient contains both the uploaded file (which is encrypted) and its decrypted version.

Click OK when done.

Figure 7

06-mft-server-pgp-decrypt-upon-upload

Figure 8

08-mft-server-pgp-decrypt-upon-upload

5. Finalize the Trigger

Once you’re through clicking all the OK buttons and are back at the main screen, don’t forget to click the Apply button. That will finalize your trigger creation process.

07-mft-server-pgp-decrypt-upon-upload

That’s it. Every time someone uploads a file that was encrypted by one of your managed file transfer server’s OpenPGP public keys, your server will be able to automatically decrypt it.

Please note that your server’s decryption key can only decrypt files encrypted by its corresponding public key.

You might also want to read…

3 Ways To Generate OpenPGP Keys

You Know It’s Time To Implement Server To Server File Transfer When..

How To Automatically PGP-Encrypt A File Upon Upload Using Triggers

Recommended download

Want to try this out yourself? Download the free evaluation edition of JSCAPE MFT Server now.

Download JSCAPE MFT Server

Easy To Deploy, Easy To Administer, Easy To Manage

Ready to see how JSCAPE makes managed file transfer so much simpler? Schedule your demo now.

Request a demo

Popular Articles

View more by

JSCAPE
  •  
    1–2 minutes
    23/09/2025

    JSCAPE by Redwood, version 2025.3: New UI continues to make a splash

    Dive back into JSCAPE by Redwood with version 2025.3, bringing more modern UI updates to make using and navigating JSCAPE more intuitive. 

    Read article

  •  
    1–2 minutes
    19/08/2025

    Weathering the economic storm: Expert support is your enterprise file transfer system’s lifeline

    The global economic landscape can be described by one word: “uncertain”. Lingering effects from the 2020 pandemic, combined with new waves of international tariffs throughout 2025, have…

    Read article

  •  
    1–2 minutes
    30/07/2025

    Escape the grip: Why flexible MFT is key to enterprise agility

    Break free from costly vendor lock-in Let’s be blunt: some MFT vendors have built product suites that are less about true partnership and more about proprietary siloing.…

    Read article

  •  
    1–2 minutes
    23/07/2025

    Avoid downtime and threat actors: Getting the best of both worlds in MFT

    For enterprise organizations relying on managed file transfer (MFT) solutions, cybersecurity often feels like an arms race. The need to patch MFT software vulnerabilities to prevent breaches…

    Read article

Related Content

Read more about

JSCAPE MFT
  •  
    1–2 minutes
    30/07/2025

    Escape the grip: Why flexible MFT is key to enterprise agility

    Break free from costly vendor lock-in Let’s be blunt: some MFT vendors have built product suites that are less about true partnership and more about proprietary siloing.…

    Read article

  •  
    1–2 minutes
    03/07/2025

    Consolidate, deploy and thrive: JSCAPE’s formula for MFT success in uncertain times

    Global enterprises today are navigating a landscape marked by significant economic volatility. Fluctuating markets, shifting trade policies and persistent economic uncertainty are compelling enterprise organizations to reevaluate…

    Read article

  •  
    1–2 minutes
    31/03/2025

    SFTP vs. FTPS: Which file transfer software is best for business use?

    What is SFTP? SFTP is a file transfer protocol that’s normally packaged with Secure Shell (SSH), the network protocol most IT administrators use to access and manage…

    Read article

  •  
    1–2 minutes
    25/03/2025

    EDI integration with trading partners: 6 best practices

    Many large companies with high-volume transactions, especially those involved in e-commerce, manufacturing and retail supply chains, have long migrated from manual processes to Electronic Data Interchange (EDI).…

    Read article

Company

  • About Us
  • Contact Us
  • Clients
  • Case Studies
  • Testimonials
  • Privacy Policy
  • Certifications

Resources

  • Managed File Transfer
  • Secure File Transfer
  • Secure FTP Server
  • AS2 Server
  • Reverse Proxy
  • File Upload Processing
  • What Is An AS2 Server?

Support

  • Help Desk
  • Documentation
  • Customer Downloads
JSCAPE

Copyright © 2025 JSCAPE

  • Privacy Policy
  • Cookie Settings