> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://ensforge.com/api/mcp` to find what you need.

# getWorkflow

Read saved workflow progress and submission references.

## Import

```ts
import { Ensforge } from "@ensforge/sdk";
```

## Usage

:::code-group
```ts [index.ts]
import { sdk } from "./client";

const result = await sdk.workflows.getWorkflow({
  workflowId: "saved-workflow-id",
});
```

```ts [client.ts]
// [!include ~/snippets/hca/client.ts]
```
:::

## Parameters

### workflowId

`string`

Existing saved workflow instance ID.

### walletClient

`WalletClient | undefined`

Viem wallet override. Defaults to the configured wallet resolver.

### account

`` `0x${string}` | Account | undefined ``

Wallet account override for the operation.

## Return Type

```ts
type GetWorkflowResult = Awaited<ReturnType<typeof sdk.workflows.getWorkflow>>;
```

Returns `WorkflowSnapshot`.

## Effect

Use `.effect` when composing the method in an Effect program. The success and error channels remain
fully typed.

```ts
import { Effect } from "effect";

const program = sdk.workflows.getWorkflow.effect({
  workflowId: "saved-workflow-id",
});

type Success = Effect.Success<typeof program>;
type Failure = Effect.Error<typeof program>;

const result = await Effect.runPromise(program);
```

## Error

The method rejects with the corresponding Core action errors. Use `.effect` to keep those failures
in the typed Effect error channel.

See [Error Handling](/sdk/guides/error-handling).

## Action

* [`getWorkflow`](/core/api/actions/workflows/get-workflow)
* [Guide](/core/guides/workflow-storage)
