If you've built collaborative features before, you know the pain of manually handling every notification and workflow trigger. Fortunately, when you're using a real-time collaboration SDK like Velt, webhooks can change your setup into an automation powerhouse that responds to events without any manual intervention.
TLDR:
- Velt webhooks automatically trigger external workflows when collaborative events occur in your app 
- Setup requires configuring endpoint URLs and authentication tokens in the Velt console 
- Webhook payloads include - actionTypefields that describe comment and huddle events
- You can integrate webhooks with Slack, project management tools, and custom APIs for smooth automation 
Understanding Velt Webhooks
Webhooks are automated notification systems that push data to your applications whenever specific events happen. In the context of a real-time collaboration SDK, they become the bridge between user interactions and your broader tech stack.
When someone adds a comment or joins a huddle in your app, Velt webhooks can instantly notify external services. This gets rid of the need for constant polling and creates more responsive, event-driven workflows.
Think of webhooks as your app's way of saying "hey, something important just happened" to other systems that need to know about it. Instead of those systems constantly asking "did anything happen yet?", they simply wait for the webhook to deliver the news.
The beauty of using a collaboration SDK like Velt is that you get enterprise-grade webhook functionality without building and maintaining the underlying WebSocket infrastructure yourself. You're getting a battle-tested system that scales to handle millions of events.

