Create Linear Feed
User Intent
"How do I sync Linear issues? Show me Linear feed configuration."
Operation
SDK Method: createFeed() with FeedTypes.Issue
Feed Service: Linear
Auth: API token
Code Example (TypeScript)
import { Graphlit } from 'graphlit-client';
import {
FeedTypes,
FeedServiceTypes,
LinearFeedPropertiesInput,
LinearProjectsInput,
} from 'graphlit-client/dist/generated/graphql-types';
const graphlit = new Graphlit();
const linearKey = process.env.LINEAR_API_KEY!;
// Enumerate projects (teams) in Linear
const projectsResponse = await graphlit.queryLinearProjects({
key: linearKey,
});
const projects = projectsResponse.linearProjects?.results ?? [];
if (projects.length === 0) {
throw new Error('No Linear projects available for the provided API key');
}
const projectIdentifier = projects[0]!;
console.log(`Using Linear project: ${projectIdentifier}`);
const feed = await graphlit.createFeed({
name: 'Product Linear',
type: FeedTypes.Issue,
issue: {
type: FeedServiceTypes.Linear,
linear: {
key: linearKey,
project: projectIdentifier,
readLimit: 100,
includeAttachments: true,
},
},
// Optional: add workflow for content processing
// workflow: { id: workflow.createWorkflow.id }
});Configuration
key: Linear API key
project: Linear project identifier (enumerate via queryLinearProjects)
readLimit: Max issues to sync
includeAttachments: Capture linked files and images
API Key Setup
Linear → Settings → API → Personal API Keys
Create new key and copy it to
LINEAR_API_KEYLimit scopes to the projects you plan to sync (optional)
Use
queryLinearProjectsto list accessible project identifiersChoose the project identifier to pass when creating the feed
Last updated
Was this helpful?