fascinating-indigo
fascinating-indigo2y ago

How do I save the response generated from a KB to a variable?

How do I save the response generated from a KB to a variable or something so I can later sand it or used via an api call or something similar
1 Reply
Tico | Voiceflow Assistant
To save the response generated from a Knowledge Base (KB) to a variable, you can use the "Capture Response" section in Voiceflow. Here's how you can do it: 1. After making a successful API call and receiving a JSON object, you can save some of the information you got back onto Voiceflow. 2. In the "Capture Response" section, copy the object path or key, and paste it into the text box. 3. Then select a variable that you would like to save to/apply to. For instance, if you have an API response like this:
{
"name": "Voiceflow",
"product": "Creator"
}
{
"name": "Voiceflow",
"product": "Creator"
}
You can map the "name" to a variable using the following path: response.name This way, the response from the KB can be saved to a variable and can be used later for an API call or any other operation. Please note that the path always begins with "response" followed by the path you want to map. For more details, you can refer to the document here.

Did you find this page helpful?