https://retellai.com/?utm_source=discord&utm_medium=seo logo
Hi , I wanted to make function node type but gett...
# ❓・ai-evy-support
j
Hi @AI Evy , I wanted to make function node type but gettting following error: { "success": false, "error": "400 {\"error_message\":\"request/body/nodes/0/type must be equal to one of the allowed values: conversation, request/body/nodes/0/type must be equal to one of the allowed values: end, request/body/nodes/0/edges/0/transition_condition must have required property 'prompt', request/body/nodes/0/edges/0/transition_condition must have required property 'equations', request/body/nodes/0/edges/0/transition_condition must match exactly one schema in oneOf, request/body/nodes/0 must have required property 'transfer_destination', request/body/nodes/0/type must be equal to one of the allowed values: press_digit, request/body/nodes/0 must have required property 'else_edge', request/body/nodes/0 must have required property 'success_edge', request/body/nodes/0 must have required property 'variables', request/body/nodes/0 must have required property 'agent_id', request/body/nodes/0 must have required property 'mcp_id', request/body/nodes/0 must have required property 'component_id', request/body/nodes/0 must match exactly one schema in oneOf\"}", "message": "Failed to update conversation flow" } Did someone used Retell API's for making conversation flow engine ?
a
Thanks for tagging me @jsdev7305. I'll look through relevant sources and get back to you shortly.
### Answer Based on the error message, the API is rejecting your node configuration because "function" is not a valid node type [(1) ]() . The documentation shows that valid node types include conversation, end, press_digit, and several others that require specific properties . The error indicates your node structure doesn't match any of the expected schemas. For conversation flow nodes, you need to ensure proper structure with required properties [(2) ]() [(1) ]() . Looking at the available node types in the documentation, here's an example of a properly structured conversation node :
Copy code
json
[
  {
    "id": "start",
    "type": "conversation",
    "instruction": {
      "type": "prompt",
      "text": "Greet the customer and ask how you can help them."
    },
    "edges": [
      {
        "id": "edge_1",
        "transition_condition": {
          "type": "prompt",
          "prompt": "Customer wants to book appointment"
        },
        "destination_node_id": "book_appointment"
      }
    ]
  }
]
If you need to execute functions within your conversation flow, you should define them in the
tools
array when creating the conversation flow [(2) ]() . However, there's a known issue where tools defined during conversation flow creation may not work properly - you may need to use the update conversation flow API instead [(3) ]() . For transition conditions, you need either a
prompt
property or
equations
property, but your current configuration appears to be missing both [(4) ]() .
​ To learn more, see the sources I considered: [[1] Get Conversation Flow](https://docs.retellai.com/api-references/get-conversation-flow) [[2] Create Conversation Flow](https://docs.retellai.com/api-references/create-conversation-flow) [[3] Tool creation not working via conversation_flow method (python sdk)](https://discord.com/channels/1186424376300679209/1408324136060715099) [[4] Step 3: Add transition conditions](https://docs.retellai.com/build/conversation-flow/transition-condition) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@AI Evy but in the API Documentation it is mentioned that I can create node of type function. following details mentioned: type enumrequired Type of the node Available options: function
a
Thanks for the follow-up, @jsdev7305. I'll get back to you soon.
### Answer You're correct that function nodes are supported in Retell AI's conversation flow. The documentation confirms that function nodes are used to call functions during conversations [(1) ]() . For function nodes, you need to ensure your node structure includes the required properties. Based on the documentation, a function node should have specific settings configured : - **Function Selection**: You need to add the function first, then select it inside the node - **Node Settings**: Function nodes support settings like "Speak During Execution", "Wait for Result", "Global Node", "Block Interruptions", "LLM", and "Fine-tuning Examples" The error you're encountering suggests the API is expecting specific required properties that might be missing from your function node configuration. Function nodes are designed to execute functions rather than have conversations, though the agent can still talk while in the node if needed . When creating function nodes, the function execution timing depends on your settings - if "wait for result" is turned off, the agent transitions immediately after function invocation, but if it's turned on, the agent waits for the function to finish before attempting to transition . Since you're seeing validation errors about missing required properties, double-check that your function node includes all the necessary fields as specified in the API schema. The function node should be properly structured with the associated function already created and selected within the node configuration .
​ To learn more, see the sources I considered: [[1] Function Node Overview](https://docs.retellai.com/build/conversation-flow/function-node) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
j
@User I think I need to create bug report because for the conversation-flow endpoint it is not accepting
function
type within node. However in API doc for Nodes in Option 3 it states I can pass type as function.
a
Appreciate the feedback! Feel free to ask me again with additional guidance or context.