Vapi can't use response returned from n8n webhook
# support
k
I have an n8n workflow that's trigggered by a vapi workflow tool. After the workflow successful run, the response is sent to vapi as shown in first attached image. The issue is, I want to use the response value in the subsequent conversation after the tool run using this ( {{$('tool_1752761204227').item.json.results[0].result}} ) but vapi reads out the literal text instead of interpolating https://cdn.discordapp.com/attachments/1396902035483529339/1396902036032716890/Screen_Shot_2025-07-21_at_6.04.37_PM.png?ex=687fc5e6&is=687e7466&hm=39195d3c751ac6a3676edcbc4c5b7aef714c2466359bcf961795aa5bb1fedcfe&
c
Extract the value using Vapi’s “Extract Variables” feature like, assign
$('tool_xxx').item.json.results[0].result
to
myResult
, then reference it in prompts using
{{ myResult }}
so vapi interpolates it instead of reading it literally..
k
I appreciate your response @Kings_big💫 , would you be kind enough to guide me through how to assign a value to a variable, I've looked around but found nothing on how to
k
Mapping the JSON path like results[0].result to a variable name like myResult in the tool’s Response Mapping, then use {{myResult}} in later prompts to access its value.. https://docs.vapi.ai/assistants/dynamic-variables
k
This does not work for my workflow case, there are meant for assistant
k
To use variables in a workflow, you must pass them via assistantOverrides.variableValues when starting the assistant, then reference them in prompts using {{ variableName }}..
3 Views