Back to Guides
Webhooks & Automation8 min

Triggers & Events

Understand every trigger type โ€” lead capture, workflow steps, AI tools, and manual tests. Learn how to configure when your webhooks fire and how to combine multiple triggers safely.

What you'll learn

  • Lead capture trigger
  • Workflow trigger
  • AI tool trigger
  • Manual test trigger
  • Combining triggers
1

Lead capture trigger

The lead capture trigger is the most common way webhooks fire in Chattlebot. When a visitor submits their information through the chatbot โ€” their email, name, phone number, or any other captured data โ€” all webhooks with the Lead Capture trigger enabled will fire automatically. This happens concurrently, not sequentially, so if you have three webhooks listening for lead captures (say, one to Zapier, one to your CRM, and one to Slack), all three fire at the same time. Configuration is simple: toggle the 'Trigger on Lead Capture' switch to enabled. Optionally, set an urgency filter to only fire for specific urgency levels โ€” Low, Medium, or High. For example, you might only want to notify your Slack channel about high-urgency leads while still sending all leads to your CRM. The urgency level is determined by Chattlebot's AI analysis of the conversation.

Lead Capture Trigger

Most common

Visitor submits info

Email, name, phone...

All matching webhooks fire

Concurrently, not sequentially

Data sent to your endpoints

Full payload with lead data

Configuration options:

Enable toggleOn
Urgency filterLow / Medium / High
Lead capture trigger settings with urgency filter
2

Workflow trigger

The workflow trigger fires a webhook as a step in an automation workflow. Instead of firing automatically on events, the webhook is called explicitly at a specific point in your workflow using the action format 'execute_webhook:{webhookId}'. This gives you precise control over when the webhook runs and what data it receives. When used in a workflow, all workflow variables are available in the webhook payload template โ€” not just lead data, but any data collected or computed in earlier workflow steps. After the webhook executes, response data is extracted and made available to subsequent workflow steps with a webhook_' prefix. For example, if your webhook returns a JSON response with a 'status' field, the next workflow step can access it as 'webhook_status'. This makes workflows powerful for multi-step automations: capture a lead, enrich the data via webhook, then route based on the enriched result.

Workflow Trigger

Example workflow:

1Lead captured
2Check urgency โ†’ High?
3execute_webhook:wh_abc123
4Send Slack notification

Data flow:

Workflow variables available in payload
Response data extracted with webhook_ prefix
3

AI tool trigger

The AI tool trigger fires when the AI chatbot decides it needs real-time data during a conversation. This is fundamentally different from other triggers โ€” instead of you defining when the webhook runs, the AI decides based on what the user is asking. To enable this, set 'ai_callable' to true on the webhook and configure a tool name, description, and parameters. When a chat starts, the AI loads all available AI-callable webhooks as tools in its toolbox. When a user asks a question that requires real-time information โ€” like product availability, appointment slots, or order status โ€” the AI evaluates its available tools, picks the right one, collects the required parameters from the conversation, and fires the webhook. The response data flows back to the AI, which uses it to answer the user in natural language. For the full configuration guide, including how to write effective AI descriptions, define parameters, and set up response filtering, see the AI-Callable Webhooks guide.

AI Tool Trigger

Advanced

User asks: "Do you have the blue sneakers in size 10?"

AI evaluates: needs real-time data โ†’ picks check_inventory tool

Webhook fires with product_name and size parameters

Response: { "available": true, "price": "$89.99" }

AI answers: "Yes! The blue sneakers in size 10 are $89.99"

Requires: ai_callable = true

4

Manual test trigger

The manual test trigger is for setup and debugging โ€” it lets you fire a webhook on demand to verify everything works before going live. Click the 'Send Test Webhook' button in the webhook editor to send a test request. Chattlebot generates sample data that mirrors a real lead capture: a test email address, sample name, demo phone number, default urgency and sentiment values, a mock conversation transcript, and current timestamps. The test result shows you the HTTP status code, response body, and execution time. In the execution history, test fires are logged with 'triggered_by: test' so you can easily distinguish them from real triggers. Use manual tests whenever you change the webhook URL, modify the payload template, update authentication credentials, or want to verify the receiving endpoint is working correctly.

Manual test webhook button
5

Combining triggers

A single webhook can have multiple triggers enabled simultaneously. The most common combination is Lead Capture + AI-Callable โ€” the same webhook fires both when a lead is captured and when the AI needs data during a chat. However, combining triggers requires careful consideration. When a webhook has both lead capture and AI-callable triggers enabled, your endpoint may receive the same lead's data multiple times: once from the lead capture event and potentially again from an AI tool call during the same conversation. To handle this safely, design your endpoints to be idempotent โ€” meaning processing the same data twice produces the same result. Use upsert logic (update if exists, create if new) rather than blind inserts. For example, if your CRM endpoint uses the lead's email as a unique key and upserts the contact record, duplicate calls won't create duplicate contacts. Another approach is to check the 'triggered_by' field in the payload to distinguish between trigger types and handle each appropriately.

Combining Triggers

Lead Capture + AI-Callable

Fires on new leads AND when AI needs data

Lead Capture only

Fires only when a visitor submits info

Workflow step only

Fires only as part of an automation

Watch for duplicates

When using multiple triggers, your endpoint may receive the same lead data more than once. Use idempotent endpoints or upsert logic to handle this safely.

Urgency filter with multiple levels selected
Webhook card showing On Lead badge

๐Ÿ’กPro Tip

  • If you only need the webhook for one specific trigger type, disable the others. This keeps your execution history clean and avoids unexpected duplicate calls to your endpoints.

Related Guides

Ready to get started?

Create your free account and start building your chatbot today.

Start Free Trial