> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Upload task attachment

> Upload a file attachment to an Asana task.

`asana.uploadTaskAttachment` upload a file attachment to an Asana task.

```ts automations/asana-upload-task-attachment.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { asana } from "automate.ax/asana"

export default automation("Upload task attachment", () => {
  onDashboardRun({ title: "Upload task attachment" })
  asana.uploadTaskAttachment({
    taskId: "task-gid",
    file: new File(["release"], "brief.txt", { lastModified: 0 }),
  })
})
```

Provide `taskId` and a `File`. When you construct a file directly in automation code, set a stable `lastModified` value so durable replay sees the same input. Optional second argument `{ account }` selects a named Asana binding.

Returns the created attachment. Uploads are not replay-safe, so Automate.ax does not automatically repeat an ambiguous request.
