Actions109
- Activity Actions
- Assets Actions
- Authentication Actions
- Collections 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
This node integrates with the Directus API, a headless CMS and data platform. Specifically, for the Files resource with the Delete operation, it allows users to delete a file object from the Directus system by specifying its unique ID.
Common scenarios where this node is beneficial include:
- Automating cleanup of unused or obsolete files stored in Directus.
- Managing file lifecycle programmatically as part of larger workflows (e.g., deleting files after processing).
- Integrating file deletion into content management pipelines without manual intervention.
Example use case:
- A workflow that processes uploaded images and deletes temporary files once they are no longer needed.
Properties
| Name | Meaning |
|---|---|
| ID | Unique ID of the file object to be deleted. This is a required string input identifying which file to remove. |
Output
The output JSON contains the response from the Directus API after attempting to delete the specified file. Typically, this will include confirmation of deletion or relevant status information returned by the API.
No binary data output is produced by this operation.
Example output JSON structure:
{
"json": {
// Data confirming deletion or API response details
}
}
Dependencies
- Requires an active connection to a Directus instance via an API key credential configured in n8n.
- The node uses Directus REST API endpoints to perform operations.
- Proper permissions on the Directus side are necessary to delete files.
Troubleshooting
- Invalid or missing ID: Ensure the file ID provided exists and is correctly formatted.
- Permission errors: The API key used must have rights to delete files; otherwise, the request will fail.
- Network or connectivity issues: Verify that the Directus API endpoint is reachable from n8n.
- API errors: If the file does not exist or has already been deleted, the API may return an error; handle such cases gracefully using the node's "Continue On Fail" option if desired.