These contain the actual conversation content:
{
type: 'transcript',
role: 'user' | 'assistant',
text: 'The message content',
// Additional fields may include:
timestamp: '2024-01-10T12:00:00Z',
transcriptId: 'unique-id'
}When VAPI needs to call external functions:
{
type: 'function-call',
functionCall: {
name: 'processWithN8N',
parameters: {
userMessage: 'user query',
agentId: 'agent-id',
context: {}
}
}
}- call-start - Call initiated
- call-end - Call terminated
- speech-start - User started speaking
- speech-end - User stopped speaking
- volume-level - Audio volume updates
- error - Error occurred
- message - Various message types
To verify conversations are being saved:
-
Check browser console for:
- "📨 VAPI Message: transcript"
- "Saving user/assistant message:"
- "Using conversation ID: [uuid]"
- "✅ Successfully saved"
-
Check Supabase messages table:
SELECT * FROM messages WHERE conversation_id = 'your-conversation-id' ORDER BY created_at DESC;
-
Check conversations table:
SELECT * FROM conversations WHERE agent_id = 'your-agent-id' ORDER BY created_at DESC;
If messages aren't saving:
- Ensure conversation ID is created before speaking
- Check for console errors about Supabase inserts
- Verify the message has both
type: 'transcript'and arole - Confirm the
textfield contains the message content