Help Centre › Building 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:
- Navigate to the process where you would like to add the Download file via HTTP function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the Download file via HTTP option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Name | No | Text | - | The alias of a previously created session (from api-session) |
| URL | Yes | Text | - | The URL of the file to download |
| Path | Yes | Text | - | The local file path to save the downloaded file to |
| Headers | No | JSON | - | Additional headers for this request |
| Params | No | JSON | - | URL query parameters as key-value pairs |
| Timeout | No | Number | - | Request timeout in seconds |
| Variable | No | Text | downloaded_file | Variable name to store the downloaded file path |
Output variables
| Variable | Type | Description |
|---|---|---|
| {downloaded_file} | Text | The local file path where the file was saved |
Errors
| Error | Description |
|---|---|
| Connection failed | Unable to establish a connection to the server |
| File write error | Unable 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