> For the complete documentation index, see [llms.txt](https://docs.roboflow.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.roboflow.com/workflows/blocks/blocks/logic-and-branching/inner-workflow.md).

# Inner Workflow

Execute a **nested workflow** while mapping parent data into the child's inputs via `parameter_bindings`.

Provide either a full inline definition in `workflow_definition`, or resolve a saved workflow using `workflow_workspace_id` and `workflow_id` (optional `workflow_version_id`). Reference fields are expanded at compile time via `workflows_core.inner_workflow_spec_resolver` (default: Roboflow API using `workflows_core.api_key`, or local definitions when workspace is `"local"`).

At compile time the engine validates composition (acyclicity, max depth) and `parameter_bindings`, then **inlines** the child's steps into the parent workflow graph (same execution path as ordinary steps).

The block's `run()` method is not used at runtime; do not call it directly.

### Type identifier

Use the following identifier in step `"type"` field: `roboflow_core/inner_workflow@v1` to add the block as a step in your workflow.

### Properties

| **Name**                | **Type**         | **Description**                                                                                                                                                                                                            | Refs |
| ----------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---- |
| `name`                  | `str`            | Enter a unique identifier for this step..                                                                                                                                                                                  | ❌    |
| `workflow_definition`   | `Dict[Any, Any]` | Full nested workflow definition (same JSON shape as a root workflow: version, inputs, steps, outputs). Required unless `workflow_workspace_id` and `workflow_id` are set; mutually exclusive with those reference fields.. | ❌    |
| `workflow_workspace_id` | `str`            | Workspace id for a saved workflow to load (Roboflow slug or `"local"` for on-disk definitions). Use with `workflow_id`; mutually exclusive with a non-empty `workflow_definition`..                                        | ❌    |
| `workflow_id`           | `str`            | Saved workflow id to fetch. Use with `workflow_workspace_id`..                                                                                                                                                             | ❌    |
| `workflow_version_id`   | `str`            | Optional pinned workflow version when resolving by id..                                                                                                                                                                    | ❌    |

The **Refs** column marks possibility to parametrise the property with dynamic values available in `workflow` runtime. See *Bindings* for more info.

### Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds `Inner Workflow` in version `v1` has.

<details>

<summary>Input and output bindings</summary>

* input
  * `parameter_bindings` ([*`*`*](/workflows/developer-guide/developer-guide/kinds/wildcard.md)): Maps **child** workflow input names to a selector (or literal coerced by the engine) from the parent. Required for every child input except `WorkflowParameter` / `InferenceParameter` entries that declare a non-null `default_value` (those may be omitted and the child's default is used during compilation inlining)..
* output
  * `*` ([`*`](/workflows/developer-guide/developer-guide/kinds/wildcard.md)): Equivalent of any element.

</details>

<details>

<summary>Example JSON definition</summary>

```json
{
	    "name": "<your_step_name_here>",
	    "type": "roboflow_core/inner_workflow@v1",
	    "workflow_definition": "<block_does_not_provide_example>",
	    "workflow_workspace_id": "<block_does_not_provide_example>",
	    "workflow_id": "<block_does_not_provide_example>",
	    "workflow_version_id": "<block_does_not_provide_example>",
	    "parameter_bindings": "<block_does_not_provide_example>"
	}
```

</details>
