absent-sapphire•2y ago
Need Help with capturing data from API Response in Voiceflow
Hello everyone! I'm encountering an issue when trying to access data from an API response in my Voiceflow project. I'm trying to capture the "Subject" value from the first item in a list of results, but whenever I attempt to access response.results[0].Subject, I keep getting 0 as the value instead of the expected string ("DE-HU" for the first item). I've been attempting to use this path in Voiceflow to capture the subject, but it doesn't seem to work as expected. Does anyone have insights on why this might be happening or what the correct way to access this data would be?

3 Replies
ambitious-aqua•2y ago
Ran into a similar problem myself. After some troubleshooting I was finally able to get the desired result. I think your problem would be solved if you used respone.response.results[0].Subject as the key value in your capture response.
The first 'response.' is to access the API request. The second 'response.' will access the response object within the request. 'results[0].' to access the first object in the results array. Then finally 'Subject' to access the data stored in the Subject object.
Hope this works for you.
absent-sapphireOP•2y ago
It works, thank you so much Tyler
Where are you trying to set / output this info? In the API step? Can you send a screenshot of how you are doing all this?