> 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-guide/http/http-download.md).

# HTTP Download

Download a file to your computer via the HTTP protocol.

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

#### Configuration parameters:

* URL: The online link that leads directly to the file you want to download (e.g., `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 (e.g., `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 (e.g., `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 result returned by 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 link to your computer

Suppose you are running a web scraping script 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:
  * URL: Pass the variable `$videoUrl` into the input field.
  * Save Path: Fill in 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 link `$videoUrl`, and output it as a physical file named `downloaded_video.mp4` neatly located in the folder `D:\GPM_Data\Videos\`. The variable `$downloadStatus` will receive a value so you can use an If block to check whether the file has been downloaded successfully before proceeding to the next actions.

<figure><img src="https://2961903581-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpIRrmOLZkhHBXdAiidIw%2Fuploads%2Fgit-blob-5a40534c6baf96490940b8818ac9d02edc8111ab%2Fht-02.png?alt=media" 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
