> For the complete documentation index, see [llms.txt](https://docs.graphlit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphlit.dev/api-guides/use-cases/workflows/workflow-complex-all-stages.md).

# Complex Workflow with All Stages

## User Intent

"How do I configure a workflow with all processing stages? Show me complete workflow setup."

## Operation

**SDK Method**: `createWorkflow()` with all stages\
**Use Case**: Comprehensive content processing pipeline

***

## Code Example (TypeScript)

```typescript
import { Graphlit } from 'graphlit-client';
import {
  FilePreparationServiceTypes,
  ExtractionServiceTypes,
  ObservableTypes
} from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

const workflow = await graphlit.createWorkflow({
  name: "Complete Processing Pipeline",
  
  // Stage 1: Preparation (text extraction, OCR, transcription)
  preparation: {
    jobs: [{
      connector: {
        type: FilePreparationServiceTypes.ModelDocument,
        chunkSize: 1000,
        chunkOverlap: 200
      }
    }]
  },
  
  // Stage 2: Extraction (entity extraction)
  extraction: {
    jobs: [{
      connector: {
        type: EntityExtractionServiceTypes.ModelText,
        extractedTypes: [
          ObservableTypes.Person,
          ObservableTypes.Organization,
          ObservableTypes.Place,
          ObservableTypes.Event
        ]
      }
    }]
  },
  
  // Stage 3: Enrichment (future feature)
  // enrichment: {
  //   jobs: [{ /* enrichment config */ }]
  // },
  
  // Specification (which model to use)
  specification: { id: 'specification-id' }
});

console.log(`Created comprehensive workflow: ${workflow.createWorkflow.id}`);
```

***

## Workflow Stages

**Preparation**: Text extraction, OCR, transcription\
**Extraction**: Entity extraction, classification\
**Enrichment**: External data augmentation (future)

***
