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 allows you to create a new comment (activity) on an item within a specified collection. It is designed for scenarios where you want to programmatically add comments to items, such as tasks or records, in a Directus-based system. This can be useful for automating feedback, logging updates, or integrating external systems that need to post activity comments.
Example use cases:
- Automatically commenting on a project task when its status changes.
- Logging automated system events as comments on relevant database items.
- Integrating with other tools to post user feedback directly into your Directus collections.
Properties
| Name | Type | Meaning |
|---|---|---|
| Item | String | Primary Key of the item to comment on. Identifies which item in the collection receives the comment. |
| Comment | String | The content of the comment to add. Supports Markdown formatting. |
| Collection Name | Options | Specifies the collection (e.g., "projects") where the item resides. |
| JSON/RAW Parameters | Boolean | If enabled, allows setting body parameters via raw JSON instead of individual fields. |
| Body Parameters | JSON | (Shown if JSON/RAW Parameters is true) Raw JSON object for the request body. |
| Additional Fields | Collection | Optional extra fields, such as "Meta", to specify what metadata to return in the response. |
Output
The node returns a json field containing the result of the comment creation operation. The structure typically includes details about the created comment/activity, such as its ID, content, associated item, and any requested metadata.
If binary data is returned (unlikely for this operation), it would represent additional file attachments or related resources.
Dependencies
- Directus API: Requires access to a Directus instance.
- Authentication: May require an API key or credentials configured in n8n to authenticate requests to Directus.
- n8n Configuration: Ensure the node is properly set up with the correct Directus endpoint and authentication method.
Troubleshooting
- Invalid Item or Collection: If the provided item primary key or collection name does not exist, the node may throw an error indicating "Item not found" or "Collection not found".
- Resolution: Double-check the values for "Item" and "Collection Name".
- Missing Required Fields: Omitting required properties like "Comment" or "Item" will result in validation errors.
- Resolution: Ensure all required fields are filled.
- Authentication Errors: If credentials are missing or incorrect, you may see errors like "Unauthorized" or "Invalid API key".
- Resolution: Verify your Directus credentials in n8n.