Variables are 0 in "Send Email" tool
I'm working on an AI agent with a two-step process: first, it uses an "add to sheet" tool, and then a "send email" tool. The variables are extracted from a questionnaire and include {name}, {email}, and {address}.
The integrations seem to have been done properly, and the variables are correctly added to the sheet. However, when the same data is used in the email body, all the values are showing up as 0.
I've been troubleshooting this for a while and I'm honestly getting a little frustrated. Any advice or suggestions on what I might be missing would be a huge help. Thanks!
2 Replies
Here’s what’s happening and how to fix it 👇
Why every value turns into
• Inside your “Add to Sheet” tool you most likely switched on “Capture Response” or “Save input variables” and mapped one of those paths back into the same
• The Google-Sheets API response (or the saved-input object) doesn’t contain those fields, so when the step finishes Voiceflow rewrites the mapped variables with an empty value → they immediately fall back to
• When the flow reaches the “Send Email” step it reads the now-overwritten variables, so the email body shows
• Save input variables (new feature) 3. If either section is writing into
• Capture/Save logic: https://docs.voiceflow.com/update/docs/capture-response-saving-to-variables
• Save input variables in tool calls: https://docs.voiceflow.com/update/docs/save-input-variables-in-tool-calls
0
after the first Tool
• In Voiceflow, any variable that is referenced but has no value at that moment automatically resolves to the default 0
.• Inside your “Add to Sheet” tool you most likely switched on “Capture Response” or “Save input variables” and mapped one of those paths back into the same
{name}
, {email}
, {address}
variables.• The Google-Sheets API response (or the saved-input object) doesn’t contain those fields, so when the step finishes Voiceflow rewrites the mapped variables with an empty value → they immediately fall back to
0
.• When the flow reaches the “Send Email” step it reads the now-overwritten variables, so the email body shows
0 0 0
.
What to do
1. Open the Add to Sheet tool block.
2. In the right panel look at:
• Capture response (Output mapping)• Save input variables (new feature) 3. If either section is writing into
{name}
, {email}
, {address}
delete those mappings or point them to different variables (e.g. {sheet_row}
, {sheet_status}
etc.).
4. Save & test – you’ll see the sheet still receives the correct data and the email step now picks up the real values instead of 0
.
That’s all you need — once the variables stop being overwritten, the Gmail step will render them correctly.
Docs for reference• Capture/Save logic: https://docs.voiceflow.com/update/docs/capture-response-saving-to-variables
• Save input variables in tool calls: https://docs.voiceflow.com/update/docs/save-input-variables-in-tool-calls
I already did this, it didn't work. I had to write everything in the prompt instead.
Btw the links don't seem to work?