Vapi + n8n Outbound Call – How to Make Agent Retai...
# support
m
Hey team, I’ve built an outbound calling system using n8n integrated with Vapi. It fetches lead data (like name, phone number, and MR number) from Google Sheets, makes the call via HTTP request to Vapi, and then logs the responses and feedback back into Sheets. The problem I’m facing: The agent doesn't remember the lead’s info (like their name or MR number) once the call starts. This leads to awkward or impersonal conversations, and recipients get annoyed. What I’m trying to solve: How can I make the agent "remember" or access the lead's data throughout the call, from greeting to feedback collection? Is there a way to persist lead info in Vapi during the call session, or dynamically inject it into prompts or memory so the agent speaks with full context? Any guidance or examples would be a big help. Thanks in advance!
v
To make your Vapi agent retain and use lead info during the call, inject the lead data as dynamic variables in your outbound call request. For example, when making the HTTP request from n8n, use:
Copy code
json
{
  "assistantId": "your-assistant-id",
  "phoneNumberId": "your-phone-number-id",
  "customer": { "number": "+1XXXXXXXXXX" },
  "assistantOverrides": {
    "variableValues": {
      "name": "John Doe",
      "mcNumber": "123456"
    }
  }
}
In your assistant's prompts, use
{{name}}
and
{{mcNumber}}
to reference these values throughout the call. This ensures the agent always has access to the lead's info and can personalize the conversation ([docs](https://docs.vapi.ai/assistants/dynamic-variables#using-dynamic-variables-in-a-phone-call)). Source: - [Using dynamic variables in a phone call](https://docs.vapi.ai/assistants/dynamic-variables#using-dynamic-variables-in-a-phone-call)
c
Use a transient assistant with lead-specific variables, keep context using a sessionId, and manage mid-call updates via external storage for full personalization..
2 Views