Hey, I’m having an issue with dynamic
# general-english
t
Hey, I’m having an issue with dynamic variables not loading in time during inbound calls. Here’s what’s happening: • I have a Vapi assistant with {{name}}, {{petName}}, and {{petType}} set up in the first message. • I’m using the “Server URL” (not a tool) to trigger an n8n webhook on call start. • In the webhook, I query Supabase for the customer and pet data based on customer.number, then respond with a Respond to Webhook node like this: { "assistantId": "xxxxx", "assistantOverrides": { "variableValues": { "name": "John", "petName": "Zena", "petType": "cat" } }, "customer": { "number": "+19782221234" }, "phoneNumberId": "xxxxxx" } Everything looks fine in the webhook response logs, and the data is correctly passed back. BUT… the assistant still starts the call by saying “Hi, thanks for calling” instead of using the name. However, when I manually trigger the call via API (using the same values), the assistant says the name correctly. It seems like the webhook response is arriving too late during inbound calls. Is there any way to delay the first message until the webhook returns the assistantOverrides? Or am I missing something in the config? Would appreciate any guidance!
s
Can you share the call Id?
t
hi, here is the call id: dcce867a-e400-4624-ad8d-09a22566e111
thank you!
s
t
Hi Shubham, thanks again. My inbound call is not applying the assistantOverrides, but I am able to apply them in an outbound call using a POST request to https://api.vapi.ai/call/phone. Here’s the outbound call ID that worked: 4b97981a-4d2e-453c-8a2b-a15a55f42e6b I’m using n8n for both flows and I’ve attached files showing how both inbound and outbound flows are set up. For the inbound call, I’m only using the webhook response, not an HTTP POST, and assistantOverrides are not being applied. Should I be using a different approach — like creating a transient assistant — to make this work with inbound SIP calls? Thanks for helping me sort this out 🙏 https://cdn.discordapp.com/attachments/1353047596515590187/1353759486019502180/inbound_call.json?ex=67e2d245&is=67e180c5&hm=c9074991772af133e9b5daf1f2a7c5546e74538a4316503c02c247906280c5a5& https://cdn.discordapp.com/attachments/1353047596515590187/1353759486463967324/inbound.png?ex=67e2d245&is=67e180c5&hm=59251fe2b745224041d39577905221fa3523a2e9cfa037bfe06ef82717ee08bf& https://cdn.discordapp.com/attachments/1353047596515590187/1353759486833197076/outbound.png?ex=67e2d245&is=67e180c5&hm=f29cfa4f06a4bb7da63d2c429c3e6f78dd4986e6c1e53c08fd6e13e70bbca420& https://cdn.discordapp.com/attachments/1353047596515590187/1353759487089184830/outbound.json?ex=67e2d245&is=67e180c5&hm=c6666a1ed7d6eae390ebc9717bdb873943ba3b977b5b2828d6e96db5e9bdc80f&
s
Looking into it
Hi Tiago Bardini , thanks for calling! My name is Pink. Are you looking to book an appointment for your pet at Pink Dog Spa today?
Replace Pink with {{name}}
t
This call id with Thiago Bardini is outbound call this is working as expected m. The problem is inbound call and my firstMessage is “ Hi {{name}} , thanks for calling! My name is Pink. Are you looking to book an appointment for your pet at Pink Dog Spa today? “
This is my assistantID: a386d462-a987-4c79-9539-89e8f56a0528
In previous tests, I was using a vapi phone number, but I am now unable to reach the assistant.
s
Phone number ID PLEASE.