# Linear issue status changed notifications on your phone

> Get a push notification when a Linear issue moves to another status, or only when it's completed.

- Company: Linear (https://www.justpush.io/recipes/linear)
- Event: `Issue` (Issues)
- Tags: Developer tools, Releases
- Install: https://studio.justpush.io/recipes/linear/issue-status
- Web page: https://www.justpush.io/recipes/linear/issue-status

## Setup

1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
2. In Linear, go to Settings > API and click New webhook (workspace admins only).
3. Paste your webhook URL (shown in Studio after install) as the URL and pick the team (or all public teams).
4. Tick the Issues resource type and save.
5. Create a webhook under **Settings → API → New webhook**, pick the team, and tick **Issues**. Every status change pushes; to only hear about finished work (completed or canceled), use:
6. ```
7. your webhook URL (shown in Studio after install)?done=1
8. ```
9. Linear signs deliveries with `Linear-Signature` (HMAC-SHA256), but JustPush doesn't check it yet, so keep your endpoint URL private.

## Code

Studio calls `handleRequest(request)` with the incoming webhook (`{ method, headers, body, query, raw }`) and sends the message object it returns. Returning `null` sends nothing.

```js
// Linear → issue status changed
// Fires when an issue moves to another workflow state (Todo → In Progress → Done …).
// Add ?done=1 to the URL to only hear about completed or canceled issues.
// Docs: https://linear.app/developers/webhooks

// Workflow state types → emoji.
const STATES = { backlog: "🗂️", unstarted: "📋", started: "🚧", completed: "✅", canceled: "🚫", triage: "📥" }

// Only link to real http(s) URLs.
function link(url, cta) {
    return typeof url === "string" && /^https?:\/\//.test(url) ? [{ cta, url }] : []
}

function handleRequest(request) {
    const body = request.body || {}
    const data = body.data ?? {}

    // Guard: only issue updates where the workflow state changed.
    if (body.type !== "Issue" || body.action !== "update" || !("stateId" in (body.updatedFrom ?? {})) || !data.state?.name) {
        console.log("Not an issue status change — skipping")
        return null
    }

    // ?done=1 on the URL limits pushes to issues being completed or canceled.
    const doneOnly = ["1", "true", "yes"].includes(String(request.query?.done ?? "").toLowerCase())

    if (doneOnly && !["completed", "canceled"].includes(data.state.type)) {
        console.log(`Skipping move to "${data.state.name}"`)
        return null
    }

    const emoji = STATES[data.state.type] ?? "🔁"

    return {
        title: `${emoji} ${data.identifier ? `${data.identifier} ` : ""}→ ${data.state.name}`,
        message: [data.title, data.assignee?.name, body.actor?.name ? `by ${body.actor.name}` : null].filter(Boolean).join(" · "),
        topic: "Linear",
        priority: data.state.type === "completed" ? 0 : -1, // Done is worth a look; other moves are quiet
        buttons: link(data.url ?? body.url, "Open issue"),
    }
}
```

## Linear Issue webhook payload (sample)

```json
{
  "url": "https://linear.app/acme/issue/ENG-123/checkout-total-is-off-by-one-cent",
  "data": {
    "id": "2174add1-f7c8-44e3-bbf3-2d60b5ea8bc9",
    "url": "https://linear.app/acme/issue/ENG-123/checkout-total-is-off-by-one-cent",
    "team": {
      "id": "t1",
      "key": "ENG",
      "name": "Engineering"
    },
    "state": {
      "id": "s-done",
      "name": "Done",
      "type": "completed",
      "color": "#5e6ad2"
    },
    "title": "Checkout total is off by one cent",
    "labels": [],
    "number": 123,
    "assignee": {
      "id": "u2",
      "name": "Sam Lee",
      "email": "sam@example.com"
    },
    "priority": 2,
    "createdAt": "2026-09-29T09:00:00.000Z",
    "identifier": "ENG-123",
    "priorityLabel": "High"
  },
  "type": "Issue",
  "actor": {
    "id": "b5ea5f1f-8adc-4f52-b4bd-ab4e84cf51ba",
    "name": "Jane Doe",
    "type": "user",
    "email": "jane@example.com"
  },
  "action": "update",
  "createdAt": "2026-09-29T09:00:00.000Z",
  "webhookId": "000042e3-d123-4980-b49f-8e140eef9329",
  "updatedFrom": {
    "stateId": "s-review",
    "updatedAt": "2026-09-29T08:59:00.000Z"
  },
  "organizationId": "dc844923-f9a4-40a3-825c-dea7747e57d6",
  "webhookTimestamp": 1790672400000
}
```

## FAQ

### Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

### Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Linear and you are done. The code is there if you want to change the text, the sound or the buttons.

### Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

### What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.
