Actions100
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Item Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
The node is designed to retrieve an asset (file) from a system, identified by its unique ID. It supports fetching the asset's metadata and optionally includes the actual file data. This is useful in scenarios where you need to access stored files or media assets programmatically within an automation workflow, such as downloading images, documents, or other media for further processing or integration.
Practical examples:
- Fetching an image asset by ID to use it in a marketing email.
- Retrieving a document file to attach it to another system or send it via messaging.
- Getting asset metadata for reporting or auditing purposes.
Properties
Name | Meaning |
---|---|
JSON/RAW Parameters | Whether to provide query parameters as a JSON object/raw input or through UI key-value pairs. |
Query Parameters | The query parameters as a JSON object when JSON/RAW Parameters is enabled. These parameters can customize the request for the asset retrieval. |
ID | The unique identifier of the asset (file) to retrieve. |
Include File Data | Whether to include the actual binary file data along with the asset metadata. If true, the file content will be part of the output. |
Binary Property | The name of the binary property in which the file data will be stored if included. For multipart uploads, multiple binary properties can be specified in a comma-separated format. |
Additional Fields | A collection of optional fields to customize the asset retrieval, including: |
- Fit | How the thumbnail should fit within the requested dimensions while preserving aspect ratio. Options: Contain, Cover, Inside, Outside. |
- Format | The file format for the returned thumbnail. Options: JPG, PNG, TIFF, WEBP. |
- Height | The height in pixels for the thumbnail image. |
- Key | The key of the asset size configuration to use. |
- Quality | The quality of the thumbnail image (1 to 100). |
- Transforms (JSON) | A JSON array describing image transformations to apply. |
- Width | The width in pixels for the thumbnail image. |
- Without Enlargement | Whether to disable up-scaling of the image beyond its original size. |
Output
The node outputs a JSON object representing the asset's metadata, including details such as ID, filename, type, size, and other relevant information. If "Include File Data" is enabled, the output also contains a binary property holding the actual file content, allowing subsequent nodes to process or save the file.
Dependencies
- Requires connection to the asset management system or API that stores and serves the assets.
- Needs appropriate authentication credentials (e.g., API key or token) configured in n8n to authorize requests.
- Supports JSON input for advanced query customization.
Troubleshooting
- Missing or invalid ID: The node requires a valid asset ID; ensure the ID provided exists and is correct.
- Authentication errors: Verify that the API credentials are correctly set up and have permission to access assets.
- File data not included: If the binary property is empty despite enabling "Include File Data," check that the asset actually has associated file content.
- Invalid JSON in query parameters or transforms: When using JSON input, ensure the JSON syntax is correct to avoid parsing errors.
- Unsupported thumbnail options: Using incompatible combinations of width, height, fit, or format may cause errors or unexpected results.
Links and References
- Refer to your asset management system's API documentation for detailed information on asset retrieval and supported query parameters.
- Image transformation and thumbnail generation options typically follow common standards; consult relevant image processing libraries or services documentation for more details.