Overview
This Template lets you build a Task that downloads any file from the web given a URL. The file must be publicly accessible.
The file will be downloaded directly to the specified folder using the File Name provided. - If not folder is specified, the file will be downloaded to the current working directory. - If no file name is specified, the file name will be interpreted from the URL.
Running this as a single Task will appear to do nothing, as the file is being downloaded to Workflows and then promptly deleted once the Task finishes, per our security measures. We recommend using this Template when building a Task as part of a Workflow, so that the data can shared for processing and storage elsewhere.
Variables
|
Name |
Reference |
Type |
Required |
Default |
Options |
Description |
|---|---|---|---|---|---|---|
|
File URL |
HTTP_FILE_URL |
Alphanumeric |
✅ |
None |
- |
URL to run a download request against. |
|
Custom Headers |
HTTP_CUSTOM_HEADERS |
Alphanumeric |
➖ |
None |
- |
A dictionary of additional headers that you want sent to the URL where the download request is being made. |
|
File Name |
HTTP_DESTINATION_FILE_NAME |
Alphanumeric |
➖ |
None |
- |
If left blank, will try to interpret the file name from the URL. |
|
Folder Name |
HTTP_DESTINATION_FOLDER_NAME |
Alphanumeric |
➖ |
None |
- |
If left blank, the file will be created in the current working directory. |
YAML
Below is the YAML template
source:
template: HTTP - Download File from URL to Workflows
inputs:
HTTP_FILE_URL:
HTTP_CUSTOM_HEADERS:
HTTP_DESTINATION_FILE_NAME:
HTTP_DESTINATION_FOLDER_NAME:
type: TEMPLATE
guardrails:
retry_count: 1
retry_wait: 0h0m0s
runtime_cutoff: 1h0m0s
exclude_exit_code_ranges:
- 200