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
This node is designed to retrieve a single item from a specified collection in a data source. It is useful when you need to fetch detailed information about one particular record identified by its unique ID within a given collection. Common scenarios include retrieving user profiles, product details, or any specific entity stored in a collection.
For example, if you have a collection named "articles" and want to get the article with ID "15", this node will fetch that exact item, optionally applying filters, sorting, or exporting the result in various formats.
Properties
Name | Meaning |
---|---|
ID | Unique identifier of the item to retrieve. This is required to specify which item to fetch. |
Collection Name | The name of the parent collection where the item resides. You must select the collection containing the item. |
Return All | Whether to return all matching results (true) or limit the number of results (false). Since this operation targets a single item by ID, this typically controls whether to paginate or limit additional related data fetched. |
Limit | Maximum number of results to return when Return All is false. Must be between 1 and 100. |
Additional Fields | A collection of optional parameters to customize the query: |
- Aggregate | Allows performing aggregation functions such as count, average, sum, min, max on fields within the collection. Multiple aggregation functions can be applied simultaneously. |
- Binary Property for Export Data | Specifies the property name under which binary export data will be saved if exporting the response. |
- Deep (JSON) | JSON object allowing nested relational dataset queries by setting additional query parameters on related data. |
- Export | Format to save the API response file. Options are CSV, JSON, or XML. |
- File Name for Export Data | Filename (without extension) used when exporting data to a file. Defaults to "export". |
- Fields | Comma-separated list of fields to return in the response object, controlling which properties are included. |
- Filter (JSON) | JSON object specifying conditions to filter items in the collection. |
- Group By | Field(s) to group results by, enabling aggregation functions to run on grouped subsets (e.g., average rating per month). |
- Meta | Metadata fields to include in the response. |
- Offset | Number of items to skip before starting to fetch results, useful for pagination. |
- Search | Text query to filter items containing the search string in any field. |
- Sort | Comma-separated list of fields to sort the returned items by. Prefixing a field with "-" sorts it descending; otherwise ascending. Use "?" for random sorting. |
Output
The node outputs a JSON object representing the requested item from the specified collection. The structure corresponds to the fields defined in the collection schema, optionally filtered or limited by the input properties.
If export options are used, the node can output the data as a downloadable file in CSV, JSON, or XML format. When exporting binary data, the node stores the file content in a binary property named as specified by the user (default "data").
Dependencies
- Requires access to the target data source's API or database where collections and items reside.
- Needs appropriate authentication credentials (such as an API key or token) configured in n8n to authorize requests.
- Uses internal methods to load collection names and fields dynamically for dropdowns and options.
Troubleshooting
- Missing or invalid ID: The node requires a valid item ID to fetch. Ensure the ID is correct and exists in the specified collection.
- Collection not found: Verify that the collection name is correct and accessible with your credentials.
- Permission errors: Insufficient permissions may cause failures. Check that the API key or token has read access to the collection.
- Invalid filter or JSON parameters: Malformed JSON in filter or deep parameters can cause errors. Validate JSON syntax carefully.
- Export issues: If exporting data, ensure the file name is valid and the chosen format is supported.
- Limit and Return All conflicts: Setting
Return All
to false requires a validLimit
value; ensure these are consistent.
Links and References
Note: This summary is based solely on static analysis of the provided code and property definitions.