https://retellai.com/?utm_source=discord&utm_medium=seo logo
Setting Response Variables through API
# ❓・bug-report
p
Hey, I just made my whole workflow with retell to work through the API, but I am hungup on getting the part in the photo to work through the API. Is there a way I can set teh response variables after my backend returns variables through the API in my conversation flow agent? @Omar Ashraf | Community Lead or @Shehroze -Support @Retell https://cdn.discordapp.com/attachments/1467908059044118581/1467908060046688366/image.png?ex=69821769&is=6980c5e9&hm=e15031a83284638c6a50631fc58fa9e037d932bdf0f79887a5e4e135da534c04&
s
Your backend returns: {"user": {"name": "John Doe"}} In the function settings, you add a response variable: JSON path: user.name Variable name: user_name Now you can use {{user_name}} anywhere in your flow, and it will show "John Doe"
p
can I do this through the api? I see another post where you mention that might not be possible
for conversation flow
but maybe this functionality was added after that post
s
Yes, you can
p
okay great. There does not seem to be API documentation on how to make the function node through the API. Is it safe to say that if I make it in the front end UI and then use the API to see the node structure I will be able to reverse engineer the format of it all?
s
Yes, this is right approach
p
great thanks. If you have any documentation on this that I may not have seen please send along
s