# Linear Trigger

Start a workflow when an issue, comment, project, cycle or another Linear record is created, updated or removed.

## Connect Linear Trigger

1. In the sidebar, open **Connections** and press **Add connection**.
2. Type `linear trigger` and choose **Linear Trigger**.
3. Choose **Sign in with Linear Trigger**.
4. Press **Sign in with Linear Trigger** at the bottom of the sheet, then choose your account in Linear Trigger’s window and allow access.

Or choose **Paste your personal API key**, paste it, and press **Test and save**. It stays until someone deletes it.

Creating a Linear webhook needs a workspace admin. Sign in with Linear as an admin (the sign-in asks for Linear’s admin scope), or paste a personal API key of an admin (Linear → Settings → Security & access → Personal API keys).

**What if it says “Sign-in isn’t set up here yet”?**

Signing in with Linear Trigger needs a Linear Trigger app on this installation, and it has none yet. Until it is set up, **Paste your personal API key** works without it.

**On Cloud:** The sheet says “It’s set up once for everyone who uses this service, not by an organization.”

**Self-hosted:** An admin of the installation sees **Set up Linear Trigger sign-in** instead, and sets it up once for everyone. Everyone else sees who to ask.

1. Create an app in Linear Trigger’s developer settings ([Linear Trigger’s guide](https://linear.app/settings/account/security)).
2. In GoRunner, copy the **Redirect address to add in Linear Trigger’s developer settings**, and add it to the app.
3. Paste the **Client ID** and **Client secret**, then press **Save and sign in**.

[Set up a sign-in app](https://docs.gorunner.io/self-host/oauth-apps#other-providers)

**Can I use my own Linear Trigger app?**

Yes. In the sheet, open **Use your own Linear Trigger app** and paste its **Client ID** and **Client secret**. Add the redirect address it shows to your app first. The connection then signs in through your app instead of the installation’s.

[Connections](https://docs.gorunner.io/build/connections) says how to sign in again, rename or delete it. In a product that embeds GoRunner, **Add connection** can be missing: then [your provider makes connections](https://docs.gorunner.io/embed/customer-connections) for you.

## Start a workflow

### On Linear Event

Starts a run when Linear reports a change to the records picked below, in one team or in every public team. Publishing the workflow creates the Linear webhook (with a signing secret kept encrypted); unpublishing removes it. Every delivery is checked (Linear-Signature, and a timestamp no older than a day), and an unsigned or wrongly signed one is refused; a delivery Linear sends again starts no second run. The connection must belong to a Linear workspace admin.

- **Team · Optional**: The team whose changes start a run. Shows when **All Public Teams** is off.
- **All Public Teams · Optional**: Listen to every public team, including teams created later, instead of one team. Off by default.
- **Listen to Resources · Required**: Which kinds of Linear records start a run. Options: Issues to Users (16 options).
- **Actions · Optional**: Which changes start a run. Empty means all three. Issue SLA events (set, high risk, breached) are not changes and always start one. Options: Created, Updated, Removed.

A later step can use its data, such as `{{trigger.action}}`, `{{trigger.actor}}`, `{{trigger.createdAt}}` and 9 more. See [Use data from earlier steps](https://docs.gorunner.io/build/use-data-from-earlier-steps).

Not in your list? See [When an app isn’t here](https://docs.gorunner.io/apps/when-an-app-isnt-here#q-not-in-list).

## For developers

In the API, which calls apps pieces, Linear Trigger is `pieceId: "lineartrigger"`. Its trigger is `lineartrigger` / `linear_event`. [Get an app](https://docs.gorunner.io/api/apps/get-app) returns every field.

Source: https://docs.gorunner.io/apps/linear-trigger
