Run a workflow before your agent takes control of the conversation.
The initialization workflow is the first thing that runs when a conversation starts - before your agent sees any messages. It gives you a controlled, deterministic space to handle setup: load user data, authenticate, set variables, or send a static greeting. Once the workflow completes, control passes to your agent and the conversation continues normally.If you don’t set an initialization workflow, conversations begin directly with your agent.
Setting an initialization workflow
Open the Framework tab in the sidebar. Click the Add workflow on the initialization node and select an existing workflow, or click create to build a new one.Once set, this workflow runs automatically at the start of every conversation. When the workflow ends - or when any step has an empty output port - the conversation navigates directly to your agent. You don’t need to explicitly route to the agent; any unconnected port does this automatically.
Common patterns
Loading context
The most common use case. Make API calls at the start of a conversation to fetch user data - account info, order history, subscription tier etc. - and store it in variables. Your agent and playbooks have the context they need from the very first turn.Predictive conversations - Run these calls asynchronously to load data in the background while the conversation is already happening. Fetch a customer’s recent orders during authentication, pull account details while the agent greets the user. By the time the agent needs the data, it’s already there - no loading state, no awkward pause. Your agent can open with “I see you have an order arriving later today — is that what you’re calling about?” instead of asking the customer to state their intention.
Static start message
If you want your agent to open with a specific greeting rather than generating one, add a text response step to your initialization workflow. Turn on Wait for user input after the message so the workflow pauses for the user to respond before handing off to the agent - otherwise the agent will immediately start talking over your greeting.
Authentication
Gate the conversation behind identity verification. Check a user token, validate credentials via API, or collect an account number before your agent has access to any sensitive tools or data.
Onboarding
Collect required information upfront - name, language preference, reason for contact - using a structured flow before the agent takes over. This is useful when you need specific variables set before any playbook can run effectively.
Was this page helpful?
⌘I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Voiceflow Documentation","description":"Build, launch, and scale AI agents for every customer channel — all in one platform.","colors":{"primary":"#2F68DB","light":"#2F68DB","dark":"#397DFF"},"logo":{"light":"https://mintcdn.com/voiceflow-009a8802/1vhxJ0GVX_3qkVnB/logo/Wordmark_dark.svg?fit=max\u0026auto=format\u0026n=1vhxJ0GVX_3qkVnB\u0026q=85\u0026s=8e412b15780e514697534faf70db3b75","dark":"https://mintcdn.com/voiceflow-009a8802/1vhxJ0GVX_3qkVnB/logo/Wordmark_white.svg?fit=max\u0026auto=format\u0026n=1vhxJ0GVX_3qkVnB\u0026q=85\u0026s=64dc7a2e2414fe24e295e621410522b6"},"favicon":"https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Favicon_docs.png?fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=298e6fedd127e2473e6e15760152d714","api":{"playground":{"display":"simple"},"examples":{"languages":["bash"]}},"appearance":{"default":"light","strict":false},"background":{"color":{"light":"#fff","dark":"#1a1a1a"}},"navbar":{"links":[{"href":"mailto:support@voiceflow.com","label":"Contact support"}],"primary":{"type":"button","label":"Contact Sales","href":"http://voiceflow.com/demo"}},"seo":{"metatags":{"google-site-verification":"pO8mAeCAchjNMVkVWA5Phbe28KLPtVr58r6_kS67hKw"},"indexing":"navigable"},"fonts":{"family":"Inter","weight":400,"format":"woff"},"icons":{"library":"tabler"},"styling":{"eyebrows":"breadcrumbs","latex":false},"integrations":{"ga4":{"measurementId":"G-F0KHK5CXY4"}},"errors":{"404":{"redirect":false,"title":"Page not found","description":"Our agents searched high and low but couldn't find the page you are looking for. They're upset, but they let our team know so we can fix this. Maybe one of these pages might help?"}},"contextual":{"options":["copy","view","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"appearance":"light","background":"https://mintcdn.com/voiceflow-009a8802/s3P1FU2SwfLb9qjL/images/thumbnailbackground.png?fit=max\u0026auto=format\u0026n=s3P1FU2SwfLb9qjL\u0026q=85\u0026s=003e0527a5f16c776493da4d4fe1ca2c"},"interaction":{"drilldown":true},"metadata":{"timestamp":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"voiceflow-009a8802","hasAudioNarration":false,"actualSubdomain":"voiceflow-009a8802","customDomains":["www.voiceflow.com"],"gitSource":{"type":"github","owner":"voiceflow","repo":"docs-v2","deployBranch":"master","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"CONTEXTUAL_FEEDBACK":{"status":"DISABLED","enabled":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"DISABLED","enabled":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aa88745521a1150ec8831d0","clientVersion":"0.0.4286","searchFilterCounts":[{"language":"default","tag":"APIs","count":177},{"language":"default","tag":"CLI","count":156},{"language":"default","tag":"Command reference","count":153},{"language":"default","tag":"Build","count":119},{"language":"default","tag":"Documentation","count":75},{"language":"default","tag":"Agent","count":29},{"language":"default","tag":"Analytics","count":27},{"language":"default","tag":"analytics","count":27},{"language":"default","tag":"Analytics query","count":25},{"language":"default","tag":"QA","count":24}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".root{--tw-prose-body: #37413F;--tw-prose-headings: #111827;--tw-prose-lead: #4b5563;--tw-prose-links: #111827;--tw-prose-bold: #111827;--tw-prose-counters: #6b7280;--tw-prose-bullets: #d1d5db;--tw-prose-hr: #e5e7eb;--tw-prose-quotes: #111827;--tw-prose-quote-borders: #e5e7eb;--tw-prose-captions: #6b7280;--tw-prose-kbd: #111827;--tw-prose-kbd-shadows: 17 24 39;--tw-prose-code: #111827;--tw-prose-pre-code: #e5e7eb;--tw-prose-pre-bg: #1f2937;--tw-prose-th-borders: #d1d5db;--tw-prose-td-borders: #e5e7eb;--tw-prose-invert-body: #d1d5db;--tw-prose-invert-headings: #fff;--tw-prose-invert-lead: #9ca3af;--tw-prose-invert-links: #fff;--tw-prose-invert-bold: #fff;--tw-prose-invert-counters: #9ca3af;--tw-prose-invert-bullets: #4b5563;--tw-prose-invert-hr: #374151;--tw-prose-invert-quotes: #f3f4f6;--tw-prose-invert-quote-borders: #374151;--tw-prose-invert-captions: #9ca3af;--tw-prose-invert-kbd: #fff;--tw-prose-invert-kbd-shadows: 255 255 255;--tw-prose-invert-code: #fff;--tw-prose-invert-pre-code: #d1d5db;--tw-prose-invert-pre-bg: rgb(0 0 0 / 50%);--tw-prose-invert-th-borders: #4b5563;--tw-prose-invert-td-borders: #374151}:root{--font-weight-body-custom: inherit}.prose strong,#content-container strong{font-weight:600!important}.sidebar-group-header{font-weight:600!important}.prose thead th{font-weight:600!important}.font-semibold{font-weight:600!important}.nav-tabs-item{font-weight:500!important}.max-w-xl{max-width:48rem!important}.sidebar-title{font-weight:600!important}.prose code{font-weight:500!important}.prose pre code{font-weight:400!important}video.mint-w-full{border-radius:8px}.param-head .text-primary{font-weight:700}.primitive-param-field>div{padding-top:1em;padding-bottom:1em}.primitive-param-field>div div{margin-top:0}.primitive-param-field [data-component-part=\"field-name\"]{font-size:1.1em}#api-playground-2-operation-page>div>div>div>div{border:none}@media (min-width: 1600px){body:has(#api-playground-2-operation-page) #content-side-layout{width:36rem!important;max-width:36rem!important}body:has(#api-playground-2-operation-page) #content-side-layout>div.grid{width:36rem!important;max-width:36rem!important}}#header div:has(>h1){flex-direction:column;align-items:flex-start}#header div:has(>h1)>div{margin-left:0}#header>div:first-child #page-context-menu{display:none!important}#header{display:flex;flex-direction:column;padding-bottom:1.25rem;border-bottom:1px solid #e5e7eb}#header>#page-context-menu{display:flex!important;order:-1;margin-bottom:1.75rem}html.dark #header{border-bottom-color:#374151}@media (max-width: 480px){#header>#page-context-menu>*{white-space:nowrap}.vf-ask-ai-label{display:none}.vf-ask-ai-main{padding-left:0.625rem;padding-right:0.625rem}}#sidebar-content ul.sidebar-group:has(+div),#sidebar-content .nav-anchors+div:has(>.sidebar-group-header){padding-bottom:1.25rem;border-bottom:1px solid #e5e7eb}html.dark #sidebar-content ul.sidebar-group:has(+div),html.dark #sidebar-content .nav-anchors+div:has(>.sidebar-group-header){border-bottom-color:#374151}#vf-ask-ai{position:relative;margin-right:0.5rem}.vf-ask-ai-main,.vf-ask-ai-toggle{background:#d97757;border-color:#d97757;color:#fff}.vf-ask-ai-main:hover,.vf-ask-ai-toggle:hover{background:#c8663f;border-color:#c8663f}.vf-ask-ai-toggle{border-left:1px solid rgb(255 255 255 / 25%)}.vf-mark-chatgpt{color:#000}.vf-mark-claude{color:#d97757}.vf-mark-perplexity{color:#20808d}html.dark .vf-mark-chatgpt{color:#fff}html.dark .vf-mark-perplexity{color:#20b8c8}.vf-ask-ai-mark svg{width:16px;height:16px;display:block}.vf-ask-ai-panel{position:absolute;top:calc(100% + 6px);left:0;z-index:40;min-width:190px;padding:4px;border-radius:12px;border:1px solid #e5e7eb;background:#fff;box-shadow:0 8px 24px rgb(17 24 39 / 8%)}.vf-ask-ai-panel a{display:flex;align-items:center;gap:8px;padding:7px 10px;border-radius:8px;font-size:0.875rem;color:#374151;text-decoration:none}.vf-ask-ai-panel a:hover{background:rgb(47 104 219 / 8%);color:#2f68db}html.dark .vf-ask-ai-panel{border-color:rgb(255 255 255 / 7%);background:#0f1117;box-shadow:0 8px 24px rgb(0 0 0 / 40%)}html.dark .vf-ask-ai-panel a{color:#d1d5db}html.dark .vf-ask-ai-panel a:hover{background:rgb(57 125 255 / 12%);color:#397dff}"}]}
{"page":{"pagePath":"documentation/build/framework/initialization-workflow","slug":"/documentation/build/framework/initialization-workflow","pageMetadata":{"title":"Initialization workflow","description":"Run a workflow before your agent takes control of the conversation.","href":"/documentation/build/framework/initialization-workflow"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Run a workflow before your agent takes control of the conversation.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Heading,OptimizedImage}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The initialization workflow is the first thing that runs when a conversation starts - before your agent sees any messages. It gives you a controlled, deterministic space to handle setup: load user data, authenticate, set variables, or send a static greeting. Once the workflow completes, control passes to your agent and the conversation continues normally.`}),`\n`,_jsx(_components.p,{children:`If you don’t set an initialization workflow, conversations begin directly with your agent.`}),`\n`,_jsx(Heading,{level:`2`,id:`setting-an-initialization-workflow`,children:`Setting an initialization workflow`}),`\n`,_jsxs(_components.p,{children:[`Open the `,_jsx(_components.strong,{children:`Framework`}),` tab in the sidebar. Click the `,_jsx(_components.strong,{children:`Add workflow`}),` on the initialization node and select an existing workflow, or click `,_jsx(_components.strong,{children:`create`}),` to build a new one.`]}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Init-workflow.png?fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=7d11771a82784bd764809a1f0a77553f`,alt:`Init Workflow`,\"data-og-width\":`1286`,width:`1286`,\"data-og-height\":`814`,height:`814`,\"data-path\":`images/Init-workflow.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Init-workflow.png?w=280\u0026fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=43afc86bdc943ce11a82c7b09efbdada 280w, https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Init-workflow.png?w=560\u0026fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=a527fe4f11463ac30244d5c45d2d893d 560w, https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Init-workflow.png?w=840\u0026fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=44e047612c4123f713fec94fff5fadcb 840w, https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Init-workflow.png?w=1100\u0026fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=a1bc81d1dedfc8ed442d0a5aa7d8ef79 1100w, https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Init-workflow.png?w=1650\u0026fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=7fcbbf66b94d17552aac6295ec0cd6ff 1650w, https://mintcdn.com/voiceflow-009a8802/sQXqOXyzFR_wI2F3/images/Init-workflow.png?w=2500\u0026fit=max\u0026auto=format\u0026n=sQXqOXyzFR_wI2F3\u0026q=85\u0026s=14de413eed4c4b2bee8c2bd4ea758549 2500w`}),`\n`,_jsx(_components.p,{children:`Once set, this workflow runs automatically at the start of every conversation. When the workflow ends - or when any step has an empty output port - the conversation navigates directly to your agent. You don’t need to explicitly route to the agent; any unconnected port does this automatically.`}),`\n`,_jsx(Heading,{level:`2`,id:`common-patterns`,children:`Common patterns`}),`\n`,_jsx(Heading,{level:`3`,id:`loading-context`,children:`Loading context`}),`\n`,_jsx(_components.p,{children:`The most common use case. Make API calls at the start of a conversation to fetch user data - account info, order history, subscription tier etc. - and store it in variables. Your agent and playbooks have the context they need from the very first turn.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Predictive conversations`}),` - Run these calls asynchronously to load data in the background while the conversation is already happening. Fetch a customer’s recent orders during authentication, pull account details while the agent greets the user. By the time the agent needs the data, it’s already there - no loading state, no awkward pause. Your agent can open with “I see you have an order arriving later today — is that what you’re calling about?” instead of asking the customer to state their intention.`]}),`\n`,_jsx(Heading,{level:`3`,id:`static-start-message`,children:`Static start message`}),`\n`,_jsxs(_components.p,{children:[`If you want your agent to open with a specific greeting rather than generating one, add a text response step to your initialization workflow. Turn on `,_jsx(_components.strong,{children:`Wait for user input`}),` after the message so the workflow pauses for the user to respond before handing off to the agent - otherwise the agent will immediately start talking over your greeting.`]}),`\n`,_jsx(Heading,{level:`3`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(_components.p,{children:`Gate the conversation behind identity verification. Check a user token, validate credentials via API, or collect an account number before your agent has access to any sensitive tools or data.`}),`\n`,_jsx(Heading,{level:`3`,id:`onboarding`,children:`Onboarding`}),`\n`,_jsx(_components.p,{children:`Collect required information upfront - name, language preference, reason for contact - using a structured flow before the agent takes over. This is useful when you need specific variables set before any playbook can run effectively.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Initialization workflow","description":"Run a workflow before your agent takes control of the conversation.","href":"/documentation/build/framework/initialization-workflow"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Setting an initialization workflow","slug":"setting-an-initialization-workflow","depth":2,"children":[]},{"title":"Common patterns","slug":"common-patterns","depth":2,"children":[{"title":"Loading context","slug":"loading-context","depth":3,"children":[]},{"title":"Static start message","slug":"static-start-message","depth":3,"children":[]},{"title":"Authentication","slug":"authentication","depth":3,"children":[]},{"title":"Onboarding","slug":"onboarding","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/voiceflow-009a8802/a422365db5c10246/Voiceflow.js","/docs/_mintlify/custom/voiceflow-009a8802/e041c7a6060d1797/ask-ai.js"],"subdomain":"voiceflow-009a8802","siteName":"Voiceflow Documentation","title":"Initialization workflow - Voiceflow Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-31T21:18:20.064Z","originalFileLocation":"documentation/build/framework/initialization-workflow.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run a workflow before your agent takes control of the conversation.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Voiceflow Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Initialization workflow - Voiceflow Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run a workflow before your agent takes control of the conversation.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Voiceflow Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://voiceflow-009a8802.mintlify.site/docs/_mintlify/api/og/v2?division=Framework\u0026amp;title=Initialization+workflow\u0026amp;description=Run+a+workflow+before+your+agent+takes+control+of+the+conversation.\u0026amp;theme=cf68d707af81f256335be7f3\u0026amp;signature=956e65238e021a5cca625803a3ad4a710f532303e34d911bd1b35a94bb0ffbd3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Initialization workflow - Voiceflow Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run a workflow before your agent takes control of the conversation.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://voiceflow-009a8802.mintlify.site/docs/_mintlify/api/og/v2?division=Framework\u0026amp;title=Initialization+workflow\u0026amp;description=Run+a+workflow+before+your+agent+takes+control+of+the+conversation.\u0026amp;theme=cf68d707af81f256335be7f3\u0026amp;signature=956e65238e021a5cca625803a3ad4a710f532303e34d911bd1b35a94bb0ffbd3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/voiceflow-009a8802/q7IgIvcII3USklep/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Voiceflow Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2F68DB\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"pO8mAeCAchjNMVkVWA5Phbe28KLPtVr58r6_kS67hKw\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/documentation/build/framework/initialization-workflow.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.voiceflow.com/#organization\",\"name\":\"Voiceflow Documentation\",\"url\":\"https://www.voiceflow.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/voiceflow-009a8802/1vhxJ0GVX_3qkVnB/logo/Wordmark_dark.svg?fit=max\u0026auto=format\u0026n=1vhxJ0GVX_3qkVnB\u0026q=85\u0026s=8e412b15780e514697534faf70db3b75\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.voiceflow.com/docs#website\",\"name\":\"Voiceflow Documentation\",\"url\":\"https://www.voiceflow.com/docs\",\"publisher\":{\"@id\":\"https://www.voiceflow.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow#webpage\",\"url\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow\",\"name\":\"Initialization workflow\",\"description\":\"Run a workflow before your agent takes control of the conversation.\",\"dateModified\":\"2026-07-31T21:18:20.064Z\",\"isPartOf\":{\"@id\":\"https://www.voiceflow.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Build\",\"item\":\"https://www.voiceflow.com/docs/documentation/build/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Framework\",\"item\":\"https://www.voiceflow.com/docs/documentation/build/framework/choosing-a-framework\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Initialization workflow\",\"item\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow#article\",\"headline\":\"Initialization workflow\",\"name\":\"Initialization workflow\",\"description\":\"Run a workflow before your agent takes control of the conversation.\",\"url\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow\",\"mainEntityOfPage\":{\"@id\":\"https://www.voiceflow.com/docs/documentation/build/framework/initialization-workflow#webpage\"},\"dateModified\":\"2026-07-31T21:18:20.064Z\",\"publisher\":{\"@id\":\"https://www.voiceflow.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.voiceflow.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Voiceflow Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Voiceflow Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/documentation/build/framework/initialization-workflow.md","siteName":"Voiceflow Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Build AI agents with Voiceflow","sidebarTitle":"Introduction","mode":"default","href":"/documentation/introduction"},{"group":"Build","pages":[{"title":"Building an agent","sidebarTitle":"Overview","mode":"default","href":"/documentation/build/overview"},{"group":"Agent","pages":[{"title":"Global prompt","sidebarTitle":"Global prompt","href":"/documentation/build/global-prompt"},{"title":"Instructions","sidebarTitle":"Instructions","href":"/documentation/build/instructions"},{"title":"Playbooks","href":"/documentation/build/playbooks"},{"title":"Workflows","href":"/documentation/build/workflows"},{"group":"Editor","pages":[{"title":"The agent instructions editor","sidebarTitle":"Overview","href":"/documentation/build/editor/overview"},{"title":"Referencing tools in prompts","sidebarTitle":"References","href":"/documentation/build/editor/references"},{"title":"Markdown shortcuts for instructions","sidebarTitle":"Markdown","href":"/documentation/build/editor/markdown"},{"title":"Keyboard shortcuts for the editor","sidebarTitle":"Keyboard shortcuts","href":"/documentation/build/editor/keyboard-shortcuts"}]},{"group":"Steps","pages":[{"title":"Message","sidebarTitle":"Message","href":"/documentation/build/steps/message"},{"title":"Card","href":"/documentation/build/steps/card"},{"title":"Carousel","href":"/documentation/build/steps/carousel"},{"title":"Buttons","sidebarTitle":"Buttons","href":"/documentation/build/steps/buttons"},{"title":"Listen","sidebarTitle":"Listen","href":"/documentation/build/steps/listen"},{"title":"Playbook","sidebarTitle":"Playbook","href":"/documentation/build/steps/playbook"},{"title":"Crew","sidebarTitle":"Crew","href":"/documentation/build/steps/crew"},{"title":"Integration","sidebarTitle":"Integration","href":"/documentation/build/steps/integration"},{"title":"MCP","sidebarTitle":"MCP","href":"/documentation/build/steps/mcp"},{"title":"API step","sidebarTitle":"API","href":"/documentation/build/steps/api"},{"title":"Function","sidebarTitle":"Function","href":"/documentation/build/steps/function"},{"title":"Call forward","sidebarTitle":"Call forward","href":"/documentation/build/steps/call-forward"},{"title":"Live agent handoff","sidebarTitle":"Live agent handoff","href":"/documentation/build/steps/handoff"},{"title":"Code","sidebarTitle":"Code","href":"/documentation/build/steps/code"},{"title":"Condition","sidebarTitle":"Condition","href":"/documentation/build/steps/condition"},{"title":"End","sidebarTitle":"End","href":"/documentation/build/steps/end"},{"title":"Operator","sidebarTitle":"Operator","href":"/documentation/build/steps/operator"},{"title":"Set","sidebarTitle":"Set","href":"/documentation/build/steps/set"},{"title":"Workflow","sidebarTitle":"Workflow","href":"/documentation/build/steps/workflow"}]}]},{"group":"Knowledge base","pages":[{"title":"Importing data sources","href":"/documentation/build/importing-data-sources"},{"title":"Querying the knowledge base","href":"/documentation/build/querying-the-knowledge-base"}]},{"group":"Tools","pages":[{"title":"API tool","href":"/documentation/build/tools/api-tool"},{"title":"Function tool","href":"/documentation/build/tools/function-tool"},{"title":"MCP tool","href":"/documentation/build/tools/mcp-tool"},{"group":"Integration tools","pages":[{"title":"Agent tools","sidebarTitle":"Overview","href":"/documentation/build/tools/overview"},{"title":"Zendesk tool","sidebarTitle":"Zendesk","href":"/documentation/build/tools/zendesk-tool"},{"title":"Salesforce tool","sidebarTitle":"Salesforce","href":"/documentation/build/tools/salesforce-tool"},{"title":"Hubspot tool","sidebarTitle":"Hubspot","href":"/documentation/build/tools/hubspot-tool"},{"title":"Shopify tool","sidebarTitle":"Shopify","href":"/documentation/build/tools/shopify"},{"title":"Twilio tool","sidebarTitle":"Twilio","href":"/documentation/build/tools/twilio-tool"},{"title":"Airtable tool","sidebarTitle":"Airtable","href":"/documentation/build/tools/airtable-tool"},{"title":"Make tool","sidebarTitle":"Make","href":"/documentation/build/tools/make-tool"},{"title":"Gmail tool","sidebarTitle":"Gmail","href":"/documentation/build/tools/gmail-tool"},{"title":"Google Sheets tool","sidebarTitle":"Google Sheets","href":"/documentation/build/tools/google-sheets-tool"}]},{"title":"Global tools","href":"/documentation/build/tools/global-tools"},{"title":"System tools","href":"/documentation/build/tools/system-tools"}]},{"title":"Behaviour","href":"/documentation/build/behaviour"},{"group":"Data","pages":[{"title":"Variables","href":"/documentation/build/data/variables"},{"title":"Secrets","href":"/documentation/build/data/secrets"},{"title":"PII redaction","href":"/documentation/build/data/pii-redaction"},{"title":"Personas","href":"/documentation/build/data/personas"}]},{"group":"Framework","pages":[{"title":"Choosing a framework","description":"Choose the agent framework that's best for your use case.","mode":"default","href":"/documentation/build/framework/choosing-a-framework"},{"title":"Initialization workflow","href":"/documentation/build/framework/initialization-workflow"}]}]},{"group":"Deploy","pages":[{"group":"Environments","pages":[{"title":"Environments","description":"Work on multiple versions of your agent in parallel, conduct A/B tests with traffic splits, and roll changes back with confidence.","sidebarTitle":"Overview","href":"/documentation/deploy/environments/overview"},{"title":"Publishing","href":"/documentation/deploy/environments/publishing"},{"title":"A/B testing","href":"/documentation/deploy/environments/traffic-split"},{"title":"Merging","href":"/documentation/deploy/environments/merging"},{"title":"Version history","href":"/documentation/deploy/environments/version-history"}]},{"group":"Chat widget","pages":[{"title":"Install widget","href":"/documentation/deploy/widget/embedding-the-chat-widget"},{"title":"Customize widget","href":"/documentation/deploy/widget/custom-web-chat-styling"},{"title":"Chat widget API","href":"/documentation/deploy/widget/web-chat-api"},{"title":"Chat widget extensions","href":"/documentation/deploy/widget/web-chat-extensions"}]},{"group":"Phone integration","pages":[{"title":"Connecting a phone number","href":"/documentation/deploy/phone/connect-a-phone-number"},{"title":"Inbound calling","href":"/documentation/deploy/phone/inbound-calling"},{"title":"Outbound calling","href":"/documentation/deploy/phone/outbound-calling"}]},{"group":"SMS","tag":"Beta","pages":[{"title":"Inbound SMS","tag":"Beta","href":"/documentation/deploy/sms/inbound"},{"title":"Outbound SMS","tag":"Beta","href":"/documentation/deploy/sms/outbound"}]}]},{"group":"Measure","pages":[{"title":"Transcripts","href":"/documentation/measure/transcripts"},{"title":"Evaluations","href":"/documentation/measure/evaluations"},{"title":"Tests","href":"/documentation/measure/tests"},{"title":"Analytics","href":"/documentation/measure/analytics"}]},{"group":"Account","pages":[{"title":"Workspaces","href":"/documentation/account-management/collaboration"},{"group":"Billing","pages":[{"title":"Billing overview","href":"/documentation/account-management/billing"},{"title":"Managing your subscription","href":"/documentation/account-management/billing/managing-your-subscription"},{"title":"Credits pricing table","href":"/documentation/account-management/billing/credits-pricing-table"}]}]}]},{"tab":"Tutorials","pages":[{"title":"Tutorials","href":"/courses/home"}]},{"tab":"APIs","pages":[{"title":"APIs","href":"/api-reference/api-overview"}]},{"tab":"MCP","pages":[{"title":"MCP","href":"/mcp/overview"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli/overview"}]},{"tab":"Resources","menu":[{"item":"Changelog","icon":"https://mintlify.s3.us-west-1.amazonaws.com/voiceflow-009a8802/images/icons/list.svg","description":"Every shipped change, newest first","pages":[{"title":"Changelog","href":"/changelog/changelog"}]},{"item":"Glossary","icon":"https://mintlify.s3.us-west-1.amazonaws.com/voiceflow-009a8802/images/icons/documentation.svg","description":"What each term means, and where it is explained","pages":[{"title":"Glossary","href":"/resources/glossary"}]},{"item":"Status","icon":"https://mintlify.s3.us-west-1.amazonaws.com/voiceflow-009a8802/images/icons/analytics.svg","description":"Live platform availability","href":"https://status.voiceflow.com"}],"pages":[{"title":"Resources","href":"/changelog/changelog"}]},{"tab":"Tico","hidden":true,"pages":[{"title":"Tico","href":"/v4-migration-guide"}]}]},"basePath":"","title":"Initialization workflow - Voiceflow Documentation","deploymentId":"dpl_3DZuqjnfdjREuPshghHhyiLeMG3U","buildId":"dpl_3DZuqjnfdjREuPshghHhyiLeMG3U","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-BwrdYPf2.js","lightbox-handle-r17bVUz3.js"]}