Example Workflows
Each workflow below is one complete Automation, with its trigger, its nodes in order, the settings each node needs, and what run detail shows when it runs. Replace the folder paths, partner names, and file layouts with your own.
Delivering Payment Files to a Bank, With a Quarantine Path
A company's customers upload payment files as CSV to /inbound/payments/, and the bank that processes them requires its own column layout, GPG encryption with its key, and delivery to its SFTP server.
The trigger is File Action with Create on /inbound/payments/. A Transform node runs a script with output csv that maps each row to the bank's layout, with Destination Path set to /outbound/{{ attributes.name }}. An Encrypt With GPG node encrypts the written file with the bank's public key, and a Copy File node copies the encrypted file to the folder of the Remote Server Mount for the bank's SFTP server. A second Copy File node, connected to the trigger, copies each original to /archive/%Y/%m/, so the archive branch runs in parallel with the delivery branch.
The Transform node has one Error Handling rule, processing-failure set to Continue, and a Move File node on its Error path moves each file the script could not process to /quarantine/. In run detail, a run with one malformed file shows the Transform node with one item on its Error path and every other file on its main path, the quarantine Move File node with one item, and the run status Partial Failure, because the failure was handled.
Receiving an X12 Purchase Order From an AS2 Partner
A distributor's partners send purchase orders as X12 over AS2, and each order has to reach the order system as JSON, with the original kept for the audit trail.
Files.com writes each received AS2 file into the partner's inbox folder and records the message's identities on the file as Custom Metadata. The trigger is File Action with Create on that folder. A Switch node routes each file by its sender, with a rule per partner such as attributes.custom_metadata.as2_from == "ACME-AS2", so one Automation serves every partner and the Default path receives a file from a sender nobody configured. On each partner's path, a Transform node runs a script that reads the interchange as segments and returns the order in the layout the order system reads, with output json and a destination under /erp/inbound/. A Move File node then moves the original X12 file to /archive/edi/%Y/%m/.
The Transform node has one Error Handling rule, processing-failure set to Continue, and a Send Email node on its Error path tells the EDI team which partner sent a file the script could not read.
In run detail, the Switch node shows how many files each partner sent, and the AS2 transmission itself is recorded in the AS2 Logs rather than in the run.
Collecting and Decrypting Files From a Partner's Server
A payer drops encrypted claim files on their own SFTP server several times a day, and they have to be decrypted and delivered to the claims system without anyone monitoring the folder.
The partner's server is connected as a Remote Server Mount, so its folders have Files.com paths. The trigger is Scheduled on a fifteen-minute interval, with Folder Path on the mounted pickup folder and Incoming File Pattern *.pgp. A Decrypt With GPG node decrypts each file with your private key, writing the result under /claims/incoming/. A Filter node passes on only the files whose parsed contents include a payer identifier, and a Copy File node copies each one to the claims system's pickup folder. A Delete File node then removes the encrypted original from the partner's server, so the next run does not collect it again.
The Decrypt With GPG node has a * rule set to Continue and a Move File node on its Error path that moves any file it could not decrypt to /claims/quarantine/, which is where a file encrypted for a key you have not loaded ends up.
In run detail, a fifteen-minute interval with nothing new shows a run with the status Skipped, and a run that collected six files shows six items on each node until the Filter node's count drops.
Writing Values From a File to Its Metadata, Then Routing It
An insurer receives claim files as JSON, and the claims team wants the customer and amount visible as metadata in the File Manager without opening each file, with large claims routed to review.
The trigger is File Action with Create on /claims/incoming/. A Set Metadata node writes two keys, customer with the value {{ payload.customer }} and amount with the value {{ payload.amount }}. An If node with the condition payload.amount > 10000 routes each file, and a Move File node on the True path moves it to /claims/review/ while a Move File node on the False path moves it to /claims/approved/.
The two keys are then Custom Metadata on each file, searchable as columns in the File Manager. In run detail, the If node shows how many files took each path.
Unzipping an Emailed Archive and Delivering Its Files
A partner sends a ZIP archive of documents by email each week, and each document is delivered to another partner over AS2 and then moved to a dated folder.
The trigger is Incoming Email, with the sending partner's address in Allowed Senders. An Unzip node extracts the attachment to the destination /partner/incoming/, which writes the extracted files to a folder on your site, because an email attachment exists only inside the run. A Send via AS2 node sends each extracted file to the receiving partner, and a Move File node moves each sent file to /partner/sent/%Y-%m-%d/.
In run detail, the Unzip node's Outputs list one file per document in the archive, and the Send via AS2 node records the outcome of one message per file.
A Delivery Sequence Shared by Several Automations
Three Automations deliver files to the same bank, and the delivery steps are maintained in one place.
An Automation named Deliver to Bank has a Manual trigger, an Encrypt With GPG node with the bank's key, a Copy File node to the bank's Remote Server Mount folder with Return From Automation selected, and a Send Email node after the Copy File node that notifies the treasury team. Each of the three Automations ends with a Run Automation node that selects Deliver to Bank and its current Revision. One is a File Action Automation that transforms payment files first, one is a Scheduled Automation that zips a day's statements, and one has a Webhook trigger.
When the delivery steps change, Deliver to Bank is edited once, and each of the three Automations is updated to the new Revision. In run detail, each calling Automation's run shows its Run Automation node, and Deliver to Bank's Run Logs do not list the calling Automations' runs.
Validating Files Before Delivery
Files for a partner must have an account number on every row before they are sent, and a file that fails the check is moved to a review folder instead.
The trigger is Scheduled, with Folder Path /partner/outbound/ and Incoming File Pattern *.csv. An If node with the condition payload every($.account != null and $.account != "") evaluates each file's parsed rows. On the True path, a Send via AS2 node sends the file and a Move File node moves it to /partner/sent/. On the False path, a Move File node moves the file to /partner/rejected/ and a Send Email node sends the partner manager one email per rejected file, with {{ attributes.name }} in the subject.
In run detail, the If node shows how many files took each path, and a run in which every row of every file has an account number shows the rejected branch's Move File and Send Email nodes as Skipped.
Reconciling a Bank Remittance Against Open Invoices
A finance team receives a daily remittance file from its bank and needs to know which open invoices it settles and which payments match no invoice.
The trigger is File Action with Create on /bank/remittance/. One branch reads the remittance, where a Transform node returns its rows so that each payment becomes one data item. A second branch, connected to the same trigger, reads the open-invoice export the accounting system writes to /finance/open-invoices/, with an Import File node and a Transform node that returns its rows the same way. A Join node takes the payments on its Left input and the invoices on its Right, with payload.invoice_number as both keys and the join type left, so every payment is passed on whether or not it matched.
An Aggregate node combines the matched and unmatched pairs into one data item, a Transform node with output csv and a destination under /finance/reconciliation/%Y-%m-%d.csv writes the day's reconciliation, and a Send Email node sends it to the finance team with the file attached.
In run detail, the Join node's output count is the number of payments, and the Aggregate node passes on one item, which is what makes the run produce exactly one report and one email.
Starting a Delivery From an Order System's Webhook
An order system generates shipping documents on its own schedule and posts a notification when each one is ready, rather than writing files to a folder Files.com reads.
The trigger is Webhook, and the order system posts one JSON object per document to the Automation's URL, which makes each notification one data item. An Import File node retrieves the document from the URL in that object, using {{ payload.document_url }} as the URL and a Destination Filename Path built from the order number, and it can send the header the order system requires for authentication. An If node routes on payload.carrier, and a Send via AS2 node delivers to the carrier that takes AS2 while a Copy File node writes to the mounted folder of the carrier that takes SFTP.
In run detail, a burst of ten notifications is ten runs of one item each, because each request starts its own run, and the Import File node's Outputs name the file it retrieved.