Actions111
- Item Actions
- Webhook Actions
- Collection Actions
- File Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Extension Actions
- Field Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
This n8n node is designed to delete a specific field from a collection in a Directus v1 instance. It is useful when you need to programmatically remove custom fields (columns) from your data collections, for example, as part of automated schema management or cleanup tasks.
Practical examples:
- Removing obsolete or deprecated fields from a collection after a schema update.
- Automating the cleanup of test fields created during development.
- Integrating with CI/CD pipelines to ensure collections only contain required fields.
Properties
| Name | Type | Meaning |
|---|---|---|
| Field Name | options | Unique name of the field to be deleted. The field name must be unique within the collection. |
| Collection Name | options | Name of the collection containing the field. |
Output
The output will be a JSON object indicating the result of the delete operation. Typically, this may include:
- Confirmation that the field was deleted.
- Any error messages if the operation failed.
Example output:
{
"success": true,
"message": "Field deleted successfully."
}
or, in case of an error:
{
"success": false,
"error": "Field not found in the specified collection."
}
Dependencies
- Requires access to a Directus v1 API endpoint.
- May require authentication credentials (API key, username/password, etc.) depending on your Directus setup.
- n8n must be configured to allow outgoing HTTP requests to the Directus server.
Troubleshooting
Common issues:
- Invalid Field or Collection Name: If the specified field or collection does not exist, the node will likely return an error message indicating so.
- Insufficient Permissions: If the API credentials do not have permission to modify the collection schema, the operation will fail.
- Network/Connection Errors: Issues connecting to the Directus server will result in connection errors.
Error messages and resolutions:
"Field not found in the specified collection."
Ensure the field name and collection name are correct and exist in your Directus instance."Unauthorized"or"Permission denied"
Check your API credentials and user permissions in Directus."Network Error"
Verify network connectivity between n8n and the Directus server.