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

# Nested workflows

A workflow can run another workflow as one of its steps. The workflow you already trust for one job becomes a building block you can drop into bigger jobs, instead of describing that job again every time.

Here's a quick tutorial on how to nest workflows on Morphic:

{% embed url="<https://youtu.be/64El3CVzg4c>" %}

### Nest a workflow

You set this up by asking Copilot, either while you are building a workflow or when editing one you already have.

1. Open [Workflows](https://studio.morphic.com/workflows) and start a new workflow, or open the '···' menu on an existing one and click 'Edit'
2. Describe the step as you would any other, and name the workflow you want it to run, for example 'for step 2, run my Character reference sheet workflow'
3. Copilot adds it as a step and shows it in the workflow alongside the rest

When the parent workflow runs, it reaches that step and runs the workflow you named, then carries its output into the steps that follow.

### Why it helps

* Improve it in one place. Publish a change to a building block and every workflow that calls it picks it up, so you fix something once rather than in six places.
* Keep each one readable. A long workflow that does four jobs is hard to edit. Four workflows, with one calling the others, is easier to follow and easier to fix.

### Where it works well

* Keeping a character or a look consistent. Settle the character in its own workflow, then call it from the workflow for each scene. Every scene starts from the same character instead of a fresh attempt at it.
* Finishing steps you apply to everything. A caption style, a grade, a format for delivery: put it in one workflow and end your other workflows with it, so the last mile is the same every time.
* Long jobs with distinct stages. Script, then storyboard, then shots. Each stage is a workflow you can run and fix on its own, with one workflow running them in order.
* Work your team shares. When one person gets a step right, everyone else calls that workflow instead of describing the step again and getting a slightly different result.

### Getting better results from it

* Give each building block one job. A workflow that does one thing well is easier to reuse than one that does three things adequately.
* Run a building block on its own before you nest it. Fixing it inside a longer run costs more time than fixing it alone.
* Name it for what it produces, like 'Character reference sheet', so it is obvious which workflow to call.
* Let the outer workflow handle the order and the inner ones handle the detail. That way changing the sequence does not mean rewriting the steps.

### Good to know

* You can reference a workflow shared publicly on Morphic, not only your own, so a community workflow can be a step in yours.
* Each nested workflow keeps its own version history, so you can trace and undo a change to a building block on its own. See [Version history](/docs/workflows/version-history.md).
* Before deleting a workflow, check whether anything calls it. The workflows that do will be left with a step that has nothing to run.

That's how nested workflows work on Morphic. Use them when the same steps show up in more than one workflow.

***

If you have any trouble or have any questions, feel free to reach out. We're happy to help. Write to us at [**support@morphic.com**](mailto:support@morphic.com)**.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://morphic.com/docs/workflows/nested-workflows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
