Send Transcript to database
# support
m
Is there documentation for firebase integration?
v
Hi @MaxKnox, 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**: * [Pizza Website Example]() * [Voice Widget Example]() * [Vapi Flutter SDK]() * [Server URLs]() -----------------------------
### Answer The available documentation doesn't include specific instructions for Firebase integration. However, you can use the Server URLs feature in Vapi to send conversation transcripts to your server, and from there, you can forward the data to Firebase. 1. Set Up Server URL: You need to set up a server URL to receive real-time conversation data such as transcripts and function calls. Detailed information on setting up Server URLs is available in the documentation [(1)]() . 2. Send Data to Firebase: Once you receive the transcripts on your server, you can write custom code to send this data to your Firebase database. Here is an example of setting up a server URL to receive transcripts:
Copy code
javascript
vapi.on('message', (msg) => {
  if (msg.type !== 'transcript') return;

  // Example code to send transcript data to Firebase
  fetch('https://your-firebase-url.firebaseio.com/transcripts.json', {
    method: 'POST',
    body: JSON.stringify({
      transcript: msg.transcript,
      timestamp: new Date().toISOString(),
    }),
    headers: {
      'Content-Type': 'application/json',
    },
  });
});
This example listens for transcript messages and sends them to a Firebase database, [(2)]() .
m
I already have a sendMail endpoint where I send data via nodemail and smtp to an email of choice... can you show me how to trigger that endpoint at the end of the call with the entire transcript?
v
Got it. Tagging @User for additional help.
m
s
You need to write script on your own and then you can do it.
3 Views