Hey! Need help with Vapi variables showing undefin...
# support
c
Hey, I’m working on a workflow in Vapi and I’m running into a problem with variables. In my Variables tab I only see: an extracted variable: Mood and Situation a referenced variable: {{full_name}} (but it just shows as undefined) the Ai supposed to say a whole thing but he just say hello with nothing Could someone take a look at my workflow and maybe point out what I’m missing? Thanks in advance 🙏 P.S Im using next js 15 and that my first time ever using vapi so excuse my ignorance :p https://cdn.discordapp.com/attachments/1419776080931459252/1419776081170403488/hey-need-help-with-vapi-variables-showing-undefined-v0-2c79k2iaprqf1.png?ex=68d2fd03&is=68d1ab83&hm=982249b102b2dd0857cf5b7233fefda918990e8e63c9191a70c08d2ec96e375c&
v
Your
{{full_name}}
variable is showing as undefined because it hasn't been set or extracted.
To fix this, either extract
full_name
from user input in your workflow, or set it directly when starting the call/chat by passing it in the API request like this:
Copy code
json
"assistantOverrides": {
  "variableValues": {
    "full_name": "John Doe"
  }
}
Make sure the variable is set before referencing it in your prompts—otherwise, it will remain undefined. [See more in the documentation.](https://docs.vapi.ai/assistants/dynamic-variables#prepare-your-request) Source: - [Variables Vapi Documentation](https://docs.vapi.ai/assistants/dynamic-variables#prepare-your-request)
l
Looks like the {{full_name}} is undefined because it’s never being set—Vapi won’t auto-fill it unless you extract it in the flow or pass it from your Next.js app when starting the session. You can fix this by either asking the user for their name and saving it as a variable, or injecting it via the API call. Also, check that your extracted variables (Mood, Situation) are being mapped correctly so the bot has real data to use. Are you planning to capture the user’s name live in the conversation, or pre-fill it from your app? @coolest man on earth
c
I was planning the the AI say the name from the email that was recorded from the web app but that make sense ill try to figure it out and if it doesn't workout ill just make it so the ai ask for the name
l
That makes sense! I can help you set it up so the AI automatically pulls the name from the email stored in your web app and injects it into the {{full_name}} variable at session start. If that doesn’t work out, we can seamlessly switch to prompting the user for their name. I can guide you through the API setup and variable mapping so it works reliably in Next.js. @coolest man on earth
o
I think Yoh should try to extract the name from the prompt like you were extracting the mood and situation
c
Thank you so much for your offer 🙏 it makes sense now I should’ve planned it better haha. I’ll try to be independent and work on it myself to fix this, but I really appreciate your help and guidance!:)
o
Yeah no problem Let me know when it is done
4 Views