Accessing specific parts of api response
# support
b
I have an apirequest node where i get a json response and i'm trying to access the values of only one of the key's in the json response so i can have it dynamically inserted into a subsequent conversation node. anyone know how?
i've tried using {{nodeName.response.reason}} and varying versions with response, .result, .responseBody, .result.reason and none of them seem to work even though i can see the json response is being received in the result section of the messages in the call log
k
Define the key in the API node's output schema and reference it using {{keyName}} in the next conversation node..
n
@Kings_big💫 where is the API Node Output Schema? I just see Request, Headers, and Messages in the API Node which I don't think are the right ones
b
@Kings_big💫 i'm not seeing an output schema for the api node, just what @np mentioned
k
The API Node Output Schema in Vapi is called the ServerMessage schema, which includes detailed message types like ServerMessageSpeechUpdate and ServerMessageEndOfCallReport, you can find it in the API Reference under Webhook or Workflow sections “Request, Headers, and Messages” are just structural UI elements, not the actual output schema..
b
Sorry im still having a bit of trouble understanding, attached are a few photos of how its set up and the messages section from the call log which shows the api response is coming in, i checked the documentation like you suggested and i think this is the section: https://docs.vapi.ai/api-reference/webhooks/client-message i checked the server-message one but couldn't find anything in that documentation that would seem to relate to what i'm looking to do (but maybe i'm wrong). I've tried referencing it many different ways including {{classifyRequest.responseBody.reason}} {{classifyRequest.response.reason}} {{classifyRequest.result}} and {{classifyRequest.toolCallsResult[0].result }} and it's not been able to grab the information i need in the subsequent node. Thanks again in advance! https://cdn.discordapp.com/attachments/1386855068523040900/1387153440995676311/image.png?ex=685c4ed0&is=685afd50&hm=4eb627cb8f2e97b8a654585531a985b569161dc85f875a8df129d1e6d4ae2a28& https://cdn.discordapp.com/attachments/1386855068523040900/1387153441255854301/image.png?ex=685c4ed0&is=685afd50&hm=84d63cf7dda94413fc99179d7acbc8e702a2e7f695b30113c74571935c860c57&
i should of clarified i'm building the workflow in the dashboard UI, not sure if i mentioned that or not
k
Hey, thanks for checking in. This feature hasn't been added to the dashboard frontend yet, but we're working on its design and a few more things. It will be deployed to the dashboard frontend by the end of this week. I apologize for missing this important update, but it will be added soon. Thanks for your patience.
b
awesome, thank you!
k
Marking this ticket as Solved ✅