{
 "schema_version": 1,
 "generated": "2026-10-31",
 "id": "mastra-ai-mastra--build-a-mastra-workflow-with-approval",
 "repo": "mastra-ai/mastra",
 "repo_url": "https://github.com/mastra-ai/mastra",
 "repo_slug": "mastra-ai-mastra",
 "title": "Build a multi-step workflow that waits for approval",
 "page_title": "How to build a multi-step workflow that waits for approval with Mastra",
 "summary": "Use Mastra's graph workflows and suspend and resume to pause for a person before continuing.",
 "who": "A product team automating a multi-step process where one step needs a human yes before it runs.",
 "problem": "Agent-only automations either run risky steps unchecked or need custom state handling to pause.",
 "outcome": "A workflow built with then, branch and parallel that suspends, stores its state and resumes after approval.",
 "steps": [
  "Scaffold a project with `npm create mastra@latest`",
  "Define the steps and chain them with .then(), .branch() and .parallel()",
  "Add a suspend point before the sensitive step, following the suspend-and-resume docs",
  "Configure storage so execution state is remembered while paused",
  "Resume the workflow when the user approves"
 ],
 "agent_prompt": "Using mastra-ai/mastra, build a workflow that <step 1>, then <step 2>, and suspends for my approval before <step 3>. Store its state so it can resume later, and test the full path in Mastra Studio.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README links to the docs for workflow code, so plan to follow the Workflows and suspend-and-resume pages.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js and npm",
  "An API key for a provider such as OpenAI, Anthropic, Google or xAI",
  "Optional: storage for suspend and resume and memory"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/mastra-ai-mastra/build-a-mastra-workflow-with-approval/",
 "md": "https://dedupedai.com/use-cases/mastra-ai-mastra/build-a-mastra-workflow-with-approval/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/mastra-ai-mastra--build-a-mastra-workflow-with-approval.json",
 "api_version": "v1"
}