Setting Up Velt Webhooks
Getting your first webhook running is surprisingly straightforward. You'll start in the Velt console where you can configure your endpoint URLs and authentication settings.
First, you'll need to decide between Basic and Advanced Webhooks. Basic Webhooks support comment and huddle events, while Advanced Webhooks provide broader event coverage and richer payloads. We'll use Basic Webhooks for this article.
Here's what a basic webhook endpoint setup looks like:
app.post('/webhook', (req, res) => { const authHeader = req.headers['authorization']; const expected = `Basic ${process.env.VELT_WEBHOOK_TOKEN}`; if (authHeader !== expected) { return res.status(401).send('Unauthorized'); } const event = req.body; console.log('Received webhook:', event); res.status(200).send('OK'); });
Each webhook uses an authentication token you configure in the Velt console, passed in the Authorization header. For additional security, Velt also supports optional payload encryption (AES or RSA).
When configuring your webhook in the console, you'll specify which events should trigger notifications. You might want all comment events for a notification system, or just specific actions for task management integration.
Webhook Event Types and Payloads (Basic)
Velt webhooks support key collaborative events, like comments and huddles, each with its own payload structure. The actionType field is your key to understanding what happened and how to respond.
| Event Type | ActionType | Common Use Cases | 
|---|---|---|
| Comments | newlyAdded, added, updated, deleted, approved, assigned | Notifications, task creation | 
| Huddles | created, joined | Meeting logs, time tracking | 
Here's what a typical comment webhook payload looks like:
{ "webhookId": "wh_abc123", "notificationSource": "comment", "actionType": "added", "actionUser": { "userId": "user_123", "name": "Sarah Chen" }, "commentAnnotation": { "comments": [ { "commentId": "comment_456", "commentText": "This section needs revision" } ] }, "metadata": { "documentId": "doc_789", "documentName": "Product Requirements" } }
The payload structure varies based on the actionType, but you’ll always get the key context needed to trigger appropriate responses. For commenting SDK webhook events, you’ll receive information about the user who took the action, the comment content, and the related document.
Creating Automated Workflows with Webhooks
The real power of webhooks shows up when you start building automated workflows that respond to collaborative events. Let's look at some practical examples that showcase how webhooks can simplify team processes.
Notification Automation
One of the most common use cases is automatically sending notifications when important events occur. You can set up workflows that post to Slack channels when comments are added to critical documents or send emails when a new huddle is created.
function handleCommentWebhook(event) { if (event.actionType === 'added') { const { actionUser, commentAnnotation, metadata } = event; const comment = commentAnnotation.comments[0]; const message = `${actionUser.name} commented: "${comment.commentText}" on ${metadata.documentName}`; sendSlackNotification(message, '#product-team'); if (comment.commentText.includes('@urgent')) { sendEmailAlert(actionUser.userId, metadata.documentId); } } }
Task Management Integration
Webhooks can automatically create tasks in project management tools when specific comment patterns are detected. This bridges the gap between collaborative discussions and actionable work items.
Data Synchronization
You can use webhooks to keep external databases synchronized with collaborative activity. This is particularly useful for analytics, audit logs, and compliance reporting.
The key advantage of webhook-driven automation is that it happens in real time without any intervention. Your team can focus on the actual work while the system handles routine coordination tasks automatically. This changes how teams work together by reducing the friction between discussion and action. Instead of manually tracking comments and converting them to tasks, the system does it automatically based on the patterns you define.
Code Examples and Implementation
Let’s look at some lightweight examples that show how to implement webhook handlers in a production-ready way.
Basic Webhook Handler with Error Handling
app.post('/velt-webhook', async (req, res) => { try { const authHeader = req.headers['authorization']; const expected = `Basic ${process.env.VELT_WEBHOOK_TOKEN}`; if (authHeader !== expected) { return res.status(401).json({ error: 'Invalid auth token' }); } const event = req.body; switch (event.actionType) { case 'added': await handleNewComment(event); break; case 'created': await handleHuddleCreate(event); break; case 'joined': await handleHuddleJoin(event); break; default: console.log('Unhandled event type:', event.actionType); } res.status(200).json({ status: 'processed' }); } catch (error) { console.error('Webhook processing error:', error); res.status(500).json({ error: 'Processing failed' }); } });
Comment Processing with Conditional Logic
async function handleNewComment(event) { const { actionUser, commentAnnotation, metadata } = event; const comment = commentAnnotation.comments[0]; if (comment.commentText.includes('TODO:') || comment.commentText.includes('ACTION:')) { await createTask({ title: extractActionItem(comment.commentText), assignee: findMentionedUser(comment.commentText) || actionUser.userId, source: `Comment on ${metadata.documentName}`, priority: comment.commentText.includes('urgent') ? 'high' : 'normal' }); } if (metadata.documentName.includes('Design')) { await notifyDesignTeam(event); } else if (metadata.documentName.includes('Code')) { await notifyDevelopers(event); } }
This approach lets you build logic that responds differently based on the comment content, context, and user actions. The Velt platform provides all the collaborative event data you need to make these decisions.
Retry Logic for Reliability
Since Basic Webhooks don’t guarantee retries, acknowledge quickly and retry processing inside your system.
async function processWebhookWithRetry(event, maxRetries = 3) { for (let attempt = 1; attempt <= maxRetries; attempt++) { try { await processEvent(event); return; // success } catch (error) { console.log(`Attempt ${attempt} failed:`, error.message); if (attempt === maxRetries) { await logFailedWebhook(event, error); throw error; } // Exponential backoff await new Promise(resolve => setTimeout(resolve, Math.pow(2, attempt) * 1000)); } } }
Integrating with External Services
Velt webhooks excel when you connect them to your existing business tools. Here are a few common integration patterns that teams use to improve their workflows.
Slack Integration
Slack is one of the most common webhook destinations. For example, you can send notifications when new comments are added to important documents:
async function sendSlackNotification(event) { const { actionUser, commentAnnotation, metadata } = event; const comment = commentAnnotation.comments[0]; const slackMessage = { text: `New comment from ${actionUser.name}`, blocks: [ { type: "section", text: { type: "mrkdwn", text: `*${actionUser.name}* commented on *${metadata.documentName}*:\n"${comment.commentText}"` } }, { type: "actions", elements: [ { type: "button", text: { type: "plain_text", text: "View Document" }, url: `https://yourapp.com/docs/${metadata.documentId}` } ] } ] }; await fetch(process.env.SLACK_WEBHOOK_URL, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(slackMessage) }); }
Project Management Tools
You can also use webhooks to create tasks in project management tools like Linear, Asana, or Jira when certain comment patterns are detected:
async function createLinearTask(event) { const { actionUser, commentAnnotation, metadata } = event; const comment = commentAnnotation.comments[0]; if (comment.commentText.includes('BUG:')) { const taskData = { title: extractBugTitle(comment.commentText), description: `Reported by ${actionUser.name} in ${metadata.documentName}\n\n${comment.commentText}`, teamId: 'engineering-team', priority: 2, labels: ['bug', 'from-comment'] }; await linearClient.createIssue(taskData); } }
The key is identifying the tools your team already uses and building bridges that eliminate manual work. Check out our examples to see more integration patterns in action.
Best Practices and Security
Building production-ready webhook systems requires attention to security and reliability details that might not be obvious during initial development.
Authentication and Security
Always verify the authentication header before processing webhook data. Velt also supports optional AES or RSA payload encryption for additional security.
function verifyAuthToken(authHeader) { const expected = `Basic ${process.env.VELT_WEBHOOK_TOKEN}`; return authHeader && crypto.timingSafeEqual( Buffer.from(authHeader), Buffer.from(expected) ); }
Idempotency Handling
Webhooks may occasionally be delivered more than once. Implement idempotency checks to prevent duplicate processing:
// Simplified, single-instance example const processed = new Set(); function seen(eventId) { if (processed.has(eventId)) return true; processed.add(eventId); return false; }
Error Handling and Monitoring
To build reliable webhook systems, add basic observability and guardrails:
- Log key details for each event (ID, type, status, errors) 
- Set up alerts for failures or unusual latency 
- Use retries with backoff and circuit breakers for flaky dependencies 
- Keep endpoints fast (<5s), and push heavy work to a background queue 
This ensures failures are visible, recoverable, and won’t block other events.

FAQ
How do I test Velt webhooks during development?
Use tools like ngrok to expose your local development server to the internet, then configure that URL in the Velt console. You can also use webhook testing services like webhook.site to inspect the payload structure before building your handler.
What happens if my webhook endpoint is down?
Velt will retry failed webhook deliveries with exponential backoff for Advanced Webhooks. However, you should implement your own monitoring and alerting to quickly identify and resolve endpoint issues.
Can I filter which events trigger webhooks?
Yes, you can configure event filters in the Velt console to only receive webhooks for specific action types. This reduces noise and improves performance.
How do I handle webhook authentication securely?
Always verify the Authorization header (Basic <token>) using constant-time comparison, store your webhook tokens as environment variables, and use HTTPS endpoints to encrypt data in transit.
What’s the difference between Basic and Advanced Webhooks?
Basic Webhooks support core events like comments and huddles. Advanced Webhooks provide broader event coverage and richer payloads for more complex workflows.
Conclusion
That's the start of what becomes possible with a real-time collaboration SDK like Velt that covers 25+ features beyond basic commenting. From live huddles and screen recording to contextual threads. Once you've automated your first workflow with webhooks, you're well on your way to creating the kind of smooth and easy experience that keeps your teams productive and engaged.



