> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-en/action-guides/http/http-download.md).

# HTTP Download

HTTP Download is an advanced action used to directly download a file (such as an image, video, document file, zip file...) from an online path (URL) to store it on your computer without having to open a browser to manually click the Download button.

#### Configuration parameters:

* URL: The online address that leads directly to the file to be downloaded (For example: `https://example.com/images/avatar.jpg`).
* Save Path: The absolute path on your computer where you want to save the file after downloading, including the file name and format extension (For example: `D:\GPM_Data\downloads\avatar.jpg`).
* Headers: Additional information sent with the request to authenticate access or simulate a browser if the server requires it (For example: `User-Agent: Mozilla/5.0...` or `Authorization: Bearer $token`). If downloading a public file, you can leave this field blank.
* Output variable: The name of the variable that stores the return result of the action (usually returns a boolean value `True` if the file download is successful or the log content from the system).

#### Practical example: Automatically download a video from an available path to your computer

Suppose you are running a script to scrape articles and the system has extracted an online video link stored in the variable `$videoUrl`. You want to download this video to a fixed folder on drive D to prepare for the next processing steps:

* Configuration method:
  * URL: Pass the variable `$videoUrl` into the input field.
  * Save Path: Enter the specific file save path, for example: `D:\GPM_Data\Videos\downloaded_video.mp4`.
  * Headers: Leave blank (if the download link is public and does not require an account).
  * Output variable: Name the variable that stores the result as `downloadStatus`.

Result: The system will automatically connect to the network, download the video file from the path `$videoUrl`, and output it as a physical file named `downloaded_video.mp4` neatly located in the `D:\GPM_Data\Videos\` folder. The variable `$downloadStatus` will receive a value so you can use an If statement to check whether the file has been successfully downloaded before proceeding to the next actions.

<figure><img src="/files/SVywoJzPmuHDFjj7GeFG" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-en/action-guides/http/http-download.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
