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
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
Overview
The Directus - Preset: Delete operation in this n8n node allows you to delete a specific preset from your Directus instance by its primary key (ID). This is useful for automating the cleanup or management of saved views, filters, or configurations within Directus. For example, you might use this node in workflows that manage user permissions, automate environment resets, or maintain a clean set of available presets.
Practical scenarios:
- Automatically remove obsolete or temporary presets after a project phase.
- Clean up test presets as part of a CI/CD pipeline.
- Allow users to trigger deletion of their own custom views via an automated workflow.
Properties
Name | Type | Meaning |
---|---|---|
ID | String | Primary key of the preset to be deleted. |
Output
- The output will be a single object in the
json
field. - If the deletion is successful, the response will typically be an empty object
{}
or may contain metadata about the deletion, depending on the Directus API version and configuration. - If there is an error (and "Continue On Fail" is enabled), the output will include an
error
property with the error message.
Example output:
{
"json": {}
}
or, on error:
{
"json": {
"error": "Preset not found"
}
}
Dependencies
- Directus API: Requires access to a running Directus instance.
- API Credentials: You must configure the
directusApi
credentials in n8n for authentication.
Troubleshooting
Common issues:
- Invalid ID: If the provided ID does not exist, the node will return an error such as
"Preset not found"
. - Insufficient Permissions: The API credentials used must have permission to delete presets; otherwise, you may receive a "Forbidden" or "Unauthorized" error.
- Network/API Errors: Connectivity issues or incorrect API URLs can result in connection errors.
How to resolve:
- Double-check the ID value for typos or existence in Directus.
- Ensure the API credentials have the necessary permissions.
- Verify the Directus API endpoint configuration in your n8n credentials.