Skip to main content

Download file

Sophie avatar
Written by Sophie
Updated over 2 weeks ago

Definition and Usage

Download a file by clicking a button on a web page or entering a download link. This action allows you to download files from websites using either a direct URL or by clicking on a download element on a webpage.


Parameter Values

Input parameters

Parameter

Description

Possible Values

Required

Options / Notes

Web page

Select a variable that contains the web page to work with

Yes

Must be a valid web page variable

Method

Select download method

URL, Click element

Yes

URL

Enter the URL of the page or the file

Yes (if Method is URL)

Element

Select or capture an element to operate on

Yes (if Method is Click element)

Save to

Choose or enter the folder path to save the file to

Yes

Set file name

Enter file name for the downloaded file

No

Checkbox

File name

Enter the name for the downloaded file. An existed file with the same name wil be overwritten automatically

Yes (if Set file name is checked)

Wait till download completes

If the checkbox is ticked, it'll wait the timeout entered below until download completes

No

Checkbox

Timeout (s)

Set download timeout (in seconds)

Yes (if Wait till download completes is checked)

Advanced settings

Parameter

Description

Possible Values

Required

Options / Notes

Wait time (s)

Wait for a number of seconds until the download button appears

-

No

Default: 20

Element timeout (s)

Wait time for element to appear (seconds)

-

No

Only applicable when Method is "Click element"

Error handling

Parameter Name

Description

Throw error & stop

When an error occurs, the action will trigger an error and stop the execution of the entire app.

Retry command

If an error occurs, the action will retry the command in an attempt to resolve the issue and continue the process.

Ignore error & continue

When an error occurs, the action will be ignored, and the workflow will continue without interruption.

Variables produced

This action produces the following variable:

  • Store file path into: Stores the download file path into a new variable


Using Variables in Conditions

You can use variables in fields where you see the {x} icon. This allows you to dynamically set parameters like the URL, file name, or save location based on previously defined variables in your workflow. For example, you could use a variable to specify a dynamic download URL or customize the file name based on other data in your process.


Notes

  • When using the "URL" method, make sure the URL points directly to the downloadable file.

  • When using the "Click element" method, ensure the element is properly identified and is a valid download trigger.

  • The "Wait till download completes" option is useful for large files that may take time to download.

  • If "Set file name" is not checked, the file will be saved with its original name from the source.

  • Files with the same name in the destination folder will be automatically overwritten.

  • For websites with complex download mechanisms, you may need to adjust the wait time in advanced settings.

Did this answer your question?