# 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)

```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

1. Linear → Settings → API → Personal API Keys
2. Create new key and copy it to `LINEAR_API_KEY`
3. Limit scopes to the projects you plan to sync (optional)
4. Use `queryLinearProjects` to list accessible project identifiers
5. Choose the project identifier to pass when creating the feed

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.graphlit.dev/api-guides/use-cases/feeds/project-management/feed-create-linear.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
