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 update multiple "Preset" resources in a batch operation. It allows users to specify an array of primary keys identifying the presets they want to update, along with the data fields to modify for those presets. This is useful in scenarios where bulk updates are needed, such as changing the layout or other properties of several presets at once without updating them individually.
Practical examples include:
- Changing the layout style of multiple saved presets in a content management system.
- Updating configuration settings across several presets simultaneously to maintain consistency.
Properties
Name | Meaning |
---|---|
Data (JSON) | A JSON object containing two required fields: - keys : An array of primary keys identifying the presets to update.- data : An object with any of the preset properties to be updated. For example, { "layout": "tabular" } . |
Output
The output will contain a JSON field representing the result of the batch update operation on the presets. Typically, this would include confirmation of which presets were updated and possibly their new state after the update.
If the node supports binary data output, it would relate to any binary content associated with the presets, but based on the provided code and properties, the focus is on JSON data updates.
Dependencies
- The node depends on an external API that manages "Presets" resources, requiring appropriate authentication via an API key or token.
- The node uses bundled methods and routing logic internally to handle the update operation.
- Proper configuration of the API credentials within n8n is necessary for successful execution.
Troubleshooting
Common issues:
- Providing invalid or non-existent preset keys in the
keys
array may result in errors or no updates being applied. - Malformed JSON in the
Data (JSON)
property can cause parsing errors. - Insufficient permissions or incorrect API credentials will lead to authorization errors.
- Providing invalid or non-existent preset keys in the
Error messages:
- Errors indicating missing keys or data fields suggest incomplete input.
- Authorization errors imply problems with the API key or token setup.
- Validation errors from the API might occur if the data fields do not conform to expected formats or constraints.
To resolve these issues:
- Ensure the
keys
array contains valid preset identifiers. - Validate the JSON structure before submission.
- Verify API credentials and permissions.
Links and References
- Directus Preset Object Documentation – Details on the preset properties that can be updated.