extended-yellow•4mo ago
Issue with Variable Substitution in Voice Response
Hi Vapi Support Team,
I’m reaching out regarding an issue where the voice bot says “offer range is offer range” instead of speaking the actual value, even though the webhook is returning the correct data.
Use Case:
We’re calling prospects who submitted their car details on our website for a valuation and may be interested in selling. The goal is to collect car details (make, model, year, etc.), give them an estimated offer range via webhook, and schedule a car inspection if they’re interested. After the inspection, they receive a final offer.
What’s working fine:
The entire flow is built in N8N
The webhook is triggered correctly with the right inputs
Google Sheets returns the correct offer range (e.g., 115 to 135 thousand dirhams)
The data is passed back cleanly to the Respond to Webhook node
I’ve added a tool called get_offer_range with a clear description about expected output
The system prompt includes explicit instructions not to say variable names, along with 10 real examples of how to pronounce the offer range naturally
The issue:
Despite all that, the voice bot still says:
“Based on your car’s details, the estimated offer range is offer range.”
Only when you ask it something like “What does that mean?” does it respond correctly with:
“Sorry, the offer range is 115 to 135 thousand dirhams.”
I've attached:
A PDF with the relevant section of the system prompt where this is explained clearly
Screenshots showing correct webhook execution and returned data
Could you please look into why this placeholder variable isn’t being replaced consistently during the natural dialogue? It’s blocking the main value moment of the call.
Thanks in advance for your help!
Best regards,
Mohammad Samir







5 Replies
This is a known limitation in Vapi: variable substitution in tool calls and Blocks can fail, causing the bot to say the variable name instead of its value. To maximize your chances of success, ensure your webhook response is formatted like this:
If the issue persists despite correct formatting, it is due to a current Vapi bug with no guaranteed workaround; the team is working on a fix but Blocks are not production-ready yet documentation.
Sources:
- Vapi documentation on dynamic variables
- Vapi Discord user reports and acknowledgments
⤵️ Mention @Vapi Support Bot for follow-ups 🐥
The most common cause of this issue is a mismatch between the variable name in your prompt (e.g.,
{{offer_range}}
) and the key in the variableValues
object sent to Vapi. Double-check that you are passing the variable like this in your API or SDK call:
Make sure the prompt uses {{offer_range}}
exactly, and the key in variableValues
matches it character-for-character. This should resolve the placeholder not being replaced in the voice response (Vapi documentation).
Source:
- Vapi documentation: Dynamic VariablesMessage marked as helpful by @urusamir! 🎉
extended-yellowOP•4mo ago
@Vapi Team @Duckie when will this bug get resolved
At this time, there is no official timeline or ETA for when the Vapi variable substitution bug will be resolved. The Vapi team has acknowledged the issue and is working on a fix, but no further details have been provided in the documentation or support channels. We recommend monitoring the Vapi changelog and Discord support channel for updates.
Sources:
- Vapi documentation: Dynamic Variables
- Vapi Discord user reports and acknowledgments
- Vapi changelog
The Vapi variable substitution bug is a known issue, and the Vapi team is actively working on a fix. However, there is currently no information or timeline available for when this bug will be resolved. Blocks are not considered production-ready due to this limitation. For updates, you can monitor the Vapi documentation and Vapi Discord.
Sources:
- Vapi documentation on dynamic variables
- Vapi Discord user reports and acknowledgments