TypeScript SDKUpdated 3 days ago
Recipes
Practical examples for common meeting intelligence workflows using the Skribby TypeScript SDK.
AI Meeting Summary
The most common use case: waiting for a meeting to end, then sending the transcript to an LLM like GPT-4.
import { createClient } from '@skribby/sdk';
import OpenAI from 'openai';
const skribby = createClient({ api_key: process.env.SKRIBBY_KEY });
const openai = new OpenAI();
// This would typically be inside your Webhook handler
async function handleWebhook(payload: any) {
if (
payload.type === 'status_update' &&
payload.data.new_status === 'finished'
) {
// 1. Fetch the full bot data
const bot = await skribby.getBotById(payload.bot_id);
// 2. Extract the transcript text
const fullTranscript = bot.data.transcript
.map((s) => `${s.speaker_name}: ${s.transcript}`)
.join('\n');
// 3. Send to AI
const response = await openai.chat.completions.create({
model: 'gpt-5.2',
messages: [
{
role: 'user',
content: `Summarize this meeting into 5 bullet points:\n\n${fullTranscript}`,
},
],
});
console.log('Summary:', response.choices[0].message.content);
}
}
Real-time "Who is Speaking" UI
Build a live dashboard that highlights the current speaker using WebSockets.
const bot = await skribby.getBotById('bot_uuid');
const realtime = bot.getRealtimeClient();
realtime.on('started-speaking', (data) => {
console.log(`${data.participantName} is talking...`);
// Update your UI state: setHighlightedSpeaker(data.participantId)
});
realtime.on('stopped-speaking', (data) => {
console.log(`${data.participantName} stopped.`);
// Update your UI state: clearHighlightedSpeaker()
});
await realtime.connect();
Export Recording to S3
Move your meeting assets to your own cloud storage as soon as they are ready.
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3';
import axios from 'axios';
const s3 = new S3Client({});
async function exportToS3(botId: string) {
const bot = await skribby.getBotById(botId);
if (bot.data.recording_url) {
// Download the WebM file from Skribby
const response = await axios.get(bot.data.recording_url, {
responseType: 'arraybuffer',
});
// Upload to your S3 bucket
await s3.send(
new PutObjectCommand({
Bucket: 'my-meeting-recordings',
Key: `${botId}.webm`,
Body: response.data,
ContentType: 'video/webm',
}),
);
console.log('Export complete!');
// Optional: Delete from Skribby to save on storage/privacy
await bot.delete();
}
}
Live Sentiment Alerts
Analyze the live transcript stream for specific keywords or sentiment.
realtime.on('ts', (segment) => {
const urgentKeywords = ['cancel', 'unhappy', 'refund', 'manager'];
const isUrgent = urgentKeywords.some((word) =>
segment.transcript.toLowerCase().includes(word),
);
if (isUrgent) {
sendSlackAlert(
`Urgent keyword detected in live meeting! "${segment.transcript}"`,
);
}
});