Example Workflows
These examples use the Automations v2 beta. Test them with sample files and non-production destinations before relying on their results. Replace the folder paths, partner names, and file layouts with your own. Each example describes the trigger, node order, and what to inspect in run detail.
Follow the item each node passes forward. Copy File returns the destination copy, Move File returns the moved file, and a Transform with a destination returns its new output file. A later node acts on that output, not automatically on the original source.
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 Copy File node first copies the original to /archive/%Y/%m/. A Transform node reads that archive copy and 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 final Copy File node delivers the encrypted file to the bank's SFTP Remote Server Mount.
The Transform node has one Error Handling rule, processing-failure set to Continue, and a Move File node on its Error path moves each archive copy the script could not process to /quarantine/, leaving the uploaded original in place. 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 Move File node first moves the original X12 file to /archive/edi/%Y/%m/. A Transform node runs a script over that archived file, reading the interchange as segments and returning the order in the layout the order system reads, with output json and a destination under /erp/inbound/. The archived X12 remains in place; the Transform passes the new JSON file forward.
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 Scheduled trigger runs daily at 08:00 UTC, with Folder Path on the mounted pickup folder and Incoming File Pattern *.pgp. A Move File node moves each encrypted file to /claims/archive/%Y/%m/%d/, removing it from the partner's pickup folder only after transfer. The remote account needs permission for that move. A Decrypt With GPG node reads the archived encrypted file and writes the decrypted 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 those files to the claims system's pickup folder.
The encrypted source stays in the archive. The Filter does not delete rejected files; they remain under /claims/incoming/ for review. A Delete File node after the Copy File node would delete the delivered copy, so it is not part of this workflow.
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 scheduled run 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, uses an Import File node to download the open-invoice export from the accounting system's HTTPS export URL, supplying its required authentication headers. A Transform node returns the imported 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.
Use an invoice export with one row per invoice number. With unique invoice keys, the Join node's output count in run detail 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. Repeated invoice keys produce several pairs for a matching payment; resolve those duplicates before treating the report as a reconciliation.
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, making each notification one data item. An If node first checks payload.carrier == "AS2", assuming the sender uses AS2 for one carrier and SFTP for the other. Each path then has its own Import File node, using {{ payload.document_url }} as the URL and a Destination Filename Path built from the order number. Supply the authentication headers required by the order system.
The True path delivers the imported file through Send via AS2. The False path copies its imported file to the SFTP carrier's mounted folder. The carrier check happens before import because the Import File output is the retrieved file; its payload is no longer the webhook JSON.
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.