Issue in Sending Email via AI flow
# support
s
Hi, I’m building a FastAPI backend with Vapi’s assistant and using two tools. My Google Sheet stores name, phone, and email, which my backend can access. I’ve added a webhook under Assistant → Advanced → Message → Server URIs to log full conversations to MongoDB — this part works. When I call from my phone, the system correctly logs and extracts my name/email from the sheet. Issue: I want the assistant to ask: “Do you want to schedule a meeting?” If yes, it should check if email exists in the sheet. If found, ask for date/time and send a calendar invite. If not found, ask for Gmail + date/time. But currently, even when I call from a known number, it asks for my phone again — not fetching it from metadata or sheet. Problem 2: If I say my number (+911234567890), the backend returns 422 Unprocessable Entity. Likely, the payload is malformed or the phone isn’t captured properly from speech. Problem 3: Even after saying my email, the assistant doesn’t trigger the calendar invite. But hitting the backend manually with curl works and sends the mail. Tool 1 - verify-email: POST /api/tools/verify-email Schema: { "type": "object", "properties": { "phone": { "type": "string" } }, "required": ["phone"] } Manually calling it with: curl -X POST https:///api/tools/verify-email -d '{"phone": "+91..."}' returns correct email/name from the sheet. My system prompt instructs the assistant to call verify-email(phone) using metadata, but it still asks for phone input and returns 422. Questions: Does Vapi pass caller phone metadata to tools automatically? If not, how can I access it in session/memory? Is there a delay in schema/tool updates reflecting in assistant behavior? Please help — everything works via curl but not via voice flow.
k
We are responding to your other request via email. If you would like to get the phone number from a caller, use the default variable {{customer.number}} to access it. If you are updating the actual tool properties and config during the call, the tool config will update but will not reflect changes in the call until it ends and you start a new call since tool configs are pulled at the beginning of the call.
s
Hi kyle, Thank you for responding So just tell me what should i do to implement the email sending logic, i am going to use my AI bot for cold calling and it will send follow up email, please tell me how to implement it.
k
Could you send a call id so we can investigate the logs? It will help me better understand what is happening with the data flow