Skip to content

Tasks

Attachments

Attach contracts, invoices, receipts, photos and other files to any task, with a name, type and description. Use them in workflows.

Last updated 4 min read Edit this page on GitHub
On this page

Every task has an Attachments tab. People who work on the task attach files to it, each with a name, a type and a description. Everyone who can see the task can open them, and workflows can read them once the task is done.

A task's Attachments tab with a count of 3: a Contract PDF and an Image added by Ada Lovelace, and an Evidence text file added by a workflow, each with its type badge, description, file name and size, who added it and when; the hovered row shows Preview, Download and Delete
The Attachments tab: name, type, description, file, who added it and when. The last file was filed by the Add Task Attachment step.

On the task#

  • Add attachment opens a dialog. Drop a file on it, or choose one, then give it a name (the file name by default), a type and an optional description. The upload shows its progress and can be cancelled.
  • Type is free text with suggestions: Contract, Invoice, Receipt, Evidence, Image and Other, then the types your workspace already uses. A workspace that wants a fixed list just keeps to the same few words. Known types keep their capitalisation (invoice is stored as Invoice).
  • The list shows each attachment's name, type, description, file name and size, who added it and when. Images (PNG, JPEG, GIF, WebP) open in a preview. Download gets the original file, PDFs included.
  • The tab's count shows how many files the task holds.

Who can do what#

ActionWho
See and downloadThe assignee, collaborators, team members of a team task, a manager of an assignee, the person who assigned the task, and anyone with View all tasks or Manage queue
AddPeople who can work on the open task: Complete tasks plus the assignee, a collaborator, a team member or a manager of an assignee; Complete any task; Manage queue on a task that isn't a workflow task
DeleteThe person who added it, or anyone with Delete tasks

People who can see a task but not work on it get a read-only list. Closed tasks take no new attachments from people; a workflow step can still file a document on them. A deleted attachment disappears from the task at once. Its file is purged after 30 days (TASK_ATTACHMENT_DELETED_RETENTION_DAYS).

Files and limits#

Attachments go through the same checks as form uploads:

  • the instance's size cap (FORM_ATTACHMENT_MAX_MB, 25 MB by default);
  • the file's type checked against its content;
  • programs and scripts refused;
  • SVGs sanitised;
  • the virus scanner, when one is configured.

A task holds up to 100 attachments (TASK_ATTACHMENT_MAX_PER_TASK). Files are private. They are stored in the form-files bucket of your storage provider (Supabase Storage, S3 / MinIO, Azure Blob, Google Cloud Storage or local disk), and are only served through /attachments/<id>, which checks the signed-in person on every request and hands out a five-minute signed link. Large files go straight to storage where the provider signs uploads. Otherwise they go through the app.

In workflows#

  • User Task steps output attachments: the files attached to the task before it was completed, as a list. Each item has { id, name, type, description, file_name, mime, size, url, storage_ref, uploaded_by, created_at }. They are in the data picker under the step.
  • Task-triggered workflows read the triggering task's files as {{task.attachments}}.
  • Loop over either list. {{item}} is one attachment, typed in the data picker: {{item.name}}, {{item.type}}, {{item.storage_ref}}.
  • File steps take an attachment as their file: Read Document, Convert, PDF tools, Extract, OCR, Read File, Send Email attachments and HTTP Request uploads. Pass {{item}}, or one item such as {{attachments[0]}}. The run reads the file from storage for its own workspace only.
  • Add Task Attachment files a file the run produced or downloaded on a task:
    • file: a document step's output, a Download File result, {{item}}, a storage:// reference, a URL or base64.
    • name, type and description, all with expressions.
    • task_id: blank means the task that started the run, else the latest User Task's {{user_task_id}}. It outputs attachment. The file gets the same checks as an upload, shows on the task as added by Workflow, and records the run.
JSON
{ "type": "add_task_attachment", "config": { "task_id": "{{user_task_id}}", "file": "{{doc_file}}", "name": "Signed contract", "type": "Contract", "description": "Generated after approval" } }

Every add and delete goes on the task's timeline. The event stream carries them as task.attachment_added and task.attachment_deleted, so log destinations and webhooks can filter for them.

API, MCP and CLI#

REST (/api/v1)MCPCLI
ListGET /tasks/{id}/attachmentstasks_attachments_listusertasks tasks attachments <task-id>
Add (small file, base64)POST /tasks/{id}/attachments with content_base64tasks_attachments_addusertasks tasks attach <task-id> <path> --type Contract --name … --description …
Add (direct upload)POST /tasks/{id}/attachments with size, PUT to the signed URL, then POST /tasks/{id}/attachments/{attachmentId}/completetasks_attachments_add_init, tasks_attachments_completetasks attach picks the route for you
Download linkGET /tasks/{id}/attachments/{attachmentId}/download (5 minutes, no session needed)tasks_attachments_download_urlusertasks tasks attachment-download <task-id> <attachment-id>
DeleteDELETE /tasks/{id}/attachments/{attachmentId}tasks_attachments_deleteusertasks tasks attachment-delete <task-id> <attachment-id>

Adding needs a user-bound credential: a personal API key, OAuth, or a signed-in user. The SDK's client.uploadTaskAttachment(taskId, { name, bytes }, { type, description }) wraps both upload routes.

Governance#

  • Audit log: every add, delete and download is recorded on the task (attachment_add, attachment_delete, attachment_download). Filter Governance → Audit log by the task.
  • Retention and legal hold follow the task's reusable form, as they do for form submissions:
    • When the form's retention policy purges submissions, it also purges the attachments of the form's closed tasks created before the cut-off. Open tasks keep theirs.
    • While the form is on legal hold, its tasks' attachments can't be deleted or purged.
    • Tasks without a reusable form have no retention policy for their attachments.
  • Exports never carry attachments. Like submissions, they are runtime data (see What an export covers). Download them from the task or through the API instead.
  • Direct database access is limited by row-level security with the same rules (task_attachments, migration 20261222000000_task_attachments.sql).

Was this page helpful?