https://retellai.com/?utm_source=discord&utm_medium=seo logo
Error adding a function to the conversation flow.
# ❓・bug-report
b
Hi, I'm trying to add a new function to the conversation flow to make an external request to my server and send some information about the call. But when I try to add it, I get an exception with status code 400. https://cdn.discordapp.com/attachments/1439994622767136778/1439994623022858270/image.png?ex=691c8aff&is=691b397f&hm=d8f218f6ba744d5ad816252d958d2aa3ac941046d7ad42699dcdb6b81ff1e8eb&
a
Hi! I can help with that. A 400 error usually means the request format or data is incorrect. I can review your function and server request setup to identify the issue and get it working correctly. @boroca.guy_67514
b
Hello, @Abayomi Praise Heritage ! I'm trying to use dynamic variables in JSON, like this: { "name": "{{contact.name}}", "phone": "{{contact.phone}}", "opportunity": "{{contact.opportunity}}" } Is it possible?
@User can you help me with this, please?
a
Sure kindly connect with me
o
Hello @boroca.guy_67514 , you are trying to add a function to the conversation flow in the dashboard right or using the API ? and also can you share the agent id
b
Through the conversation flow dashboard. The error I sent is an Axios console error in my browser. Agent ID: agent_ec130f7d70460cee29c7518896
o
Hello @boroca.guy_67514 , what was your parameters you are trying to use on this function ?
b
I'm trying to send a JSON body to my server like this: As you can see, I've inserted three dynamic variables: {{contact.name}}, {{contact.phone}} and {{contact.opportunity}} Is this possible? https://cdn.discordapp.com/attachments/1439994622767136778/1440380200117600327/image.png?ex=691df218&is=691ca098&hm=31588d6dbe7898d39bf0aad455148b0063bbefcc5b9ebcbdb2f7e6d5cf6fa1bd&
o
You have to use the function calling format