Skip to main content
Downloads a file from the provider. Set responseMode: stream for any file an action returns: REST pipes the bytes to the caller, and an MCP tool call returns a single-use download link with the file’s name, type and size. A streaming step must be the last step of its action. The default, buffer, returns the content in data, which only suits content a later step in the same action needs to read. Use fileName when the provider’s response carries no file name.

Input

FieldDescriptionTypeRequired
argsAdditional request parameters sent as query params, headers, or the request body, per each entry’s in.object[]No
authorizationOverrides the connector’s default authentication for this request.unionNo
baseUrlOverrides the connector’s base URL for the download.stringNo
customErrorsRemaps matching provider error responses to different statuses or messages.object[]No
encodingEncoding applied to data when responseMode is buffer. Ignored when streaming. Use none to return a raw Buffer.
Allowed: base64, utf8, binary, raw, none
Default: base64
enumYes
fileNameName to give the downloaded file, overriding any name from the provider’s Content-Disposition header or response.fileNameKey. Supports expressions, so it can come from an earlier step such as a metadata lookup. Falls back to the provider’s name when it resolves to nothing. A name with no extension gets one from the download’s content type, so an exported document named Q3 plan saves as Q3 plan.pdf.stringNo
followRedirectsWhether to follow HTTP redirects.
Default: true
booleanYes
maxRedirectsMaximum number of redirects to follow.
Default: 5
numberYes
methodHTTP method to use for the download.
Allowed: get, post, put, delete, patch
Default: get
enumYes
responseOptions for extracting file content from a JSON-wrapped response.objectNo
responseModeHow the file is returned. buffer (the default) holds the whole file in memory and returns it in data, encoded per encoding, so an MCP tool call carries the entire file inline. stream returns a readable stream instead: REST pipes the bytes to the caller and an MCP tool call returns a single-use download link. Use stream for files. A streaming step must be the last step of its action.
Allowed: buffer, stream
Default: buffer
enumYes
responseTypeUnderlying HTTP response type requested. Used only when responseMode is buffer.
Allowed: arraybuffer, blob, text, json
Default: arraybuffer
enumYes
urlDownload endpoint path appended to the base URL.stringYes
Additional request parameters sent as query params, headers, or the request body, per each entry’s in.
FieldDescriptionTypeRequired
arrayFormatHow array values are serialized in the query string: repeat, brackets, comma, or stringify.
Allowed: repeat, brackets, comma, stringify
enumNo
conditionA JEXL expression that includes the parameter only when it evaluates true.stringNo
inWhere to send the parameter: query, body, or headers.
Allowed: query, body, headers
enumYes
nameName of the request parameter.stringYes
spreadMerges the value’s object entries into the target location instead of setting a single named field.booleanNo
valueValue of the parameter. Supports expressions.anyYes
Overrides the connector’s default authentication for this request.
FieldDescriptionTypeRequired
redirectUriOAuth callback URL carried as connect-time metadata. Not used when authorizing requests.stringNo
signingOptional request signing applied to outgoing requests. Selects AWS SigV4 or HMAC signing.unionNo
typeSends requests without an authorization header.stringYes
Optional request signing applied to outgoing requests. Selects AWS SigV4 or HMAC signing.
FieldDescriptionTypeRequired
regionAWS region used in the signing credential scope. Falls back to the credential region or us-east-1 when omitted.stringNo
serviceAWS service name used in the signing credential scope. For example s3 or execute-api.stringYes
strategySigns requests with AWS Signature Version 4.stringYes
Remaps provider error responses to different statuses or messages. Useful for GraphQL APIs that return errors with a 200 status, normalizing provider-specific error formats, and giving AI agents clearer error messages.
FieldDescriptionTypeRequired
conditionA JEXL expression that applies the remap only when it evaluates true.stringNo
messageError message to return in place of the provider’s.stringNo
receivedStatusProvider HTTP status code to match.numberYes
targetStatusHTTP status code to return in place of the matched one.numberYes
Options for extracting file content from a JSON-wrapped response.
FieldDescriptionTypeRequired
contentIsBase64Whether the content in the JSON response is already base64 encoded.
Default: false
booleanYes
contentTypeFallback content type used when the JSON response exposes none to extract. contentTypeKey wins if it resolves.stringNo
contentTypeKeyJSONPath to the content type within a JSON-wrapped response.stringNo
dataKeyJSONPath to the file content within a JSON-wrapped response.stringNo
fileNameKeyJSONPath to the filename within a JSON-wrapped response.stringNo
forwardAuthWhether to forward authentication headers to the secondary download request when following urlKey.
Default: false
booleanYes
urlKeyJSONPath to a download URL in the response to follow for the file.stringNo

Output

FieldDescriptionTypeRequired
contentDispositionContent-Disposition header value for the client to use.stringNo
dataDownloaded file content. A string in the format set by the encoding input (base64 by default), or a raw binary Buffer when encoding: "none". Absent when responseMode: "stream" (content is piped via the stream output instead).unionNo
fileMetadataFile metadata extracted from response headers or a JSON-wrapped response.objectNo
finalUrlFinal URL the file was downloaded from after redirects or a followed link.stringNo
headersAll response headers returned with the download.objectNo
messageStatus or error message from the response.stringNo
rawThe raw provider response before parsing.anyNo
statusCodeHTTP status code of the provider response.numberYes
File metadata extracted from response headers or a JSON-wrapped response.
FieldDescriptionTypeRequired
contentLengthSize of the file in bytes.numberNo
contentTypeMIME type of the downloaded file.stringNo
etagEntity tag identifying the file version.stringNo
fileNameName of the downloaded file.stringNo
lastModifiedLast-modified timestamp reported for the file.stringNo