HTTP Download file via HTTP function

Download a file from a URL using streaming (memory-efficient for large files).

Help CentreBuilding Processes

This article describes the RPA HTTP functionality to download a file via HTTP.

For a full list of available functions, please read HTTP functions.


Description

The Download file via HTTP function downloads a file from a URL using streaming, making it memory-efficient for large files. The file is saved to the specified local path.


Setting it up

To use the Download file via HTTP function, follow these instructions:

{{popups:rpas/add:action=api-download}}

Once on a process map:

  1. Navigate to the process where you would like to add the Download file via HTTP function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the Download file via HTTP option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
NameNoText-The alias of a previously created session (from api-session)
URLYesText-The URL of the file to download
PathYesText-The local file path to save the downloaded file to
HeadersNoJSON-Additional headers for this request
ParamsNoJSON-URL query parameters as key-value pairs
TimeoutNoNumber-Request timeout in seconds
VariableNoTextdownloaded_fileVariable name to store the downloaded file path

Output variables

VariableTypeDescription
{downloaded_file}TextThe local file path where the file was saved

Errors

ErrorDescription
Connection failedUnable to establish a connection to the server
File write errorUnable to write the file to the specified path

Tips

  • Uses streaming so it is memory-efficient for large files
  • Ensure the target directory exists before downloading
  • Use a session with authentication for downloading files from protected APIs

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.