Send data to url taken by Vapi Assistant.
# support
m
I need help to pass the data collected by VAPI assistant to a web URL. For example if I call and VAPI Assistant take the fillowing tetails My name, My Phone, My Email then I want the assistant to send the details to a website url As post. Please help me to do it.
v
@Maruf WellnessExpress Certainly! To pass the data collected by the VAPI assistant to a web URL, you'll need to follow these steps: 1. **Create an Endpoint**: Set up an endpoint on your server that can handle POST requests. This endpoint will receive the data from the VAPI assistant. 2. **Configure VAPI**: Add the endpoint URL to the Server URL field in the Account page on the Vapi Dashboard. This tells VAPI where to send the data. 3. **Collect Data**: Ensure your VAPI assistant is set up to collect the necessary details during the call, such as name, phone, and email. 4. **Send Data**: After the call, VAPI will automatically send the collected data to the configured endpoint using a POST request. Here's a basic example of what the code on your server might look like to handle the incoming data:
Copy code
python
from flask import Flask, request

app = Flask(__name__)

@app.route('/receive_data', methods=['POST'])
def receive_data():
    data = request.json
    name = data.get('name')
    phone = data.get('phone')
    email = data.get('email')
    # Process the data as needed
    return 'Data received', 200

if __name__ == '__main__':
    app.run(debug=True)
Make sure your server is properly secured to handle personal data and complies with any relevant data protection laws. If you need any further assistance with setting up your server or configuring VAPI, please let me know!
You can continue this conversation by mentioning me in the message.
m
Give me more details on Step 2
s
@Maruf WellnessExpress 1. Assign Server URL to your assistant. 2. Select server event
end-of-call-report
3. Now Collect user data using prompt/assistant. 4. Use analysis plan - structured data to extract user data from the transcript. 5. Now make a call and at the end of call after 30 seonds Vapi will send end of call report to your server url. This report will call analysis along with other data, look for analysis.strucutredData you will find your required data.
Do let me know if you require further help.
2 Views