Actions2
Overview
This node integrates with a Media Kit API to manage media files. It supports two main operations: uploading media files and listing existing media files. The "List Media" operation retrieves paginated lists of media items stored in the Media Kit, which is useful for browsing or processing media assets programmatically.
Common scenarios include:
- Fetching a list of media files for display or further processing.
- Automating workflows that need to handle media management, such as syncing media metadata or generating reports on stored media.
Example use case:
- A user wants to retrieve the first 100 media files from their Media Kit storage to display thumbnails in a dashboard or to trigger downstream processing.
Properties
| Name | Meaning |
|---|---|
| Page Size | Number of media items to return per page. Allowed values range from 10 to 1000. |
| Page | The page number of results to retrieve (pagination). Defaults to 1 for the first page. |
Output
The output is a JSON array containing media item objects returned by the Media Kit API's /api/uploads endpoint. Each object represents a media file with its associated metadata (such as filename, URL, MIME type, size, etc.). The exact structure depends on the API response but typically includes details necessary to identify and access each media file.
No binary data is output for the "List Media" operation; it only returns JSON metadata about the media files.
Dependencies
- Requires an API key credential to authenticate requests against the Media Kit API.
- Uses internal helper functions to make HTTP requests to the Media Kit service.
- The node expects the Media Kit API base URL to be configured or discoverable via the helper method.
Troubleshooting
- Invalid pagination parameters: Ensure "Page Size" is between 10 and 1000 and "Page" is a positive integer.
- API authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
- Empty or unexpected responses: Confirm that media files exist in the Media Kit and that the API endpoint is reachable.
- Network issues: Check connectivity to the Media Kit API server.
If the node throws errors related to request failures, inspect the error message for HTTP status codes or messages indicating authorization problems or invalid parameters.
Links and References
- Media Kit API documentation (refer to your Media Kit provider’s official docs)
- n8n documentation on creating custom nodes and using credentials
- Pagination concepts: https://en.wikipedia.org/wiki/Pagination