Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Overview

The node provides an operation to delete a folder resource by its unique identifier. This is useful in scenarios where you need to programmatically manage and clean up folders within a system, such as removing obsolete or empty folders to maintain organization and storage efficiency.

For example, if you have a workflow that processes files and stores them in folders, once the processing is complete and the folder is no longer needed, this node can be used to delete that folder automatically.

Properties

Name Meaning
ID Unique ID of the folder object to delete. This is a required string input that specifies which folder will be removed.

Output

The output JSON typically contains the result of the delete operation. This might include confirmation of deletion or status information returned from the API indicating success or failure. The exact structure depends on the underlying API response but generally confirms whether the folder was successfully deleted.

No binary data output is expected for this operation.

Dependencies

  • Requires an API key credential or similar authentication token to authorize requests to the external service managing folders.
  • The node depends on an external API endpoint capable of deleting folder resources by their unique IDs.
  • Proper configuration of the API base URL and authentication credentials in n8n is necessary.

Troubleshooting

  • Missing or invalid ID: If the ID property is empty or incorrect, the node will fail to find the folder to delete. Ensure the ID is correct and corresponds to an existing folder.
  • Authentication errors: Failure due to invalid or missing API credentials will prevent the deletion. Verify that the API key or authentication token is correctly configured.
  • Folder not found: If the folder with the specified ID does not exist, the API may return a "not found" error. Confirm the folder ID before attempting deletion.
  • Permission issues: Insufficient permissions to delete folders can cause errors. Make sure the API user has the necessary rights.

Links and References

  • Refer to the external API documentation for folder management and deletion endpoints.
  • Consult n8n documentation on setting up API credentials and using HTTP request nodes for custom integrations.

Discussion