Skip to main content

HTTP Request (v2)

When the information a file workflow needs lives in another system, use HTTP Request to look it up during the run. For example, an Automation could check an order's approval status in your order management system before sending the order to fulfillment. The node sends one HTTPS request for each incoming file or data item and passes the JSON response to the next node as data.

Use Send Webhook to notify another system and pass the current item along after delivery. Use Import File to save a downloaded response as a file on your site.

Request Settings

Set the URL to the service's publicly reachable HTTPS endpoint. Use the final URL because a redirect fails the item. The method defaults to GET. You can also use POST, PUT, PATCH, DELETE, HEAD, or OPTIONS, depending on what the service supports for that endpoint.

The full URL, query parameter values, header values, and request body accept TransformScript templates. Query parameter and header names are fixed. Keep the hostname fixed when a file or another system supplies the lookup value, so the request and any credentials go to the service you configured.

Authentication

If the service requires credentials, select an Authentication Secret from the Automation's Workspace. For an Automation in the Default Workspace, use a Site-owned Secret. Choose the type based on what the service expects.

  • Use a Basic Secret for HTTP Basic authentication with a username and password.
  • Use a Token Secret for a single token. With no header or query parameter name set on the Secret, Files.com sends the token as Authorization: Bearer <token>. Set a header name or a query parameter name on the Secret to send the token as-is in that location.
  • Use a Headers Secret when the service requires one or more named headers with specific values, including any required prefixes.

Response Items and Errors

A successful response (HTTP 2xx) with a JSON object produces one data item. An array of objects produces one item per object. An empty response body or an empty array produces no items, so there is nothing from that request for the next node to process.

Each response object becomes the next node's payload. If a later step also needs an identifier from the original item, use a response that includes it or keep the original item on a separate branch.

The response body can be up to 100 MB. A connection failure, a status outside 2xx, a response over the limit, or a nonempty body that is neither a JSON object nor an array of objects fails the input item. The node's Error Handling rules determine what happens next. With a matching Continue rule and a connected Error path, that path receives the original input item.

Order Status Lookup

Suppose the Automation receives a data item such as {"order_id":"1042"} and your order system exposes an HTTPS status endpoint. Use GET and set the order_id query parameter to {{ payload.order_id }}. Files.com fills in the ID from each item when it sends the request.

Connect an If node to the normal output and set its condition to payload.status == "approved". If the service returned {"order_id":"1042","status":"approved"}, the returned item would take the True path. A returned item with a different status would take the False path.

Run the Automation with a sample order and inspect Run Detail to confirm that the HTTP Request output contains the expected order ID and status, and that If routed that item to the intended path.