---
title: "Linear-connector"
description: "Volledige Linear-integratiegids voor het synchroniseren van issues, projecten en teamactiviteitsdata met Brevo via Tajo."
url: https://tajo.io/nl/docs/connectors/custom/linear/
markdown: https://tajo.io/nl/docs/connectors/custom/linear.md
lang: nl-NL
robots: noindex
---

Vraag vroegtijdige toegang aan

Vul je voornaam en je zakelijke e-mailadres in. We sturen je een link om je aanvraag voor toegang tot Tajo te bevestigen.

# Linear-connector

Connectorstatus: Gepland Nog niet gebouwd. Tajo draait deze connector vandaag niet.

| Bronveld | Doelveld | Voorbeeldwaarde |
| --- | --- | --- |
| `record.id` | `source_id` | `record_1042` |
| `record.updated_at` | `updated_at` | `2026-10-18T08:00:00Z` |
| `record.value` | `value` | `sample_value` |

Verbind je Linear-workspace met Brevo voor klantgerichte issue tracking, productupdate-notificaties en campagnes rond ontwikkelingsmijlpalen via Tajo.

## Overzicht

| Eigenschap | Waarde |
| --- | --- |
| **Platform** | Linear |
| **Categorie** | Custom |
| **Setupcomplexiteit** | Eenvoudig |
| **Officiële integratie** | Nee |
| **Gesynchroniseerde data** | Issues, Projecten, Gebruikers, Events |
| **API-type** | GraphQL API |
| **Authenticatie** | OAuth 2.0 / Personal API Key |
| **Base URL** | `https://api.linear.app/graphql` |

## Functies

- **Issue-eventsynchronisatie** - Stuur create-, update- en complete-events van issues door naar Brevo-contacttijdlijnen
- **Tracking van projectmijlpalen** - Trigger Brevo-campagnes wanneer projecten belangrijke mijlpalen bereiken
- **Klant-issue-koppeling** - Koppel Linear-issues aan Brevo-contacten voor supportzichtbaarheid
- **Label-gebaseerde segmentatie** - Map Linear-labels naar Brevo-contactattributen
- **Cycle-analytics** - Synchroniseer sprint-/cyclevoltooiingsdata voor teamprestatierapportage
- **Webhook-gedreven automatisering** - Realtime event-forwarding via Linear-webhooks

## Vereisten

Voordat je begint, zorg dat je beschikt over:

1. Een Linear-workspace met admin-toegang
2. Een Personal API key of geconfigureerde OAuth-applicatie
3. Een Brevo-account met API-toegang
4. Een Tajo-account met een actief abonnement

## Authenticatie

Linear ondersteunt Personal API keys en OAuth 2.0.

### Optie 1: Personal API Key

1. Ga naar **Linear** > **Settings** > **API** > **Personal API keys**
2. Klik op **Create key**
3. Geef de key de naam “Tajo Integration”
4. Kopieer de gegenereerde key (begint met `lin_api_`)

```bash
curl -X POST https://api.linear.app/graphql \
  -H "Authorization: $LINEAR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ viewer { id name email } }"}'
```

### Optie 2: OAuth 2.0

Voor integraties die meerdere workspaces bedienen:

