Actions109
- Collections Actions
- Activity Actions
- Assets Actions
- Authentication Actions
- Extensions Actions
- Fields Actions
- Files Actions
- Folders Actions
- Items Actions
- Permissions Actions
- Presets Actions
- Relations Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Overview
The Directus (DrWade) n8n node for the resource Presets and operation Delete Multiple allows users to delete multiple preset records in a Directus instance at once. This is particularly useful for bulk management of presets, such as cleaning up unused configurations or performing mass updates where deletion is required.
Practical scenarios:
- Removing several outdated or unnecessary presets from your Directus project in one workflow step.
- Automating cleanup tasks after batch operations that render certain presets obsolete.
Properties
| Name | Type | Meaning |
|---|---|---|
| Keys (JSON) | json | An array of preset primary keys to be deleted. Example: [15, 251, 810]. Required. |
Output
- The output will be an object in the
jsonfield containing the response from the Directus API after attempting to delete the specified presets. - The structure of the output depends on the Directus API's response for bulk deletions. Typically, it may include information about the deleted items or a status message.
- If an error occurs and "Continue On Fail" is enabled, the output will contain an
errorproperty with the error message.
Example output:
{
"json": {
// Response data from Directus, e.g.,
"data": [
{ "id": 15, "status": "deleted" },
{ "id": 251, "status": "deleted" },
{ "id": 810, "status": "deleted" }
]
}
}
Or, in case of error:
{
"json": {
"error": "Error message here"
}
}
Dependencies
- Directus API: Requires access to a running Directus instance.
- API Credentials: You must configure the
directusApicredentials in n8n for authentication.
Troubleshooting
Common issues:
- Invalid Keys Format: Ensure that "Keys (JSON)" is a valid JSON array of numeric IDs. Invalid JSON or wrong data types will cause errors.
- Missing Permissions: The API user must have permission to delete presets in Directus.
- Non-existent IDs: If any provided key does not correspond to an existing preset, the API may return an error or partial success depending on Directus configuration.
- Error Handling: If "Continue On Fail" is enabled, errors for individual executions will be returned in the output under the
errorproperty.
Common error messages:
"Invalid JSON": The input for "Keys (JSON)" is not valid JSON. Double-check your syntax."Permission denied": The API credentials do not have sufficient rights to delete presets."Preset not found": One or more IDs do not exist in the system.