Actions111
- Item Actions
- Webhook Actions
- Collection Actions
- File Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Extension Actions
- Field Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
This node is designed to delete multiple "Preset" resources in a Directus v1 environment. It allows users to specify an array of preset primary keys, and the node will remove all corresponding presets from the system. This is useful for batch deletion scenarios, such as cleaning up unused presets or managing large sets of data efficiently.
Practical examples:
- Removing several outdated or unwanted presets at once.
- Automating cleanup tasks in workflows that manage Directus presets.
Properties
| Name | Meaning |
|---|---|
| Keys (JSON) | An array of preset primary keys to delete. Example: [15, 251, 810] |
Output
The output will be a JSON object indicating the result of the deletion operation. The exact structure depends on the underlying API response, but typically it may include:
- A list of deleted preset IDs.
- Status information about the operation.
Dependencies
- Requires access to a Directus v1 instance.
- Appropriate authentication credentials/API key must be configured in n8n for the node to interact with Directus.
Troubleshooting
Common issues:
- Invalid or missing keys: If the "Keys (JSON)" property is empty or not a valid JSON array, the node may throw an error. Ensure you provide a valid array of numeric IDs.
- Permission errors: If the API credentials do not have permission to delete presets, the operation will fail.
- Network/API errors: Connectivity issues with the Directus instance can cause failures.
Error messages and resolutions:
- "Invalid JSON input": Check that the "Keys (JSON)" field contains a properly formatted JSON array.
- "Unauthorized" or "Forbidden": Verify your API credentials and permissions in Directus.