ratty-blush•17mo ago
get metadata and include it in a call
When user submits a contact form from our website, a GHL automation will send the content of the message and send this a Make Scenario where the data from the message is parsed and included into the request body of the actual phone call post.
Here's the sample request body:
How can I instruct my assistant to get the following:
1. Get the customer.name and say, "...May I speak with [name]?"
2. "We would like to confirm that you wanted [metadata.message]?"
5 Replies
Hi @binaryruel, 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
* Update Assistant
* List Assistants
-----------------------------
Answer
To achieve the functionality you're asking for—having the assistant use the
customer.name
and metadata.message
in its conversation—you'll need to incorporate these elements directly into the assistant's system prompt or first message, as these parameters are not automatically utilized in the conversation by Vapi.
Based on the information in the documents, the customer.name
attribute and metadata
are for your own reference and are not inherently included in the conversation by the assistant. To ensure the assistant mentions the customer’s name and their message, you'll need to dynamically generate the firstMessage
or system prompt to include these details before making the POST request to create a phone call.
From the scenario you provided, here's a way to structure your POST request body with pseudo-code placeholders for dynamic content to be replaced with actual values from your system:
In the
firstMessage
, replace {{customer_full_name}}
and {{customer_message}}
with the actual customer's name and their message. This dynamic content needs to be processed and inserted into the request by your backend or integration layer (e.g., GHL automation or Make Scenario) before sending it to Vapi.
Note: This approach assumes that the assistant is capable of handling dynamic firstMessage
content per call, which aligns with Vapi's flexible assistant configuration as indicated in the documentation (1) . However, the direct manipulation of firstMessage
to include custom variables from metadata
or any other dynamic source isn't explicitly covered in the provided documents. Therefore, ensure your implementation preprocesses these variables into the request payloads as needed.
For more detailed guidance on creating assistants and calls, please refer to the official Vapi documentation on creating a phone calland creating an assistant (2) .sensitive-blue•17mo ago
Put the data directly into System Prompt.
ratty-blushOP•17mo ago
how?
sensitive-blue•17mo ago
Jannis Moore | AI Automation
YouTube
Build an AI Real Estate Cold Caller in 10 minutes | Vapi Tutorial F...
In this video, I will create an AI cold calling agent in just a few minutes! This step-by-step tutorial provides the quickest and most cost-effective method to build your own AI caller, complete with personalized data for higher lead conversion rates.
Resource Hub:
https://hub.integraticus.com
https://hub.integraticus.com/build-an-ai-cold-call...