Webhook (v2)
The Webhook trigger in Automations v2 starts a run when an external system sends JSON to the Automation's webhook URL. It is the trigger for workflows that begin outside Files.com. An ERP posts a batch of orders, a CRM reports that an export finished, or a monitoring system reports an event, and the Automation processes the data or the files in its folder path.
Files.com generates the webhook URL when you save the Automation and shows it to administrators who can view that Automation. Folder Admin permission alone does not grant access to it, even when the user administers the trigger folder.
The URL is all a caller needs to start a run, so treat it as a credential and share it only with the systems that call it. Having the URL does not grant access to the Automation's configuration or run records.
What the Run Starts With
Without a Folder Path, the request body becomes the run's data. A JSON object becomes one data item, and a JSON array of objects becomes one data item per element, so a body of 200 order objects is a run whose nodes process 200 items. A body that is not valid JSON, is a single value rather than an object, or is an array containing anything other than objects is rejected and no run starts, because every data item in an Automation is a JSON object.
Each data item's contents are available as payload, so an If node can route on payload.region and a Transform node can reshape the object. After a node imports or writes a file, payload describes that new current item rather than the original webhook body.
With a Folder Path, the request starts a run that selects files using that path and its incoming pattern. The pattern . selects the matched folders themselves. This mode lets an external system start work on files already present in Files.com, instead of supplying the items as JSON.
Query and form parameters are available as strings through context.parameters, independently of the JSON body and the current item. For example, context.parameters.batch reads a request parameter while payload.batch reads the current item's contents. A path-selecting webhook can use {{ context.parameters.batch }}*.csv as its incoming pattern. TransformScript in Automations explains those inputs and their use in later nodes.
Webhook Trigger vs. Webhooks
A Webhook sends a request from Files.com to a system you name when activity happens on your site. A Webhook trigger receives a request that a system outside Files.com sends in. Use a Webhook to tell another system that something happened on your site, and a Webhook trigger to let another system start an Automation.