Build on Linear without limits. Sync all your Linear data to your Postgres database in real-time. Query your Issues, Comments, and Cycles with SQL or your ORM. Get all API events in a hosted Kafka cluster. And
delete Linear records in both Linear and your database simultaneously.
Setup & installation
To connect Sequin to Linear, you need to generate an API key from your Linear settings and add it to Sequin.
Generate an API key from Linear
- Go to your Linear settings, find the API section.
- Generate a new API key by clicking on the "New API key" button.
- Choose the scopes for the API key according to the access level you wish to grant Sequin.
- Copy the generated API key.
Install Sequin with Linear
- In the Sequin console, click Add sync and select Linear.
- Enter the API key you generated from Linear.
- Select the collections and data you want to sync.
After you've set up the sync, Sequin will backfill your database with your Linear data.
The syncing process
We first backfill your database with all your Linear data. Backfilling typically completes in a few minutes. For larger Linear workspaces this can take longer - if you have a workspace with millions of objects this may take up to an hour. We'll email you when your backfill is complete and Sequin has loaded all your data into your database.
After the initial backfill, we'll rely on Linear webhooks to monitor changes. Webhooks allow Sequin to instantly capture changes to your Linear data. We backstop webhooks with an occasional polling process to ensure we don't miss any events. This means changes on Linear should propagate to your database in just a few seconds.
Learn more about our syncing process.
Read and write Linear data using SQL
After synchronization, access your Linear data using SQL through Sequin's Postgres Proxy.
Here's how Linear data may appear in your database:
List of relations
Schema | Name | Type | Owner
public | _sync_cdc | table | sequin
public | issues | table | sequin
public | teams | table | sequin
public | users | table | sequin
public | projects | table | sequin
public | milestones | table | sequin
public | cycles | table | sequin
public | comments | table | sequin
public | labels | table | sequin
public | attachments | table | sequin
Example of querying the issues table:
team_id = 'linear_team_id';
Which returns a row like:
-[ RECORD 1 ]+-------------------------
id | lin_abcdefghijk
title | Implement OAuth 2.0 flow
description | Implement the OAuth 2.0 flow to allow users to authenticate using external providers.
state | todo
priority | high
creator_id | lin_creator123
assignee_id | lin_assignee456
created_at | 2023-11-01T10:00:00.000Z
updated_at | 2023-11-03T15:30:00.000Z
Updating an Issue
To update an issue's state:
set state = 'completed'
where id = 'lin_abcdefghijk';
Sequin validates the write through the Linear API in real time so your change applies to Linear and your database immediately.
If a write to Linear through Sequin fails, Sequin returns the error as a Postgres error and rolls back the transaction. For example, if you try to update an issue that doesn't exist, Sequin returns the following error:
db7hea89oah3tas=> update issues set state = 'completed' where id = 'lin_abcdefghijk';
ERROR: [Linear] Issue `lin_abcdefghijk` not found
Your Linear tables are now available as fully readable and writeable tables in your database. You can query for all your data using SQL, and mutate data thanks to Sequin's Postgres Proxy. To build on this foundation, here are some next steps:
- Setup your ORM to work with your synced tables.
- Edit the Linear objects and properties you're syncing at any time.
- Create views on your Linear data to tailor your schema to your needs.
- Invite your team to your Sequin account and start building!
If you need assistance setting up your sync, just send us a note. We're around and eager to help.