How can I configure my agent to say the name of th...
# support
m
I am making an n8n workflow where I post an instruction to my Vapi agent that will make outbound calls. I have a google sheet table where I have a list of leads with their names. I want to say to my agent to start the call with "Hi, I’m Alex, . Is this {{name}}?". this is based on the name that I have on the google sheet and the number dialed. How can I accomplish this? Everything so far, works fine, it is just I want the name. https://cdn.discordapp.com/attachments/1354996019447992340/1354996019678412971/Screenshot_2025-03-27_194940.png?ex=67e751e1&is=67e60061&hm=de9188fbd9db66f8a22cb495c4dfe3d8bf6d9718e27f09b5dfcc546b2141bcc9&
v
Hi there! šŸ‘‹ I see you want your Vapi agent to personalize calls by using the lead's name from your Google Sheet. I can definitely help with that! Based on the information I found, you'll need to pass the name from your Google Sheet as a dynamic variable to your Vapi agent. Here's how to accomplish this: ### 1. Update Your JSON Payload Looking at your attached image, you're already using a dynamic expression for the phone number (
{{ $json['Phone number'] }}
). You'll need to add the
assistantOverrides
object with
variableValues
to your JSON payload:
Copy code
json
{
  "phoneNumberId": "your_phone_number_id",
  "assistantId": "your_assistant_id",
  "customer": {
    "number": "{{ $json['Phone number'] }}"
  },
  "assistantOverrides": {
    "variableValues": {
      "name": "{{ $json['Name'] }}"
    }
  }
}
Replace
'Name'
with the actual column name in your Google Sheet that contains the lead's name. ### 2. Configure Your Agent's Initial Message Make sure your agent's initial message includes the variable in the format you mentioned: "Hi, I'm Alex. Is this {{name}}?" According to the [Vapi documentation on dynamic variables](https://docs.vapi.ai/assistants/dynamic-variables), these templates are defined using double curly braces
{{variableName}}
, which you're already using correctly. ### 3. Test Your Configuration After setting up the dynamic variable, test your agent to ensure it correctly uses the name from your Google Sheet during calls. Is there anything specific about this implementation you'd like me to clarify further? Sources: - [Vapi documentation on dynamic variables](https://docs.vapi.ai/assistants/dynamic-variables) - [Discord thread on using dynamic variables](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1335054553250533439)
m
@Vapi It worked well!
v
Message marked as helpful by @Marv! šŸŽ‰
s
Hey @Marv, checking if this is resolved/solved for you?
m
It is resolved @Shubham Bajaj
s
Marking this ticket as Solved āœ