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 set up automated AS2 file transfers

Words by

John Carl Villanueva

Overview In an earlier quickstart guide to setting up an AS2 server, we featured a manual method for sending EDI messages. Because EDI transactions are best carried out automatically, we thought it would be a good idea to show you how to implement real-time transactions on the same solution we used in that post. AS2…

Published in:

Blog

/

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

Overview

In an earlier quickstart guide to setting up an AS2 server, we featured a manual method for sending EDI messages. Because EDI transactions are best carried out automatically, we thought it would be a good idea to show you how to implement real-time transactions on the same solution we used in that post.

AS2 (applicability statement 2) uses public keys and private keys to encrypt files being transferred between IP addresses. With AS2, security, authentication, message integrity and privacy are ensured with encryption, digital certificates and nonrepudiation techniques. AS2 provides greater security for your EDI data than standard FTP, supporting synchronous and asynchronous MDN (message disposition notification) and digital signatures.

Plus, with JSCAPE’s AS2 server you can send files regardless of file size and content type.

Getting Started

Would you prefer to watch a video version of this tutorial instead? You can play the video below. Otherwise, just continue reading.

Since this is a continuation of the previous article, click the link above to gather some context before continuing.

Ready? Let’s get started.

There are many ways to automate AS2 file transfers on JSCAPE MFT Server. In this example, we’re going to configure a Directory Monitor that captures inbound file additions and a trigger that responds to the Directory Monitor File Add event type.

A Directory Monitor allows you to capture events on local directories behind your firewall. For instance, a directory monitor can detect when a file is added, when a file is deleted, or when a file undergoes changes. The monitor we’re about to create will be monitoring a directory for any new file additions.

This can be useful in cases where, as part of a business process process, an EDI document is placed into the monitored directory for transmission.

As soon as our server detects that a file has been added into the monitored directory, it will automatically grab that file and forward it to the designated trading partner through an AS2 connection.

directory_file_add_for_as2_file_transfer.png

Creating The Directory Monitor

It’s now time to create the directory monitor in question. Go to the Directory Monitors menu and click the Add button.

directory monitor add for automated as2

Give the monitor a name, e.g. “DM for tp2as2”. After, that, click the Browse button, navigate to the directory you want to monitor and select it. After you do that, the Directory field will then be populated with the path to that directory (e.g. C:\foruploads)

Note that the Monitor interval is set to 600 seconds. That means, the monitor will check the monitored directory every 600 seconds. You may adjust that value to meet your organization’s needs.

add directory monitor parameters for automated as2

Make sure the Monitor file add checkbox is ticked and then click OK. These settings will allow this directory monitor to fire a Directory Monitor File Added event once a newly added file is detected.

monitor file add on directory monitor for automated as2

If you want that directory monitor to activate on a pre-set schedule, say, every 8:30 AM on the second day of each month or every night at 9:30 PM, you can also do that. Check out these posts later if you want to see how to implement those:

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

How To Delete Old Files From Your Server

Let’s proceed.

After clicking OK, you should then see your newly created directory monitor in the Directory Monitors tab.

newly added directory monitor for automated as2

Creating The Trigger

We’re now ready to create a trigger that would respond if a file is added to the monitored directory.

Go to the Triggers menu and then click the Add button.

add trigger for automated as2

Give the trigger a name (e.g. “upload to tp2as2”) and then select the Directory Monitor File Added event type.

Click Next to proceed.

add trigger parameters for automated as2

In a production environment, it’s possible to have several directory monitors that throw the Directory Monitor File Added event type. To make this trigger act only on an event thrown by the directory monitor we created earlier, you can specify that monitor in the Trigger Conditions box like this:

MonitorName = “DM for tp2as2 uploads”

This is the name we assigned to our directory monitor.

MonitorName is just one of the many variables you can use in this context. To know which variables are available for a particular trigger, just click the Variables button found near the bottom-left of the screen.

Click Next to proceed.

trigger conditions for automated as2

In the succeeding screen, click the Add button to add a new Trigger Action. This will tell JSCAPE MFT Server what action this trigger should carry out in response to the Directory Monitor File Added event. Because we want it to forward the newly added EDI document file to an existing AS2 trading partner, select the Trading Partner File Upload action from the drop-down list. Click OK.

trading partner file upload trigger action for automated as2

When the Trading Partner File Upload action parameters dialog appears, do the following:

  1. Select the trading partner from the Partner drop-down list (in our case, that would be “tp2as2”, which was defined in the previous article).
  2. Enter the %File% variable (or click the Add Variable button and select File) into the Local File field. In this context, the %File% variable holds the complete path of the file that was added into the monitored directory. The variables supported by a particular trigger action depends on the trigger event used. To know which variables are supported, just click the Add Variable button.
  3. Click OK

trading partner file upload action parameters for automated as2

Reqeust Your Free Trial

Would you like to try this yourself? JSCAPE MFT Server is platform-agnostic and can be installed on Microsoft Windows, Linux, Mac OS X and Solaris, and can handle any file transfer protocol as well as multiple protocols from a single server. Additionally, JSCAPE enables you to handle any file type, including batch files and XML.

Request your free trial of JSCAPE MFT Server.

Related Content

How To Setup An AS2 Server With JSCAPE: A QuickStart Guide

What Is AS2 Protocol? How To Use Applicability Statement 2

How To Set Up A HTTPS File Transfer: HTTPS File Sharing

How To Set Up An HTTP File Transfer

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