utkarsh
01/06/2025, 6:46 PMVapi
01/06/2025, 6:48 PMfetch
API:
javascript
function sendReportToServer(email, report) {
const endpoint = 'YOUR_SERVER_ENDPOINT_URL'; // Replace with your server endpoint URL
const data = {
email: email,
report: report,
};
fetch(endpoint, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
})
.then(response => response.json())
.then(data => {
console.log('Success:', data);
})
.catch((error) => {
console.error('Error:', error);
});
}
In this function, replace 'YOUR_SERVER_ENDPOINT_URL'
with the URL of the endpoint on your server that's set up to receive the data and forward it to Make.com.
Remember to handle the response and any potential errors appropriately. Also, ensure that your server-side code is prepared to receive the JSON data and make the subsequent POST request to Make.com with the correct parameters they require.
If you need any further assistance with the specifics of VAPI or the server-side implementation, please let me know!Vapi
01/06/2025, 6:48 PMutkarsh
01/06/2025, 6:49 PMutkarsh
01/06/2025, 6:56 PMShubham Bajaj
01/08/2025, 10:01 AMYou -> Create Call -> In Progress Call -> Call Terminates -> Vapi Sends End of Call Report To Your Server -> Your Server Sends the Email To User