> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-worktree-docs-descriptions.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Use context.invoke to start another Upstash Workflow from within a workflow and await its result, orchestrating multiple workflows together.

You can start another workflow run inside a workflow and await its execution to complete.
This allows to orchestrate multiple workflows together without external synchronization.

When you use `context.invoke`, invoking workflow will wait until the invoked workflow finishes before running the next step.

```typescript theme={"system"}
const {
  body,      // response from the invoked workflow
  isFailed,  // whether the invoked workflow was canceled
  isCanceled // whether the invoked workflow failed
} = await context.invoke(
  "analyze-content",
  {
    workflow: analyzeContent,
    body: "test",
    header: {...}, // headers to pass to anotherWorkflow (optional)
    retries,       // number of retries (optional, default: 3)
    flowControl,   // flow control settings (optional)
    workflowRunId  // workflowRunId to set (optional)
  }
)
```

You can return a response from a workflow, which will be delivered to invoker workflow run.

<Frame caption="You can navigate between the invoker and invoked workflow runs on the dashboard">
  <img src="https://mintcdn.com/upstash-worktree-docs-descriptions/KZjggLwxUHzudrXp/img/workflow/invoke.png?fit=max&auto=format&n=KZjggLwxUHzudrXp&q=85&s=7f0682124a3503200b1abade42e9cf6d" width="2658" height="1976" data-path="img/workflow/invoke.png" />
</Frame>

<Note>
  You cannot create an infinite chain of workflow invocations. If you set up an 'invoke loop' where workflows continuously invoke each other, the process will fail once it reaches a depth of 100.
</Note>
