XoneWork Attachments
XoneWork Attachments works with the files attached to a XoneWork task: it lists them, downloads the one you need so an agent can read a document, an image or a spreadsheet, attaches new files to the task and deletes the ones no longer needed.
The component works as the person who owns the token of the credential: it only sees the tasks that token sees.
When to use it
- An agent developing a task needs to read the specification or screenshot attached to it.
- Process a spreadsheet or document attached to a task in the flow.
- Leave on the task the report, document or spreadsheet the flow produced, or a file from your Storage.
- Give an agent a tool to read the files of the task it is working on.
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. To upload and delete attachments, tick the
task_attachments_can_writepermission explicitly (see the note below). - 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 task’s files. Default: List Attachments. |
| 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. |
| File | The name or id of the file. When downloading, empty takes the task’s only file, or the newest one. Required when deleting. |
| File to Attach | When uploading: a connected file, for example a Gmail attachment, a file from Storage Files or the document of a component that writes files. |
| Text or File URL | When uploading: text that is saved as a file, or the web address of a file. |
| Storage File Path | When uploading: the path of a file in your NappAI Storage, for example reports/2026/sales.xlsx. |
| File Name | When uploading, optional: the name of the attached file, with its extension. Empty: the original name. |
To upload, use one of File to Attach, Text or File URL or Storage File Path.
Operations
| Operation | What it does | Fields |
|---|---|---|
List Attachments | Lists the files attached to a task. | Task |
Download Attachment | Downloads a file of a task by its name or id. | Task. Optional: File. |
Upload Attachment | Attaches a file to a task. Up to 25 MB per file. | Task and one of File to Attach, Text or File URL or Storage File Path. Optional: File Name. |
Delete Attachment | Deletes a file attached to a task. | Task, File (name or id). |
Output
List Attachments returns one item per file with key (the task’s key), attachment_id, file_name, mime_type, size_bytes, created_at and author.
Download Attachment returns the same file fields plus the file in base64_content, together with file_name and mime_type: the same shape Storage Files and the components that write documents read, so you can connect it straight to them. For a text file (of type text/…, or md, txt, csv or json), it also returns it as text in text. Files up to 25 MB are downloaded.
Upload Attachment returns one item per attached file, with the same fields as List Attachments.
Delete Attachment returns key, attachment_id, file_name and deleted.
The component can be connected to an Agent as a tool: each node is one tool with its operation. As a tool, Upload Attachment attaches text, the web address of a file or a Storage file. See Tools.
Example
An agent that develops tasks reads the files attached to them and leaves its report on the task.
- XoneWork Trigger starts the flow with the task assigned to the agent.
- XoneWork Tasks with
Get Taskreads the task’s note. - The agent has two XoneWork Attachments as tools: one with
List Attachmentsand another withDownload Attachment. When the note mentions a file, the agent finds it by its name and reads it. - At the end, a XoneWork Attachments with
Upload Attachmentreceives the agent’s answer in Text or File URL andreport.mdin File Name: the report stays attached to the task.
Good practices
- Download by name or id when the task has several files; empty downloads the newest.
- For documents that are not text, such as a PDF or an image, pass the result of
Download Attachmentto a component that can read them, or to Storage Files to save it. - When uploading text, write File Name with its extension: the extension decides the file’s type.
- Give the token only the permissions the flow needs: if the flow does not upload or delete, do not give it
task_attachments_can_write.
Security and limitations
- Uploading and deleting need the
task_attachments_can_writepermission ticked explicitly on the token. Without it, XoneWork answers 403. - A file larger than 25 MB is neither downloaded nor uploaded.
- The token acts as the person who created it. Limit it in XoneWork to the permissions and projects the flow needs.
- The token never appears in the node: the credential fills it.
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 Comments: read and write comments.
- XoneWork Projects: projects, columns, members, tags, sprints and webhooks.
- XoneWork Time Tracking: time spent on tasks.