https://retellai.com/?utm_source=discord&utm_medium=seo logo
taking variables of a n8n workflow
# ❓・ai-evy-support
s
@AI Evy i want to trigger a n8n webhook to retreive some variables. the n8n webhook delivers [ { "offen": "false" } ] the retell node says: Node Transition previous node: begin new node: WebhookTest Tool Invocation: WebHook-Test23 tool_call_id: tool_call_c6bc6a { "offen": "ja" } Tool Result tool_call_id: tool_call_c6bc6a hot to configure the retell WebhookTest Function node, to get the varable "offen" mapped correctly? ist POST or GET Webhook the better choice?
a
Thanks for tagging me @sty_stoned. I'll look through relevant sources and get back to you shortly.
### Answer To map the "offen" variable from your n8n webhook to the Retell Function node, you need to configure the Custom Function node in Retell to expect the correct parameter and ensure the webhook response matches the schema Retell expects. Configuration steps: 1. In the Retell Function node, define the parameter schema for "offen" in JSON format. For example:
Copy code
json
{
  "type": "object",
  "properties": {
    "offen": {
      "type": "string"
    }
  },
  "required": ["offen"]
}
2. Set the HTTP method to POST or GET depending on your workflow: - **POST**: Use this if you want to send a JSON body (recommended for structured data like your example) . - **GET**: Use this if you want to send data as query parameters. For your use case (structured variable delivery) , POST is the better choice, as it allows you to send the payload as JSON and match the schema exactly [(1) ]() . Make sure your n8n webhook returns the response in the expected format:
Copy code
json
{
  "offen": "false"
}
This will allow the Retell Function node to map the "offen" variable correctly .
​ To learn more, see the sources I considered: [[1] Custom Function](https://docs.retellai.com/build/conversation-flow/custom-function) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
a
Thanks for the follow-up, @sty_stoned. I'll get back to you soon.
### Answer If your mapping is not working, double-check these points from the official docs: - The Retell Function node needs the parameter schema defined as:
Copy code
json
{
  "type": "object",
  "properties": {
    "offen": {
      "type": "string"
    }
  },
  "required": ["offen"]
}
- Your n8n webhook response must be a JSON object, not an array. It should look like:
Copy code
json
{
  "offen": "false"
}
- Use POST as the HTTP method so that the payload is sent in the request body and matches the schema above. - Make sure that the webhook endpoint in n8n receives and returns the variable in the correct format, not as an array or nested object. If these are all set and it still fails, verify the webhook endpoint is reachable and returns the JSON with exactly the structure Retell expects (no extra nesting or array brackets) and that the parameter name matches exactly (case-sensitive) . Official instructions: - [Custom Function docs]() [(3) ]()
message has been deleted
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.