Skip to content
Available onCommunityPro

Linear Webhook Integration

Collect Linear issue events (via webhooks), transform them to CDEvents.

  • Linear notifies a webhook when an issue is created, updated, or removed.
  • cdviz-collector transforms these events to ticket CDEvents, and sends them to the database, listeners,...

From eventCDEvents
Issue / createticket.created
Issue / update (moved to a closed state)ticket.closed
Issue / update (other)ticket.updated
Issue / remove (issue not closed)ticket.closed

Only Issue webhooks are handled. Other types (Comment, Project, Cycle, ...) are ignored.

Configuration ​

Setting Up cdviz-collector ​

Configure cdviz-collector.toml to receive Linear webhook events:

toml
[sources.linear_webhook]
enabled = true
transformer_refs = ["linear_webhook"]

[sources.linear_webhook.extractor]
type = "webhook"
id = "000-linear" # used as part of the webhook's url
headers_to_keep = []

[sources.linear_webhook.extractor.headers]
# linear signs with HMAC-SHA256, hex encoded, over the raw body, without prefix
# https://linear.app/developers/webhooks#securing-webhooks
"linear-signature" = { type = "signature", signature_encoding = "hex", signature_on = "body", token = "changeme" }

# Transformer from transformers-community repository
[remote.transformers-community]
type = "github://cdviz-dev/transformers-community"

[transformers]
linear_webhook = { type = "vrl", template_rfile = "transformers-community:///linear_webhook/to_v0_5.vrl" }

Replace changeme with the signing secret of the Linear webhook. For more details on remote transformers, see the Transformers documentation.

Setting Up the Linear Webhook ​

  1. In Linear: Settings > API > Webhooks > New webhook.
  2. URL: https://your-collector-url/webhook/000-linear
  3. Select the Issues data change events.
  4. Copy the signing secret into the collector config (the token of the linear-signature header).

To verify webhook reception before transformation:

toml
[sources.linear_webhook]
transformer_refs = ["log", "discard_all"]  # Log payloads without processing

For webhook troubleshooting, see the Webhook Extractor documentation.

Event Mapping ​

Event type detection is performed in VRL based on the type and action fields:

Linear type / actionCDEvent TypeNotes
Issue / createticket.created
Issue / update, state moved to closedticket.closedupdatedFrom.stateId set and state.type is closed
Issue / update, otherticket.updatedincludes edits of an already closed issue
Issue / remove, issue not closedticket.closedresolution = "withdrawn"
Issue / remove, issue already closed(skipped)ticket.closed was emitted by the earlier update

A state is closed when state.type is completed or canceled.

Ticket Fields ​

CDEvent FieldLinear SourceNotes
subject.iddata.url without the title slughttps://linear.app/<workspace>/issue/<identifier>
content.summarydata.title
content.ticketType"issue"Linear has no issue type
content.prioritydata.priorityLabel (lowercased)no priority, urgent, high, medium, low
content.assignees[data.assigneeId]empty when unassigned
content.labelsdata.labels[].name
content.milestonedata.projectMilestone.nameor null
content.resolutiondata.statecompleted → completed; canceled named Duplicate → duplicate; other canceled → withdrawn

customData.linear keeps the webhook envelope (action, type, actor, updatedFrom, ...) and the issue identity (id, identifier, state, team, project, cycle).

Limits ​

  • Do not run with the GraphQL API polling at the same time: both emit ticket.created and ticket.closed with different content and timestamps, so each step is stored twice. Use polling to backfill up to a date, then the webhook.
  • Team move: subject.id uses the issue identifier (ENG-123). When an issue moves to another team, Linear gives it a new identifier, so later events have a new subject.id. customData.linear.issue.id stays stable.

The transformer source is linear_webhook/to_v0_5.vrl.