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

# On Linear issue event

> Start an automation when a Linear issue is created, updated, or removed.

`onLinearIssueEvent` watches every issue lifecycle event in the connected workspace.

```ts automations/watch-linear-issues.automation.ts theme={null}
import { automation } from "automate.ax"
import { onLinearIssueEvent } from "automate.ax/linear"

export default automation("Watch Linear issues", () => {
  onLinearIssueEvent()
})
```

It accepts only optional static `account`, which defaults to the project binding. A signal cannot choose the workspace at runtime.

## Trigger data

Returns a `Signal<LinearIssueEvent>`:

```ts theme={null}
type LinearIssueEvent = LinearIssue & {
  event: LinearWebhookEvent<LinearIssue, "Issue">
}

interface LinearIssue {
  archivedAt?: string | null
  assignee?: LinearUser | null
  assigneeId?: string | null
  canceledAt?: string | null
  completedAt?: string | null
  createdAt: string
  creator?: LinearUser | null
  creatorId?: string | null
  description?: string | null
  dueDate?: string | null
  estimate?: number | null
  id: string
  identifier: string
  labelIds: string[]
  labels: LinearLabel[]
  number: number
  parentId?: string | null
  priority: number
  priorityLabel: string
  project?: LinearProjectReference | null
  projectId?: string | null
  startedAt?: string | null
  state: LinearWorkflowState
  stateId: string
  subscriberIds: string[]
  team?: LinearTeam | null
  teamId: string
  title: string
  trashed?: boolean | null
  updatedAt: string
  url: string
}

interface LinearWebhookEvent<TData, TType extends string> {
  action: "create" | "update" | "remove"
  actor?: LinearActor | null
  createdAt: string
  data: TData
  organizationId: string
  type: TType
  updatedFrom?: Record<string, JSONValue>
  url?: string
  webhookId: string
  webhookTimestamp: number
}

interface LinearUser {
  avatarUrl?: string | null
  email: string
  id: string
  name: string
  url: string
}

interface LinearLabel {
  color: string
  id: string
  name: string
  parentId?: string | null
}

interface LinearProjectReference {
  id: string
  name: string
  url: string
}

interface LinearWorkflowState {
  color: string
  id: string
  name: string
  type: string
}

interface LinearTeam {
  id: string
  key: string
  name: string
}

interface LinearActor {
  email?: string
  id?: string
  name?: string
  type?: string
  url?: string
}
```

Provider fields that Linear adds remain available on the typed resource objects and webhook envelope.

Returns the changed issue directly, including typed `id`, `identifier`, `title`, timestamps, priority, workflow state, team, project, assignee, and labels. The original provider payload is available as `event`; inspect `event.action` to distinguish `create`, `update`, and `remove`, or use `event.updatedFrom` for previous values. Call `getLinearIssue` when you need the latest normalized issue after the webhook.
