nœuds / builtin / datatransformation
Download as file
Download the input data as a file
Ce contenu n’est pas encore disponible dans votre langue.
Download the file behind a link (an image, a PDF, a document) to your computer.
What it does
Section titled “What it does”Download as file reads a web address from a field of the incoming item, fetches that address and saves what it gets to your Downloads folder. It runs once per item, so ten items with ten image links give ten downloads.
The saved file is named File name plus the extension of File type, for example file.json with the defaults. It does not convert data into a file: the field must hold a link to an existing file.
When to use it
Section titled “When to use it”- Save images or PDFs whose links you scraped from a page.
- Download a report from a link that an API returned.
- To save text you generated (CSV, JSON, Markdown), use Save as File instead. To build a file for an upload or attachment, use Convert to File.
Inputs and settings
Section titled “Inputs and settings”| Réglage | Type | Ce que cela fait |
|---|---|---|
| FieldPath (obligatoire) | Text | The path to the field to pick from the input object (without the node's name or id) that contains the url to download. |
| File type | Choice | The type to use for the file to download in case the type can't be determined from the input data. 17 options. Par défaut : json |
| File name | Text | The name of the file to download. If not provided, a random file name will be generated based on the input data. Par défaut : file |
| Options | Group | The options for the node. |
| Options › Return input fields | Toggle | Whether to return the input fields in the output. Par défaut : Off |
- FieldPath is the field name only, without
{{ }}:imageUrl, orimage.srcfor a nested field. - Set File type to match the file (for example png or pdf). It also sets the extension of the saved file, so a PDF saved with the default json ends up as
file.json. - Type File name without an extension. Use an expression such as
{{ $input.title }}to give each download its own name.
Outputs
Section titled “Outputs”-
Output
By default the node outputs an empty item, so the next step simply runs after the download starts. Turn on Return input fields to pass the incoming item on unchanged.
Dependencies and credentials
Section titled “Dependencies and credentials”None. This node needs no connection and has no slots for other nodes.
Example workflow
Section titled “Example workflow”- Get Images from Link lists the image addresses of a product page in a field named
images. - Split Out on
imagesgives one item per image. - Limit keeps the first 5.
- Download as file with FieldPath
images, File type jpg and File nameproductsaves each image.
Common issues
Section titled “Common issues”- “Field “…” does not exist in the input object” The name in FieldPath does not match the incoming data. Open the previous node’s output and copy the exact field name.
- “Field “…” is not a string in the input object” The field holds a list or an object, not a single link. Point FieldPath at the link itself, or use Split Out first to get one link per item.
- The file has the wrong extension or will not open. File type decides the extension. Pick the type that matches the file.
- Nothing is downloaded, and no error appears. The node does not wait for the download, so a link that cannot be fetched fails quietly. Check that the address opens in your browser.
Related nodes
Section titled “Related nodes”- Save as File: save text you generated as a file.
- Convert to File: build a file for uploads and attachments.
- Split Out: turn a list of links into one item per link.