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

Uploading a 2nd file only if the 1st succeeds – using 2 triggers

Words by

John Carl Villanueva

Overview In this tutorial, we’ll show you how to set up automated file transfers wherein a second file is uploaded only if the first upload succeeds.

Published in:

Blog

/

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

Overview

In this tutorial, we’ll show you how to set up automated file transfers wherein a second file is uploaded only if the first upload succeeds.

What we want to do

How to do it

To achieve this, we would need two triggers. One trigger would upload the first file, while the second trigger, which should depend on the success of the first upload, will upload the second file.

For this particular example, let’s just assume the first trigger is designed to carry out a scheduled file transfer. Since we already wrote several tutorials for setting up a scheduled file transer, there’s no need to discuss it here. Here are some of those tutorials for reference:

Benefits of a Scheduled File Transfer and How To Set One Up

Scheduling an Automated File Transfer for Files Matching a Regex

How To Set Up A Scheduled Automatic Download With A Trading Partner

Securing Trading Partner File Transfers w/ Auto PGP Encryption & FTPS

How To Get Your MFT Server To Email You About Last Night’s Download

Once you’ve created the trigger that would execute the scheduled file transfer, the next thing would be to create a trigger that listens to the External File Upload trigger event type. This event occurs whenever a file is uploaded as a result of a trigger action.

Because a scheduled file upload is normally the result of a trigger action, then that upload should fire an External File Upload event.

Creating the trigger for the second upload

Let me now walk you through the steps of creating the second trigger.

Add a new trigger, give it a descriptive name, and assign it the External File Upload trigger event type. After that, click Next.

In a production environment, you’ll likely have several trigger-initiated uploads. Thus, you would need to customize your second trigger to filter out unrelated uploads. You can do this by adding expressions in the Trigger Conditions dialog.

For, example, you can let this trigger act only on a previous upload if the upload was directed at a specific server IP address (say 192.168.100.103) and involved a specific filename (say main.txt). Unless the previously uploaded file was main.txt AND the destination server was 192.168.100.103, this trigger would not proceed. You can find a list of accepted variables, functions, constants, and operators by clicking their respective buttons (see screenshot below).

After entering the expressions, click the Next button.

Now it’s time to add the trigger action that would upload the second file. Click the Add button to do that.

Select the file upload trigger action you want to use. There are upload trigger actions for various file transfer protocols. In our case, let’s just use the SFTP File Upload trigger action. Click OK to proceed.

You will then be asked to enter certain parameters such as the destination server’s hostname/IP address, the port number, the user account’s username, that account’s corresponding password, and so on. Fill up the fields with the required values. It’s also at this juncture that you would need to specify the second file you want to upload. Let’s say that file is named “ok.txt”.

Once you’re done, just click the OK button. You may need to click additional OK buttons until you get back to the main screen. As soon as you’re back at the main screen, don’t forget to click the Apply button to finalize the trigger.

Notice that when entering the trigger action parameters, you could have specified any server you wanted (as long as you have an account on it, of course). Thus, the destination server could have been the same server where the first file was uploaded or it could have been another server.

That’s it.

Think this is too long or too complicated? Here’s a shorter way:

Uploading a 2nd File Only If The 1st Succeeds – Using 1 Trigger

Get Started

This tutorial was created using JSCAPE MFT Server, a managed file transfer server built for secure, automated file transfers. If you’d like to follow the steps on this tutorial but don’t have a running installation of JSCAPE MFT Server, you can download a free, fully-functional evaluation edition now.

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