variable in api tool
# support
a
I believe I have set this up correctly but the variable in my api request tool url will not populate the dynamic data. I am successfully setting the variable from the HTTP request which initiates the call. I can successfully query the get URL value when I hard code a static value into the URL. But the moment I add the variable to the URL it doesn't recognize it and sends the literal variable text to the GET URL which returns nothing. https://cdn.discordapp.com/attachments/1433240556397658265/1433240557056167972/Screenshot_2025-10-29_at_4.23.11_PM.png?ex=6903f8c9&is=6902a749&hm=6f9baccc49c83265727d291b671d527a5c968170b78a6b621ab36fe3da7c2f07&
v
Try this: Make sure your API tool defines the variable in the
body
schema, even for GET requests. For example:
Copy code
json
{
  "type": "apiRequest",
  "name": "getHistory",
  "url": "https://rnogrvgymqipnmwgxjmp.supabase.co/rest/v1/n8n_chat_histories_maverick?select=*&ten_digit=eq.{{ten_digit}}&limit=20",
  "method": "GET",
  "body": {
    "type": "object",
    "properties": {
      "ten_digit": {
        "description": "The ten digit phone number",
        "type": "string"
      }
    },
    "required": ["ten_digit"]
  }
}
This ensures
{{ten_digit}}
is recognized and replaced in your URL. Check your tool config and redeploy if needed. (Source: information found in the Default Tools documentation)
a
Okay, trying now.
That worked! Needed to set the request body even for a get. Thanks!
c
Glad you were able to get this resolved. If anything else comes up or you need further assistance, we’re here to help.