Skip to content

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.

  1. 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_write permission explicitly (see the note below).
  2. Copy the token, which starts with tvk_.
  3. 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.
  4. Choose that credential in the component’s Credential field.
FieldWhat it does
Credential (required)The XoneWork credential. It fills XoneWork Address and XoneWork API Token.
OperationWhat you do with the task’s files. Default: List Attachments.
TaskThe 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.
FileThe name or id of the file. When downloading, empty takes the task’s only file, or the newest one. Required when deleting.
File to AttachWhen 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 URLWhen uploading: text that is saved as a file, or the web address of a file.
Storage File PathWhen uploading: the path of a file in your NappAI Storage, for example reports/2026/sales.xlsx.
File NameWhen 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

OperationWhat it doesFields
List AttachmentsLists the files attached to a task.Task
Download AttachmentDownloads a file of a task by its name or id.Task. Optional: File.
Upload AttachmentAttaches 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 AttachmentDeletes 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.

  1. XoneWork Trigger starts the flow with the task assigned to the agent.
  2. XoneWork Tasks with Get Task reads the task’s note.
  3. The agent has two XoneWork Attachments as tools: one with List Attachments and another with Download Attachment. When the note mentions a file, the agent finds it by its name and reads it.
  4. At the end, a XoneWork Attachments with Upload Attachment receives the agent’s answer in Text or File URL and report.md in 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 Attachment to 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_write permission 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.