Home Features Salesforce Pricing Try Demo
Integration Guide

Connect Dialpad to RiskDetect

Automatically analyze every customer call for churn signals, escalation risk, and sentiment shifts. This guide walks you through connecting Dialpad's call transcripts to RiskDetect.


Setup time: approximately 30 minutes
Dialpad Call Ends Webhook Event Your Server (middleware) RiskDetect API Risk Score + Alerts

Option A: Zero-Code Direct Webhook (Recommended)

The fastest setup. Point Dialpad's webhooks directly at RiskDetect. No middleware needed.

1

Get Your RiskDetect API Key

Sign up free and copy your API key (shown once at registration).

2

Add Webhook in Dialpad

Go to Dialpad Admin > Integrations > Webhooks and add:

Webhook URL
https://riskdetect.app/api/inbound-dialpad Headers: Authorization: Bearer YOUR_RISKDETECT_API_KEY Events: call.hangup
3

Done

Every completed call is now automatically analyzed. Check your dashboard for risk scores, or set up alert rules to get Slack/webhook notifications for high-risk calls.

That's it
RiskDetect handles all transcript parsing, risk analysis, customer tracking, and sentiment trending automatically. No middleware, no code, no maintenance.

Option B: Custom Middleware

For more control over which calls get analyzed, or to enrich data before sending.

Prerequisites

How It Works

  1. Dialpad transcribes every call using built-in AI
  2. When a call ends, Dialpad fires a webhook with the call details
  3. Your middleware fetches the full transcript via Dialpad's API
  4. The transcript is sent to RiskDetect's /api/analyze endpoint
  5. RiskDetect scores the interaction (0-100) and returns risk signals
  6. If the score exceeds your threshold, alerts fire to Slack/webhook/email

Step-by-Step Setup

1

Create a Dialpad API Key

Go to Dialpad Admin > Company Settings > API Keys. Create a new API key with call:read and transcript:read permissions.

Security Note
Store your Dialpad API key in environment variables, never in code. Rotate keys periodically.
2

Set Up a Webhook in Dialpad

Go to Dialpad Admin > Integrations > Webhooks. Add a new webhook subscription:

  • Event type: call.hangup (fires when a call ends)
  • URL: Your server endpoint (e.g., https://your-server.com/dialpad-webhook)

Dialpad also supports call.transcription events for real-time transcript chunks. For full-call analysis, call.hangup is recommended.

3

Build the Middleware

When Dialpad sends a webhook, your middleware needs to:

  1. Extract the call_id from the webhook payload
  2. Fetch the full transcript from Dialpad's API
  3. Send the transcript to RiskDetect for analysis

Node.js Example

JavaScript dialpad-riskdetect.js
// Express middleware for Dialpad to RiskDetect const express = require('express'); const app = express(); app.use(express.json()); const DIALPAD_API_KEY = process.env.DIALPAD_API_KEY; const RISKDETECT_API_KEY = process.env.RISKDETECT_API_KEY; app.post('/dialpad-webhook', async (req, res) => { const { call_id, state, contact } = req.body; // Only process completed calls if (state !== 'hangup') return res.sendStatus(200); try { // 1. Fetch transcript from Dialpad const transcriptRes = await fetch( `https://dialpad.com/api/v2/transcripts/${call_id}`, { headers: { Authorization: `Bearer ${DIALPAD_API_KEY}` } } ); const transcript = await transcriptRes.json(); // 2. Combine transcript lines into full text const fullText = transcript.lines .map(l => `${l.speaker}: ${l.text}`) .join('\n'); // 3. Send to RiskDetect const analysis = await fetch( 'https://riskdetect.app/api/analyze', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${RISKDETECT_API_KEY}`, }, body: JSON.stringify({ content: fullText, from: contact?.email || contact?.phone || 'unknown', subject: `Call with ${contact?.name || 'Customer'} - ${new Date().toLocaleDateString()}`, }), } ); const result = await analysis.json(); console.log(`Analyzed call ${call_id}: score=${result.risk_score}`); res.json({ ok: true, risk_score: result.risk_score }); } catch (err) { console.error('Analysis failed:', err.message); res.status(500).json({ error: 'Analysis failed' }); } }); app.listen(3000, () => console.log('Listening on :3000'));

Python Example

Python dialpad_riskdetect.py
# Flask middleware for Dialpad to RiskDetect import os, requests from flask import Flask, request, jsonify app = Flask(__name__) DIALPAD_API_KEY = os.environ['DIALPAD_API_KEY'] RISKDETECT_API_KEY = os.environ['RISKDETECT_API_KEY'] @app.route('/dialpad-webhook', methods=['POST']) def handle_webhook(): data = request.json call_id = data.get('call_id') state = data.get('state') if state != 'hangup': return jsonify(ok=True), 200 transcript = requests.get( f'https://dialpad.com/api/v2/transcripts/{call_id}', headers={'Authorization': f'Bearer {DIALPAD_API_KEY}'} ).json() full_text = '\n'.join( f"{l['speaker']}: {l['text']}" for l in transcript.get('lines', []) ) contact = data.get('contact', {}) result = requests.post( 'https://riskdetect.app/api/analyze', headers={ 'Content-Type': 'application/json', 'Authorization': f'Bearer {RISKDETECT_API_KEY}', }, json={ 'content': full_text, 'from': contact.get('email') or contact.get('phone', 'unknown'), 'subject': f"Call with {contact.get('name', 'Customer')}", } ).json() return jsonify(ok=True, risk_score=result['risk_score'])
4

Set Up Alert Rules

In your RiskDetect dashboard, go to Alerts and create rules:

  • Score above 70 - Send Slack alert to #customer-risk channel
  • Keyword: "cancel" - Send webhook to your CRM
  • Score above 85 - Email CS manager immediately
5

Monitor the Dashboard

Every analyzed call appears in your RiskDetect feed. The Customers view shows sentiment trends per customer across all their calls. The Trends view shows risk distribution over time.

Alternative: Batch Import (No Webhook)

If you'd rather not set up webhooks, you can export transcripts from Dialpad's admin portal as CSV and upload them to RiskDetect:

  1. Go to Dialpad Admin > Analytics > Export
  2. Download the call logs with transcriptions
  3. In RiskDetect dashboard, go to Upload and drag in the CSV
  4. RiskDetect analyzes each row and scores every interaction
Tip
Batch import is great for analyzing historical calls. Once you see the value, switch to the webhook setup for real-time detection going forward.

Alternative: Zapier (No Code)

Connect Dialpad to RiskDetect through Zapier without writing code:

  1. Trigger: Dialpad > New Call Recording
  2. Action: Webhooks by Zapier > POST to https://riskdetect.app/api/analyze
  3. Map the transcript field to content, caller info to from

What RiskDetect Detects in Call Transcripts

Need Help?

Email morgan@riskdetect.app for setup help. We can walk you through the integration in under 30 minutes.