XoneWork Comments
XoneWork Comments works with the comments of a XoneWork task: it reads the latest ones, writes a new one and changes or deletes the ones the account itself wrote. Use it so an agent can ask a question or report its progress on the task, and to read what people answered.
The component works as the person who owns the token of the credential: the comments it writes appear under their name.
When to use it
- An agent leaves a question on the task when it is missing information and, on the next run, reads the answer.
- Post the result of an automation, a summary or a link as a comment on a task.
- Read the comments of a task to give them to an agent together with the note.
Configuration
You need a XoneWork credential with the address of your XoneWork and a personal API token. See Credentials.
- In XoneWork, open Account › API tokens and create a token. Choose its permissions and the projects it reaches.
- Copy the token, which starts with
tvk_. - In NappAI, create a XoneWork credential: in XoneWork address type the address of your XoneWork, for example
https://xonework.app, and paste the token in API token. - Choose that credential in the component’s Credential field.
| Field | What it does |
|---|---|
| Credential (required) | The XoneWork credential. It fills XoneWork Address and XoneWork API Token. |
| Operation | What you do with the comments. Default: List Comments. |
| Task | The task’s key, for example XONE-12, or its id. Default {key}: in batch mode it takes the key of the task that reaches the node. |
| Comment | The text of the comment, up to 5000 characters. Plain text. |
| Comment ID | The id of the comment, returned by List Comments. |
| Max Results | How many of the most recent comments to return. Default: 50. |
Operations
| Operation | What it does | Fields |
|---|---|---|
List Comments | Reads the latest comments of a task. | Task. Optional: Max Results. |
Add Comment | Writes a comment on a task. | Task, Comment |
Update Comment | Changes the text of a comment this account wrote. | Comment ID, Comment |
Delete Comment | Deletes a comment this account wrote. | Comment ID |
Output
The Data output returns one item per comment with these fields:
key: the task’s key.comment_id: the comment’s id.body: the text.author: who wrote it.created_atandedited_at: when it was written and when it was changed.
The component can be connected to an Agent as a tool: each node is one tool with its operation. See Tools.
Example
An agent that develops tasks asks when something is missing.
- XoneWork Trigger starts the flow with the task assigned to the agent.
- XoneWork Comments with
List Commentsreads what has been said on the task, and XoneWork Tasks withGet Taskreads its note. - An agent receives both. Its tool is another XoneWork Comments with
Add Comment, Task set to{key}and Comment left to the agent, to ask about anything that is unclear.
Good practices
- Write plain text: XoneWork shows HTML and Markdown as they are, without formatting.
- For an agent’s report that repeats on every run, use XoneWork Tasks with
Update TaskandReplace Sectioninstead of a new comment each time. - As a tool, let the agent write Comment.
Security and limitations
- The token acts as the person who created it: comments appear under their name. Limit it in XoneWork to the permissions and projects the flow needs.
- The token never appears in the node: the credential fills it.
- Only the comments the token’s account wrote can be changed or deleted.
- A comment has at most 5000 characters.
Related components
- XoneWork Tasks: read, create, move and assign tasks.
- XoneWork Trigger: starts the flow when a task changes.
- XoneWork Webhook: starts the flow with the webhooks of a project.
- XoneWork Projects: projects, columns, members, tags and sprints.
- XoneWork Time Tracking: time spent on tasks.
- XoneWork Attachments: the files attached to a task.