Variable dynamic inbound
# support
v
Hi there! 👋 I understand you're having issues with dynamic variables in inbound calls on Vapi when using Make. Unfortunately, I don't have specific information about the Make.com integration details for dynamic variables. However, I can help with understanding the error message and how to properly configure dynamic variables with an assistant ID. The error message you're seeing ("Couldn't Get Assistant...") indicates that Vapi is unable to retrieve the correct assistant for your inbound phone call. According to [Vapi documentation](https://docs.vapi.ai/server-url/events), this happens when a phone number doesn't have an assistantId associated with it, or there's an issue retrieving the assistant from your server. Here's how to properly configure dynamic variables with an assistant ID: 1. Set up dynamic variables in your prompts using double curly braces like
{{variableName}}
in your assistant's messages or prompts. 2. Configure your JSON payload correctly when making API calls:
Copy code
json
{
  "assistantId": "your-assistant-id",
  "assistantOverrides": {
    "variableValues": {
      "name": "John"
    }
  },
  "customer": {
    "number": "+1xxxxxxxxxx"
  },
  "phoneNumberId": "your-phone-id"
}
3. Set the assistant ID on your phone number through the Vapi dashboard: - Go to the "Phone Numbers" section - Select your specific phone number - In the "Inbound" area, select your assistant from the dropdown If you're still experiencing issues, check that: - The variable names in your
variableValues
exactly match those in your assistant's prompts - Your assistant is properly configured to accept dynamic variables - You're not including both a transient assistant and an assistantId in the same request Would you like me to explain any specific part of this configuration in more detail? Sources: - [Vapi Documentation Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables)
- [Vapi Documentation Server URL Events](https://docs.vapi.ai/server-url/events) - [Vapi Documentation Phone Calling](https://docs.vapi.ai/phone-calling) - [Vapi Documentation Dashboard Quickstart](https://docs.vapi.ai/quickstart/dashboard)
Based on what you've shared, it's possible that your webhook response is causing the issue with dynamic variables. Let me ask you a few questions to better understand your setup: 1. Could you share what your webhook response looks like when you're sending it from Make to Vapi? The format of your webhook response is critical. When using webhooks with Vapi, the response format needs to follow a specific structure, especially if you're trying to set dynamic variables or specify an assistant ID. From the screenshot you shared, I can see you're trying to set variables like "name", "number", and "transcript" with values from Make. However, if your webhook response format isn't correct, Vapi might not be able to process these variables properly. Also, the error message suggests that when you remove the assistant ID from the phone number in the Vapi dashboard, it's trying to get the assistant configuration from your webhook instead, which might be working in some cases but not others. Sources: - [Vapi Documentation Server URL Events](https://docs.vapi.ai/server-url/events) - [How webhook responses affect dynamic variables in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335054553250533439) - [Webhook response format in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1339900285727805513)
Hi there! 👋 Looking at your webhook response JSON, I can see a few issues that are likely causing your dynamic variables problem. Unfortunately, I can't provide specific details about your Make.com setup, but I can definitely help with the JSON format issues that are preventing your webhook from working properly. There are several syntax errors in your JSON payload that would cause it to fail: 1. **Missing commas between variable values**:
Copy code
json
"name": "{{13.`1`}}"
"number": "{{13.`0`}}"
"transcript": "{{13.`2`}}"
You need commas after each line:
Copy code
json
"name": "{{13.`1`}}",
"number": "{{13.`0`}}",
"transcript": "{{13.`2`}}"
2. **Backtick characters in variable references**: The backticks (`) in your variable references (`{{13.
1
}}`) are likely causing parsing issues. Variable references should use standard notation without backticks. 3. **Variable format mismatch**: According to [Vapi's documentation](https://docs.vapi.ai/assistants/dynamic-variables), dynamic variables should be defined with double curly braces in your prompts, but the webhook should send the actual values, not template references. When you remove the assistant ID from the phone number, Vapi tries to get the assistant configuration from your webhook. This works sometimes but fails other times because your JSON has syntax errors. Here's a corrected version of your JSON:
Copy code
json
{
  "assistantId": "cd6eda34-5653-4d97-a7a5-34c1eb2b2704",
  "assistantOverrides": {
    "variableValues": {
      "name": "ActualNameValue",
      "number": "ActualNumberValue",
      "transcript": "ActualTranscriptValue"
    }
  },
  "customer": {
    "number": "ActualCustomerNumber"
  },
  "phoneNumberId": "0da90f65-04ef-4296-8dea-a3dd1c918037"
}
Replace the "ActualXValue" placeholders with the actual values from Make.com (not the template references). Would you like me to explain how to properly map your Make.com variables to this format? Sources:
Hi there! 👋 Thanks for sharing the additional details about your webhook response. I can see that your webhook response JSON looks correctly formatted now (with the commas between variable values), and the output shows that the actual values are being populated correctly (name: "Max", number: "+33788059808", etc.). Based on what you've shared, here's what's happening: 1. When you remove the assistant ID from the phone number in Vapi, the system tries to get the assistant configuration from your webhook response, which includes your dynamic variables. This works sometimes. 2. When you set the assistant ID on the phone number in Vapi, it uses that predefined assistant instead of the one from your webhook, which is why your dynamic variables don't work in that case. The solution is to use one approach consistently: Option 1: Use the webhook to provide the assistant configuration - Remove the assistant ID from the phone number in Vapi dashboard - Make sure your webhook response is correctly formatted (which it appears to be now) - Fix the issue with some numbers not working by ensuring your webhook is always accessible and responding correctly Option 2: Use the assistant ID on the phone number - Set the assistant ID on the phone number in Vapi dashboard - Instead of sending a complete assistant configuration in your webhook, just update the dynamic variables for that assistant For option 2, your webhook response should look like this:
Copy code
json
{
  "variableValues": {
    "name": "Max",
    "number": "+33788059808",
    "transcript": "AI: Bonjour, je suis l'assistante vocale.\nUser: Oui bien sûr ça m'intéresse."
  }
}
According to [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables), when you have an assistant ID already set on the phone number, you only need to provide the variable values, not the entire assistant configuration. Is there anything specific about these approaches you'd like me to explain further? Sources:
- [Vapi Documentation Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [Vapi Documentation Server URL Events](https://docs.vapi.ai/server-url/events) - [How webhook responses affect dynamic variables in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335054553250533439) - [How webhook responses affect the assistant ID in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1336765707760963676)
Thanks for providing those additional details. It looks like we're getting closer to solving your issue. Let me ask a few more specific questions: 1. For Option 2 (using the assistant ID on the phone number), are you setting the Server URL in the Vapi dashboard to point to your Make webhook? 2. In your assistant configuration (in the Vapi dashboard), have you added the dynamic variables with double curly braces in your prompts? For example, does your assistant's prompt include text like
Hello {{name}}
somewhere? 3. When you say "call work but not dynamic variable" for Option 2, does this mean the call connects and the assistant responds, but it doesn't use the personalized variables (like the name "Max")? 4. Have you tried removing the
+
character in your webhook template for the number? I notice in your output there's a double
++
which might be causing issues. Sources: - [Vapi Documentation Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [How webhook responses affect dynamic variables in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335054553250533439) - [Vapi Documentation Server URL Events](https://docs.vapi.ai/server-url/events)
Thanks for those clarifications. Let's try to narrow down the issue further: 1. For Option 2, when you have the assistant ID set on the phone number, have you tried changing your webhook response format to include the
assistantOverrides
wrapper? Like this:
Copy code
json
{
  "assistantOverrides": {
    "variableValues": {
      "name": "Max",
      "number": "33788059808",
      "transcript": "AI: Bonjour, je suis l'assistante vocale.\nUser: Oui bien sûr ça m'intéresse."
    }
  }
}
2. Have you checked if your Server URL is correctly configured in the Vapi dashboard? The URL should point directly to your Make webhook endpoint. 3. Are you seeing any errors in the Make.com execution history when Vapi tries to call your webhook? This could help identify if there's a connection issue. 4. Have you tried simplifying your test by using just one variable (like
name
) to see if that works before adding the others? Sources: - [Vapi Documentation Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [How webhook responses affect dynamic variables in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335054553250533439) - [Vapi Documentation Server URL Events](https://docs.vapi.ai/server-url/events)
Hi there! 👋 Based on all the information you've shared, I think I understand what's happening with your dynamic variables. Unfortunately, I wasn't able to find a specific solution for why your dynamic variables aren't working in Option 2 despite having the correct format. However, I can suggest a few more troubleshooting steps: 1. **Check variable name case sensitivity**: Make sure the variable names in your webhook response exactly match those in your assistant's prompt (including case). For example, if your prompt uses
{{Name}}
but your webhook sends
"name": "Max"
, it won't work. 2. **Try with assistantOverrides format**: Since you mentioned Option 2 works with the assistantOverrides format but doesn't show dynamic variables, double-check that your assistant's prompt is using the exact same variable names:
Copy code
json
{
  "assistantOverrides": {
    "variableValues": {
      "name": "Max"
    }
  }
}
And in your prompt:
Hello {{name}}
3. **Server URL location**: According to [Vapi documentation](https://docs.vapi.ai/server-url/events), the Server URL should be set at the phone number level, not just in organization settings. Try setting it specifically on the phone number you're testing with. 4. **Timing issue**: There might be a timing issue where the webhook isn't responding quickly enough. Try adding a small delay in your Make scenario before sending the response. 5. **Check webhook logs**: In the Vapi dashboard, check if there are any logs showing the webhook being called and what response is being received. 6. **Simplify further**: Try with just a single variable and the absolute minimum JSON structure:
Copy code
json
{
  "assistantOverrides": {
    "variableValues": {
      "name": "Max"
    }
  }
}
If none of these solutions work, you might want to reach out to Vapi support with your specific scenario details, as there might be something unique about your setup that's causing this issue.
Is there anything specific about these suggestions you'd like me to explain further? Sources: - [Vapi Documentation Dynamic Variables](https://docs.vapi.ai/assistants/dynamic-variables) - [Vapi Documentation Server URL Events](https://docs.vapi.ai/server-url/events) - [How webhook responses affect dynamic variables in Vapi](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335054553250533439)
I understand your frustration with this issue. I've tried several troubleshooting approaches with you, but it seems we're dealing with a more complex integration problem between Make and Vapi's dynamic variables system. I've escalated this to our technical support team who have deeper access to the system and can investigate what's happening with your specific setup. They'll be able to look into why the dynamic variables aren't being properly applied despite the correct webhook response format. In the meantime, if you have any call IDs from your recent test attempts, please share them as this will help the support team track down exactly what's happening in your specific case. Thank you for your patience and for providing all the detailed information about your setup - it will be very helpful for the team investigating this issue.
Thanks for sharing those additional details about your experience. You've identified a really interesting pattern with how the dynamic variables behave differently depending on whether the assistant is linked to the phone number. I've escalated this issue to our technical support team who have deeper system access and can investigate what's happening with the specific interaction between Make and Vapi's dynamic variables system. The behavior you're describing - where variables work when the assistant isn't linked but stop working when it is linked - definitely suggests there might be an underlying issue in how these components interact. The additional information you've provided about the inconsistent behavior with certain phone numbers will be very helpful for the team investigating this. If you have any call IDs from your recent tests, those would also help the support team track down exactly what's happening in the logs. We appreciate your patience and thorough testing - this kind of detailed feedback is invaluable for improving our platform.
k
Hey Max, When you assign a server URL to your phone number, VAPI makes a request to your phone number asking for the assistant to be used. When you assign an assistant ID to your phone number, and when an inbound call arrives, the assistant is used for the phone number to answer the call. When you assign both of them, the assistant ID is still used to answer the call. But if you assign none of them, you get the message "Couldn't get the assistant. Either set the assistant ID on the phone number or debug your assistant request; check the debugging artifacts." In your case, you are assigning neither. When you don't assign an assistant ID to a phone number, VAPI tries to make a request to a server URL, and that's why you're getting this error message. So either assign an assistant ID or assign a server URL and answer the incoming VAPI request (which is for getting the assistant called Assistant Request), and then it will work as you expect it to work.
v
Thanks for sharing that additional information about the phone number differences! This is really helpful for narrowing down the issue. I've escalated this to our technical support team with all the details you've provided, including the specific behavior difference between your +337 and +336 numbers. This phone number inconsistency is a crucial clue that will help them investigate what's happening. The call ID you shared (CEX1700000214970001f9c144b2d2a) will also be very helpful for the team to trace exactly what's happening in the logs when the error occurs. This definitely appears to be a complex technical issue in how Vapi processes dynamic variables with different phone number formats or configurations. Our support team has access to the system internals and will be able to investigate why some numbers work while others don't, and why the dynamic variables aren't being processed when an assistant ID is bound to a phone number. I appreciate your patience and thorough testing - this kind of detailed feedback with specific examples is incredibly valuable for improving our platform.
I understand that you've fixed the problem - that's great news! 👍 I've escalated your request to delete this post to our support team. They'll handle the removal of your conversation data as soon as possible to ensure your personal information isn't publicly visible. Thank you for letting us know about both the resolution and your privacy concerns. The support team should take care of this shortly. Is there anything else you need help with before they process your request?
k
Marking this ticket as Solved ✅
3 Views