Skip to main content

Installation

Environment Variables

Get your credentials from Linear API Settings.

Configuration Options

Setup

For personal projects or testing:

Webhook Handler

Configure webhook in Linear:
  1. Go to Settings → Workspace → Webhooks
  2. Create webhook with URL: https://your-app.com/webhooks/linear
  3. Add webhook secret
  4. Subscribe to events: Comment (create), Reaction (create/delete)

Features

Supported Events

  • Comment (create) - New comments on issues
  • Reaction (create/delete) - Emoji reactions on comments

Thread Types

Linear adapter supports two thread types: 1. Issue-level threads
All top-level comments on an issue. 2. Comment-level threads
Replies to a specific comment (nested thread).

Posting Comments

Post to issue:
Reply to a comment thread:

Markdown Support

Linear supports markdown in comments:

Reactions

Add reactions to comments:
removeReaction() is not fully supported. Linear requires the reaction ID, which would need an additional API call to look up.

Cards

Cards are converted to markdown:

Thread IDs

Linear thread IDs encode issue ID and optional comment ID:
Examples:
  • Issue: linear:PROJ-123
  • Comment thread: linear:PROJ-123:c:abc123

Message History

Fetch comments from an issue or comment thread:

Threading Behavior

Linear webhooks include parent comment information:
  • Root comment (no parentId): Creates new comment-level thread
  • Reply (has parentId): Routes to parent’s thread
This ensures all replies to a comment are grouped together.

Platform Limits

  • Comment length: ~10,000 characters (no official limit documented)
  • API rate limits: Linear rate limits

Code Examples

Troubleshooting

  • Verify LINEAR_WEBHOOK_SECRET matches Linear webhook settings
  • Check webhook timestamp is within 5 minutes (prevent replay attacks)
  • Ensure request body is raw (not parsed)
  • Enable “Comment” webhook event in Linear settings
  • Verify webhook URL is publicly accessible (HTTPS required)
  • Check API key/token has comments:create scope
  • Grant comments:create scope for adding reactions
  • Use Unicode emoji strings or emoji names
  • Note: removeReaction() has limited support
  • Adapter auto-refreshes tokens before expiry
  • If manual refresh needed, restart the adapter
  • Tokens are valid for 30 days

Required Scopes

Linear OAuth Scopes:
  • read - Read issues and comments
  • write - Create/edit comments
  • comments:create - Create comments
  • issues:create - Create issues (if needed)
Personal API keys have full access to your workspace.

Creating a Linear OAuth App

1

Create OAuth app

Go to Linear OAuth Apps and create a new application.
2

Configure scopes

Select required scopes:
  • read
  • write
  • comments:create
3

Get credentials

Copy Client ID and Client Secret.
4

Set redirect URL

Add your OAuth callback URL (if using user authorization flow).

Next Steps

Message Handling

Process comments and build workflows

Linear SDK

Learn about the Linear GraphQL API

Issue Automation

Build automated issue management bots

State Management

Persist data across issue comments