Actions118
- Item Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Server Actions
- Setting Actions
- User Actions
- Utility Actions
- Webhook Actions
Activity → Create
AI-generatedOverview
This node creates a new activity comment on a specified item within a collection. It is useful for adding comments or notes to items in a database or project management system, supporting Markdown formatting for rich text comments.
Use Case Examples
- Adding a comment to a project task to provide updates or feedback.
- Creating a note on a customer record in a CRM system to log interactions.
Properties
| Name | Meaning |
|---|---|
| Item | Primary Key of the item to comment on, specifying which item the comment is related to. |
| Comment | The content of the comment to be added, supporting Markdown formatting for rich text. |
| Collection Name | The collection in which the item resides, indicating the context or category of the item. |
| JSON/RAW Parameters | Flag to determine whether the parameters should be set via UI fields or as raw JSON input. |
| Body Parameters | Body parameters provided as JSON or RAW input when JSON/RAW mode is enabled. |
| Additional Fields | Optional additional fields such as metadata to include in the response. |
Output
JSON
id- Identifier of the created activity comment.item- Primary Key of the item the comment was added to.comment- Content of the comment added.collection- Collection name where the item resides.meta- Optional metadata returned in the response.
Dependencies
- An API key credential or authentication token for the Directus API.
Troubleshooting
- Ensure the 'Item' primary key is valid and exists in the specified collection to avoid errors.
- If using JSON/RAW parameters, verify the JSON syntax is correct to prevent parsing errors.
- Check that the collection name is correctly specified and accessible with the provided credentials.
- Common error messages may include authentication failures, invalid item IDs, or malformed JSON input. Verify credentials and input data accordingly.
Links
- Directus Activity API Documentation - Official documentation for managing activities including creating comments.