# Get Workflow — Ironclad

> Retrieves the full Ironclad workflow object, including its schema and current attribute keys and types. Use the returned schema to construct a valid updates payload for Update Workflow Attributes. Run Search Workflows first to find a…

- Key: `ironclad-get-workflow`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Ironclad (`ironclad`) — https://pipedream.com/apps/ironclad.md
- This page (HTML): https://pipedream.com/apps/ironclad/actions/get-workflow
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/ironclad/actions/get-workflow/get-workflow.mjs

## Description

Retrieves the full Ironclad workflow object, including its schema and current attribute keys and types. Use the returned schema to construct a valid `updates` payload for **Update Workflow Attributes**. Run **Search Workflows** first to find a workflow ID. Example: set `workflowId` to `"wf_xyz789"` to retrieve a workflow with fields such as `id`, `title`, `status`, `currentStep`, and `attributes` (a map of attribute key → value). Use the optional `fields` param (e.g. `"id,title,status"`) to return only specific top-level keys. [See the documentation](https://developer.ironcladapp.com/reference/retrieve-a-workflow)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `workflowId` | `string` | Yes | The identifier of a workflow. Obtain via Search Workflows. Options are loaded from the connected account. |
| `hydrateEntities` | `boolean` | No | Whether to expand referenced entities in the response. Defaults to false. |
| `fields` | `string` | No | Comma-separated list of top-level response keys to return (e.g. id,title,status). If omitted, the full response object is returned. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "ironclad",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "ironclad-get-workflow",
  arguments: {
    workflowId: "Workflow ID",
    hydrateEntities: true,
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "ironclad-get-workflow",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    ironclad: { authProvisionId: "apn_xxxxxxx" },
    workflowId: "Workflow ID",
    hydrateEntities: true,
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "ironclad-get-workflow",
    "configured_props": {
      "ironclad": { "authProvisionId": "apn_xxxxxxx" },
      "workflowId": "Workflow ID",
      "hydrateEntities": true
    }
  }'
```

---

- App: https://pipedream.com/apps/ironclad.md · All apps: https://pipedream.com/apps
