> ## 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.

# Create issue attachment

> Link an external resource to a Linear issue by its unique URL.

`createIssueAttachment` creates or idempotently updates an external attachment. Reusing the same `url` updates the existing attachment rather than creating a duplicate.

```ts automations/attach-linear-resource.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { createIssueAttachment } from "automate.ax/linear"

export default automation("Attach customer ticket", () => {
  onHttpRequest({ scope: "automation" })
  createIssueAttachment({
    issueId: "ENG-123",
    title: "Customer ticket",
    url: "https://example.com/tickets/123",
    subtitle: "Escalated",
  })
})
```

`issueId`, non-empty `title`, and valid external `url` are required. Optional fields are Markdown `commentBody`, `groupBySource`, PNG/JPEG `iconUrl`, string-or-number `metadata`, `subtitle`, and `account`.

Returns the created or updated `LinearAttachment`. This action links a URL; it does not upload file bytes.
