# Linear
URL: https://docs.clearly-ai.com/docs/integrations/issue-trackers/linear
Description: Connect Clearly AI to Linear.
Connect Linear so Clearly AI can read Linear issues as Project sources and use Linear in Workflows.

The Linear integration supports:

* **OAuth 2.0** with Linear `read` and `write` access.
* **Shared API Token** authentication.

<Note>
  For Shared API Token setup, create a Linear API key from the workspace Clearly AI should access. For Workflow triggers, you need Linear workspace admin access, or an OAuth app with permission to create webhooks.
</Note>

## Connect Linear [#connect-linear]

1. In Clearly AI, open **Organization settings**, select **Integrations**, then click **Set up** on the Linear card.
2. Under **Authentication**, select **OAuth 2.0** or **Shared API Token**.
3. Check **I understand** under the shared-credential notice.
4. For **OAuth 2.0**, click **Connect** and approve access in Linear. For **Shared API Token**, paste the API key.
5. Click **Add workspace credential**. Clearly AI tests the credential and enables the integration only when the test passes.

To connect your own Linear account instead, open **Customize**, go to the **Yours** tab, and click **Connect** on Linear. Linear appears there only after an admin installs its connector. When a Source or Workflow runs as you, it uses your personal connection.

## Add a Linear issue as a source [#add-a-linear-issue-as-a-source]

1. Open a Project.
2. Open **Manage Sources** and click **Search Integrations**.
3. Select **Linear**.
4. Confirm the workspace. Linear tokens are scoped to one workspace.
5. Enter the issue ID, such as `ENG-123`.
6. Save the source.

Clearly AI fetches the issue title, description, status, priority, labels, team, project, assignee, comments, sub-issues, and attachments when available.

## Use Linear in Workflows [#use-linear-in-workflows]

Linear Workflow support includes:

* **Linear Issue Created or Updated** trigger, with optional label and team filters.
* **Create Linear Ticket**.
* **Assign Linear Ticket**.
* **Create Linear Comment**.
* **Attach Review Export to Linear Ticket**.

To use the trigger, configure the Linear webhook in Clearly AI and in Linear. Linear webhooks are configured from **Settings > API** and should send **Issue** events to the Clearly AI webhook URL.

The Clearly AI webhook settings include:

* **Webhook URL**: paste this into the Linear webhook configuration.
* **Signing Secret**: paste the signing secret from the Linear webhook detail page so Clearly AI can verify the `Linear-Signature` header.
* **Workspace Slug**: the URL key from `linear.app/<workspace-slug>`.

## FAQs [#faqs]

<Accordions>
  <Accordion title="Why is the workspace wrong?">
    Linear API tokens and OAuth connections are scoped to one workspace. Reconnect with an account from the workspace you want Clearly AI to use.
  </Accordion>

  <Accordion title="Why can't Clearly AI fetch a Linear issue?">
    Confirm the issue ID is correct, such as `ENG-123`, and the Linear account can open that issue directly.
  </Accordion>

  <Accordion title="Why isn't my Linear workflow trigger running?">
    Confirm the Linear webhook is enabled, sends Issue events, uses the Clearly AI webhook URL, and has the same signing secret saved in Clearly AI. Also check that the issue matches any label or team filters on the trigger node.
  </Accordion>

  <Accordion title="Why do comments, assignment, or attachments fail?">
    Use OAuth 2.0 or a token with write access to the relevant Linear workspace.
  </Accordion>
</Accordions>

## Related [#related]

* [Integrations](https://docs.clearly-ai.com/docs/integrations)
* [Workflows](https://docs.clearly-ai.com/docs/workflows)