realistic-cyan
realistic-cyan3mo ago

Voiceflow API Call help

I’m currently using an agent to make a voice call for lead qualification that is capturing all the information from the call in the { vf_history } variable. I am then using the setter block to parallel-y prompt the conversation history to return variables like lead name, key insight etc And then I’m running an API call to update voiceflow’s knowledge base to simulate almost a CRM kind of experience wherein the lead name gets captured along with a bunch of other information. I’ve realised the API call is failing because the information captured from the conversation history has special characters in it like “ and / etc which is causing the RAW JSON request in the API to get escaped resulting in a bad parameter call and a 400 error. No amount of prompting I’ve tried has been able to remove these characters or fix the variable values to plaintext. Is there a better way to extract information from conversation history or to run API calls? Thanks!
4 Replies
Steve B. | IntelleSync.ai
You could use a code block or a function to remove unwanted characters and then create a clean JSON before making your API call.
national-gold
national-gold3mo ago
@Study you can also try structured outputs
realistic-cyan
realistic-cyanOP3mo ago
What are structured outputs?

Did you find this page helpful?