> ## 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 customer need created

> Run an automation when Linear reports customer need created.

`linear.onCustomerNeedCreated` handles customer need created in the connected Linear workspace.

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

export default automation("On customer need created", () => {
  const event = linear.onCustomerNeedCreated()
  // Sync the Linear customer need to the CRM.
})
```

Optional static `account` defaults to the project binding. Linear webhook triggers require an OAuth connection with read access. The workspace can't change at runtime.

## Trigger data

Returns a `Signal<LinearCustomerNeedTrigger>`:

```ts theme={null}
type LinearCustomerNeedTrigger = LinearCustomerNeed & {
  event: LinearWebhookEvent<LinearCustomerNeed, "create">
}

interface LinearCustomerNeed {
  archivedAt?: string | null
  attachmentId?: string | null
  body?: string | null
  commentId?: string | null
  createdAt: string
  creatorId?: string | null
  customerId?: string | null
  id: string
  issueId?: string | null
  priority: number
  projectId?: string | null
  updatedAt: string
}

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

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

A customer need can point to an attachment, comment, customer, issue, or project. Each relationship is independently nullable. Resource objects and the webhook envelope retain extra Linear fields.
