Webhooks

Reciba notificaciones HTTP POST en tiempo real cuando sucedan eventos.

Resumen

Los webhooks te permiten recibir notificaciones HTTP POST en tiempo real cuando ocurren eventos en InboundFlow — una llamada se completa, se reserva una cita, se crea un prospecto o se transfiere una llamada. Usa webhooks para sincronizar datos con tu CRM, enviar notificaciones de Slack, actualizar hojas de cálculo o activar cualquier flujo de trabajo personalizado.

Integraciones Soportadas

Zapier
Connect to 5,000+ apps
🔄
Make (Integromat)
Advanced workflow automation
🔧
n8n
Self-hosted automation
🌐
Webhook Personalizado
Cualquier URL que acepte HTTP POST

Configuración

1

Ve a tu panel de InboundFlow → Configuración → Integraciones

2

Haz clic en "Conectar" en Zapier, Make o Webhook Personalizado

3

Pega tu URL de webhook (debe ser HTTPS)

4

Selecciona qué eventos recibir

5

Haz clic en "Probar Webhook" para verificar

6

Guardar

Tipos de Eventos

EventoDisparadorDescripción
call.completedCada llamada completadaSe activa después de que termina una llamada con resumen, transcripción e info del llamante
call.transferredLlamada transferida a humanoSe activa cuando la IA transfiere una llamada a un destino configurado
appointment.bookedReserva de calendario realizadaSe activa cuando la IA reserva una cita de calendario durante una llamada
lead.createdNuevo prospecto capturadoSe activa cuando se crea un nuevo prospecto a partir de una llamada

Formato de Entrega

Todas las entregas de webhook son solicitudes HTTP POST con cuerpo JSON:

Cabeceras

Cabeceras HTTP
Content-Type: application/json
X-InboundFlow-Event: call.completed
X-InboundFlow-Delivery-Id: unique-uuid
X-InboundFlow-Timestamp: 1709064000
User-Agent: InboundFlow-Webhook/1.0

Si configuraste un secreto de firma:

Cabecera de Firma
X-InboundFlow-Signature: sha256=abc123...

Cargas de Eventos

call.completed

JSON
{
  "event": "call.completed",
  "timestamp": "2026-02-24T21:00:00.000Z",
  "organization_id": "uuid",
  "delivery_id": "unique-uuid",
  "data": {
    "call_id": "uuid",
    "caller_phone": "+1234567890",
    "caller_name": "Dave",
    "caller_email": "dave@example.com",
    "duration_seconds": 55,
    "summary": "Called about auto repair appointment. Customer wants to bring in a 2019 Honda Civic for brake inspection.",
    "intent": "book appointment",
    "urgency": "medium",
    "recording_url": "https://...",
    "started_at": "2026-02-24T20:59:00Z",
    "ended_at": "2026-02-24T21:00:00Z"
  }
}

call.transferred

JSON
{
  "event": "call.transferred",
  "timestamp": "2026-02-24T21:00:00.000Z",
  "organization_id": "uuid",
  "delivery_id": "unique-uuid",
  "data": {
    "call_id": "uuid",
    "caller_phone": "+1234567890",
    "caller_name": "Dave",
    "duration_seconds": 47,
    "summary": "Caller requested to speak with manager about pricing.",
    "transferred_to_label": "Manager",
    "transferred_to_number": "+18154264329",
    "urgency": "medium",
    "reason": "Wants to discuss pricing for full body repair"
  }
}

appointment.booked

JSON
{
  "event": "appointment.booked",
  "timestamp": "2026-02-24T21:00:00.000Z",
  "organization_id": "uuid",
  "delivery_id": "unique-uuid",
  "data": {
    "call_id": "uuid",
    "caller_phone": "+1234567890",
    "caller_name": "Sarah",
    "appointment_date": "2026-02-25",
    "appointment_time_start": "2026-02-25T11:00:00Z",
    "appointment_time_end": "2026-02-25T12:00:00Z",
    "service_type": "Auto Repair Appointment",
    "calendar_event_id": "google_event_id",
    "calendar_event_link": "https://calendar.google.com/..."
  }
}

lead.created

JSON
{
  "event": "lead.created",
  "timestamp": "2026-02-24T21:00:00.000Z",
  "organization_id": "uuid",
  "delivery_id": "unique-uuid",
  "data": {
    "call_id": "uuid",
    "caller_phone": "+1234567890",
    "caller_name": "Dave",
    "caller_email": "dave@example.com",
    "intent": "pricing inquiry",
    "urgency": "high",
    "interest": "auto body work",
    "call_summary": "Called about getting a quote for front bumper repair on a 2019 Honda Civic."
  }
}

Verificando Firmas de Webhooks

Si estableces un secreto de firma al configurar tu webhook, cada entrega incluye una firma HMAC-SHA256 para verificación:

verify-webhook.js
const crypto = require('crypto');

function verifyWebhook(body, timestamp, signature, secret) {
  const signatureInput = `${timestamp}.${JSON.stringify(body)}`;
  const expectedSignature = 'sha256=' + 
    crypto.createHmac('sha256', secret)
      .update(signatureInput)
      .digest('hex');
  
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expectedSignature)
  );
}

// In your webhook handler:
const isValid = verifyWebhook(
  req.body,
  req.headers['x-inboundflow-timestamp'],
  req.headers['x-inboundflow-signature'],
  'your_signing_secret'
);

Reintentos y Fiabilidad

  • Tiempo de espera: Los webhooks tienen un tiempo de entrega de 10 segundos. Responde con un estado 2xx rápidamente.
  • Seguimiento de fallos: Las entregas fallidas son rastreadas. Después de 10 fallos consecutivos, el webhook se deshabilita automáticamente.
  • Reactivar: Si tu webhook está auto-deshabilitado, ve a Configuración → Integraciones para reconectar.
  • Idempotencia: Usa el campo delivery_id para deduplicar eventos si tu manejador es llamado dos veces.

Mejores Prácticas

Responder rápido
Devolver 200 inmediatamente, luego procesar de forma asíncrona
🔒
Usar HTTPS
Las URLs de webhook deben usar HTTPS
Verificar firmas
Si manejas datos sensibles, activa los secretos de firma
🔁
Manejar duplicados
Usa delivery_id para idempotencia
📊
Monitorear fallos
Verifica el estado de tu integración en el panel para problemas de entrega