Zapier Integration
The Zapier integration is an organization-level webhook — set it up once and it fires for events across all agents in your workspace. Unlike AI Actions (which trigger mid-conversation), Zapier fires on system-level events like a lead being captured or a conversation ending.
Connecting Zapier
Create a Catch Hook Zap in Zapier
Open Integrations in AIChatVault
Paste the webhook URL
Select events to subscribe to
Save
Build your Zap action
Test and publish
Available events
| Event | When it fires |
|---|---|
| lead_captured | A visitor submits their contact details via lead capture |
| conversation_started | A new conversation session begins |
| conversation_ended | A conversation session closes (visitor leaves or session expires) |
| message_received | A customer sends a message in the conversation (does not fire for the AI's own replies) |
Event payload structures
lead_captured
{
"event": "lead_captured",
"timestamp": "2024-01-15T10:30:00Z",
"organization_id": 42,
"data": {
"id": 1001,
"dedupe_id": "lead_abc123",
"name": "Jane Smith",
"email": "jane@example.com",
"phone": "+1 555 000 1234",
"company": "Acme Corp",
"message": "I'm interested in the enterprise plan",
"custom_fields": {},
"source": "widget",
"source_url": "https://yoursite.com/pricing",
"agent": {
"id": 7,
"name": "Sales Assistant",
"slug": "sales-assistant"
},
"created_at": "2024-01-15T10:30:00Z"
}
}conversation_started
{
"event": "conversation_started",
"timestamp": "2024-01-15T10:28:00Z",
"organization_id": 42,
"data": {
"id": 5001,
"dedupe_id": "conv_xyz789",
"session_id": "sess_aabbcc",
"status": "active",
"source": "widget",
"source_url": "https://yoursite.com/",
"agent": {
"id": 7,
"name": "Sales Assistant",
"slug": "sales-assistant"
},
"visitor": {
"name": "Jane Smith",
"email": "jane@example.com",
"phone": null,
"ip": "203.0.113.45",
"country": "AU"
},
"started_at": "2024-01-15T10:28:00Z",
"created_at": "2024-01-15T10:28:00Z"
}
}conversation_ended
{
"event": "conversation_ended",
"timestamp": "2024-01-15T10:45:00Z",
"organization_id": 42,
"data": {
"id": 5001,
"dedupe_id": "conv_xyz789",
"session_id": "sess_aabbcc",
"status": "ended",
"source": "widget",
"source_url": "https://yoursite.com/",
"agent": { "id": 7, "name": "Sales Assistant", "slug": "sales-assistant" },
"visitor": { "name": "Jane Smith", "email": "jane@example.com", "phone": null, "ip": "203.0.113.45", "country": "AU" },
"message_count": 12,
"duration_seconds": 1020,
"started_at": "2024-01-15T10:28:00Z",
"ended_at": "2024-01-15T10:45:00Z",
"created_at": "2024-01-15T10:28:00Z"
}
}message_received
{
"event": "message_received",
"timestamp": "2024-01-15T10:31:00Z",
"organization_id": 42,
"data": {
"id": 80001,
"conversation_id": 5001,
"role": "user",
"content": "What are your pricing plans?",
"conversation": {
"id": 5001,
"session_id": "sess_aabbcc",
"status": "active",
"source": "widget"
},
"agent": { "id": 7, "name": "Sales Assistant", "slug": "sales-assistant" },
"created_at": "2024-01-15T10:31:00Z"
}
}Reliability and retry behavior
- •Requests are sent over IPv4 only.
- •Timeout: 10 seconds per attempt.
- •Retry: 3 automatic retries on failure with a short delay between each.
- •If all retries fail, the event is counted as a failed trigger.
Integration stats
Your Zapier integration card shows live statistics:
| Stat | Description |
|---|---|
| Total triggers | Total number of webhook calls attempted |
| Failed triggers | Number of calls that failed after all retries |
| Last triggered at | Timestamp of the most recent successful or attempted call |
message_received event sparingly — it fires on every single message and can generate a high volume of Zap runs. For most use cases, lead_captured or conversation_ended are more efficient.agent object so you can filter by agent in your Zap.Was this page helpful?