1. Maak een OAuth-applicatie aan op [linear.app/settings/api/applications](https://linear.app/settings/api/applications)
2. Configureer de redirect URI: `https://app.tajo.io/callbacks/linear`
3. Vraag scopes aan: `read`, `write`, `issues:create`, `comments:create`

GraphQL API

Linear gebruikt uitsluitend een GraphQL API. Alle queries en mutations gaan via één endpoint: `https://api.linear.app/graphql`. Tajo regelt de constructie van GraphQL-queries automatisch.

### Verbinden met Tajo

```bash
# Using Personal API Key
tajo connectors install linear \
  --api-key $LINEAR_API_KEY

# Using OAuth
tajo connectors install linear \
  --client-id $LINEAR_CLIENT_ID \
  --client-secret $LINEAR_CLIENT_SECRET
```

## Configuratie

### Basisinstelling

```yaml
connectors:
  linear:
    enabled: true

    sync:
      issues: true
      projects: true
      cycles: true
      users: true

    teams:
      - key: "ENG"
        sync_to_list: 38
      - key: "SUPPORT"
        sync_to_list: 39

    issue_states:
      - Backlog
      - Todo
      - "In Progress"
      - Done
      - Canceled
```

### Veldmapping

Map Linear gebruiker- en issue-data naar Brevo-attributen:

```yaml
field_mapping:
  # User fields
  id: LINEAR_USER_ID
  email: email
  name: FIRSTNAME

  # Issue metrics mapped to contact events
  last_issue_identifier: LAST_LINEAR_ISSUE
  last_issue_state: LAST_ISSUE_STATUS
  last_issue_priority: LAST_ISSUE_PRIORITY
  total_issues: LINEAR_ISSUE_COUNT

  # Project data
  current_project: ACTIVE_PROJECT
  team_key: LINEAR_TEAM
```

### Eventmapping

```yaml
event_mapping:
  Issue.create: ISSUE_CREATED
  Issue.update: ISSUE_UPDATED
  Issue.remove: ISSUE_DELETED
  Comment.create: COMMENT_ADDED
  Project.update: PROJECT_UPDATED
  Cycle.update: CYCLE_UPDATED
```

## API-endpoints

Linear gebruikt één GraphQL-endpoint. Belangrijkste queries en mutations die door Tajo worden gebruikt:

| Operatie | Type | Doel |
| --- | --- | --- |
| `issues` | Query | Issues opvragen en filteren |
| `issue` | Query | Eén issue ophalen op basis van ID |
| `projects` | Query | Alle projecten opvragen |
| `cycles` | Query | Cycles (sprints) opvragen |
| `teams` | Query | Workspace-teams opvragen |
| `users` | Query | Workspace-leden opvragen |
| `viewer` | Query | Info over geauthenticeerde gebruiker |
| `issueCreate` | Mutation | Nieuwe issue aanmaken |
| `issueUpdate` | Mutation | Bestaande issue bijwerken |
| `commentCreate` | Mutation | Reactie toevoegen aan een issue |
| `webhookCreate` | Mutation | Een webhook registreren |

### Voorbeeld GraphQL-query

```graphql
query GetIssues($filter: IssueFilter, $first: Int, $after: String) {
  issues(filter: $filter, first: $first, after: $after) {
    nodes {
      id
      identifier
      title
      state { name }
      priority
      assignee { email name }
      labels { nodes { name } }
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      endCursor
    }
  }
}
```

## Codevoorbeelden

### Connector initialiseren

```javascript
import { TajoClient } from '@tajo/sdk';

const tajo = new TajoClient({
  apiKey: process.env.TAJO_API_KEY,
  brevoApiKey: process.env.BREVO_API_KEY
});

await tajo.connectors.connect('linear', {
  apiKey: process.env.LINEAR_API_KEY
});
```

### Issues synchroniseren

```javascript
await tajo.connectors.sync('linear', {
  type: 'incremental',
  resources: ['issues'],
  teams: ['ENG', 'SUPPORT'],
  since: '2024-01-01'
});

const status = await tajo.connectors.status('linear');
console.log(status);
// {
//   connected: true,
//   lastSync: '2024-03-15T18:00:00Z',
//   issuesTracked: 3200,
//   projectsMonitored: 8,
//   usersLinked: 45
// }
```

### Linear-webhooks afhandelen

```javascript
app.post('/webhooks/linear', async (req, res) => {
  const event = req.body;

  // Verify webhook signature
  const signature = req.get('Linear-Signature');
  if (!verifyLinearSignature(req.body, signature)) {
    return res.status(401).send('Unauthorized');
  }

  await tajo.connectors.handleWebhook('linear', {
    type: event.type,
    action: event.action,
    payload: {
      issueId: event.data?.id,
      identifier: event.data?.identifier,
      title: event.data?.title,
      state: event.data?.state?.name,
      assigneeEmail: event.data?.assignee?.email
    }
  });

  res.status(200).send('OK');
});
```

### Issue aanmaken vanuit Brevo-event

```javascript
// Create a Linear issue when a Brevo contact submits a request
tajo.events.on('contact.event', async (event) => {
  if (event.name === 'FEATURE_REQUEST') {
    await tajo.connectors.create('linear', {
      teamId: 'ENG',
      title: `Feature Request: ${event.data.subject}`,
      description: event.data.description,
      priority: 3,
      labelIds: ['feature-request']
    });
  }
});
```

## Rate limits

Linear hanteert rate limits op zijn GraphQL API:

| Limiettype | Waarde |
| --- | --- |
| **Requestrate** | 1.500 requests per uur per API key |
| **Querycomplexiteit** | 10.000 complexity points per request |
| **Paginering** | 250 nodes max per pagina (default 50) |
| **Webhooks** | Onbeperkt aantal binnenkomende events |

Complexity Budget

Linear gebruikt een rate limiting-systeem op basis van complexiteit. Eenvoudige queries kosten minder punten. Tajo optimaliseert queries om de complexiteit te minimaliseren door alleen benodigde velden op te vragen en efficiënte paginering te gebruiken.

Linear retourneert `429 Too Many Requests` met een `Retry-After`-header wanneer limieten worden overschreden.

## Probleemoplossing

### Veelvoorkomende problemen

| Probleem | Oorzaak | Oplossing |
| --- | --- | --- |
| 401 Unauthorized | Ongeldige of ingetrokken API key | Genereer een nieuwe API key in Linear Settings |
| Query-fouten | Ongeldige GraphQL-syntax | Valideer queries via Linear’s API explorer |
| Ontbrekende issues | Teamtoegang beperkt | Zorg dat de eigenaar van de API key toegang heeft tot de doelteams |
| Webhook vuurt niet | Verkeerde URL of uitgeschakeld | Controleer webhookstatus in Linear Settings > API > Webhooks |
| Paginering onvolledig | Ontbrekende `after`-cursor | Loop pagineringsverzoeken door totdat `hasNextPage` false is |

### Debugmodus

```yaml
connectors:
  linear:
    debug: true
    log_level: verbose
    log_queries: true
```

### Verbinding testen

```bash
tajo connectors test linear
# ✓ GraphQL API connection successful
# ✓ Workspace access verified
# ✓ Team list readable
# ✓ Issue query operational
# ✓ Webhook registration available
```

## Best practices

1. **Gebruik webhooks voor realtime** - Registreer webhooks in plaats van te pollen voor issuewijzigingen
2. **Filter op team** - Synchroniseer alleen issues van relevante teams om API-gebruik te beperken
3. **Optimaliseer GraphQL-queries** - Vraag alleen benodigde velden op om binnen complexiteitslimieten te blijven
4. **Map labels naar segmenten** - Gebruik Linear-labels om Brevo-contactsegmentatie aan te sturen
5. **Behandel paginering** - Controleer altijd `hasNextPage` en gebruik `endCursor` voor volledige data
6. **Verifieer webhook-signatures** - Valideer altijd de `Linear-Signature`-header

## Beveiliging

- **API Key-authenticatie** - Personal keys gescoped op workspace
- **OAuth 2.0** - Veilige autorisatieflow voor multi-workspace-integraties
- **Alleen HTTPS** - Alle API-communicatie versleuteld via TLS 1.2+
- **Webhook-signatures** - HMAC-gebaseerde signatureverificatie
- **Versleutelde opslag** - API keys versleuteld in rust binnen Tajo
- **SOC 2-compliance** - Linear-platform is SOC 2 Type II-gecertificeerd

## Gerelateerde bronnen

- [GitHub-connector](https://tajo.io/nl/docs/connectors/custom/github)
- [Jira-connector](https://tajo.io/nl/docs/connectors/custom/jira)
- [Notion-connector](https://tajo.io/nl/docs/connectors/custom/notion)
- [Brevo Contacts API](https://tajo.io/nl/docs/contact-management)
