Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

This node is designed to delete multiple files in a single operation. It is useful when you need to remove several files from a system or service at once, streamlining bulk file management tasks. Common scenarios include cleaning up outdated assets, removing user-uploaded files in batch, or automating file lifecycle processes.

Practical Example:
Suppose you have a list of file IDs that are no longer needed in your application. You can use this node to provide those IDs and efficiently delete all corresponding files in one workflow step.

Properties

Name Type Meaning
Keys (JSON) JSON Array of primary keys (IDs) of the files you'd like to delete. Required for the operation.

Output

The output will be a JSON object indicating the result of the deletion operation. Typically, it may include information such as which files were successfully deleted and any errors encountered for specific keys. The exact structure depends on the underlying implementation, but users should expect a summary of the deletion results per file key.

Dependencies

  • This node likely interacts with an external file management service or API (such as Directus).
  • Proper authentication (e.g., API key or credentials) may be required, depending on the service configuration.
  • Ensure that the n8n instance has network access to the target service.

Troubleshooting

  • Invalid Keys (JSON): If the "Keys (JSON)" property is not a valid JSON array of strings, the node may throw a parsing error. Ensure you input a properly formatted JSON array, e.g.:
    ["b6123925-2fc0-4a30-9d86-863eafc0a6e7", "d17c10aa-0bad-4864-9296-84f522c753e5"]
    
  • Missing Required Property: If "Keys (JSON)" is left empty or omitted, the node will fail due to missing required data.
  • Permission Errors: If the credentials used do not have permission to delete files, the node may return an authorization error.
  • File Not Found: If some provided keys do not correspond to existing files, the output may indicate which deletions failed.

Links and References

Discussion