Need Help for Automation via Make.com and dynamic ...
# support
e
Hello, I would like to create an assistant via a http request and add a function to send an SMS with Twilio, I am having an issue to figure out how to map the dynamic data (customer_name, customer_phonenumber ...). Your help would be appreciated.
v
Hi @Elyes | Low-Code Developer, I'm an AI assistant for Vapi. I'll analyze available sources and get back to you shortly.
----------------------------- **While I generate an answer, here are some sources that might be helpful**: * [Create Phone Call]() * [Create Assistant]() * [List Calls]() * [Get Call]() -----------------------------
### Answer To create an assistant via an HTTP request and incorporate dynamic variables such as customer name and phone number, you can use the Vapi platform's API. Here’s a general structure of how you could structure your JSON payload when making a POST request to create an assistant. This example includes custom data fields like customer name and phone number which you can use to tailor the assistant's behavior or use in subsequent actions like sending an SMS with Twilot [(1)]() .
Copy code
json
{
  "transcriber": {
    "provider": "deepgram",
    "model": "nova-2",
    "language": "cs",
    "smartFormat": true
  },
  "model": {
    "messages": [
      {
        "content": "Hello, {{customer_name}}. Your phone number is {{customer_phonenumber}}.",
        "role": "assistant"
      }
    ],
    "provider": "openai",
    "model": "gpt-4o"
  },
  "voice": {
    "provider": "azure",
    "voiceId": "andrew",
    "speed": 1.25
  },
  "metadata": {
    "customer_name": "John Doe",
    "customer_phonenumber": "+1234567890"
  }
}
This JSON payload uses placeholders (e.g.,
{{customer_name}}
) within the message content that can dynamically insert data provided in the
metadata
object. When crafting your HTTP request from Make.com, ensure that you replace these placeholders with the actual dynamic data fields you retrieve from your workflow. For sending an SMS with Twilio integrated into this process, you would typically handle this on your backend server after receiving a webhook from Vapi, or directly through Twilio’s API using the information extracted or passed through from the assistant session. Remember to replace placeholder fields and values with actual data and ensure your API keys and tokens are securely handled.
e
I would like to call a list of customers using this assistant
This uses pipedream but you can easily replicate it to make.com
e
Thanks Sahil
If I understood correctly each time I make a phone call request I need to push the content with the phone number for the system prompt ?
s
Yup.
9 Views