---
title: configureWorkflowController
description: Point WorkflowController at the generated workflow bundles.
docs_index: /llms.txt
lastUpdated: 2026-10-21
type: reference
summary: Configure the directory WorkflowController loads workflow bundles from.
prerequisites:
  - /docs/getting-started/nestjs
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

Configures the output directory that [`WorkflowController`](/docs/api-reference/workflow-nest/workflow-controller) loads the generated workflow bundles (`steps.mjs`, `workflows.mjs`, `webhook.mjs`, `manifest.json`) from.

> Deprecated. [`WorkflowModule.forRoot()`](/docs/api-reference/workflow-nest/workflow-module) provides the output directory through dependency injection, which this function predates. It writes process-global state, so two applications in one process (the usual `Test.createTestingModule` setup) overwrite each other's configuration. It is kept only so existing callers keep working.

`WorkflowModule.forRoot()` still calls this for you, and injected options take precedence over it. Call it yourself only when registering `WorkflowController` without the module. A controller with no configuration at all answers `503` with an explanatory message.

## Usage

```typescript title="src/app.module.ts" lineNumbers
import { join } from "node:path";
import { configureWorkflowController } from "workflow/nest"; // [!code highlight]

configureWorkflowController(join(process.cwd(), ".nestjs/workflow")); // [!code highlight]
```

## API signature

### Parameters

| Parameter | Type     | Description                                                                                                                                                |
| --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `outDir`  | `string` | Directory containing the generated workflow bundles. Should match the `outDir` used by the builder (default: `.nestjs/workflow` in the working directory). |

### Returns

Returns `void`.

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)