Clawdbot Webhooks - External Integration Triggers
Clawdbot Webhooks - External Integration Triggers
The real power of an AI assistant emerges when it connects to the systems you already use. Most AI tools exist in isolation, waiting for you to manually bring information to them. But the events that matter in your work happen across dozens of platforms: emails arrive, forms get submitted, monitoring alerts fire, calendar invites appear. Without integration points, your AI assistant remains cut off from the digital environment where work actually happens.
Through building production AI systems, I have learned that connectivity determines utility. An AI that can respond to external triggers becomes part of your workflow rather than a separate destination. Clawdbot’s webhook system provides exactly this capability, letting any external service wake your AI assistant with contextual information.
Why Webhooks Transform AI Assistants
Traditional AI interactions follow a predictable pattern. You open a chat, provide context, ask a question, receive a response. This works fine for deliberate queries but misses the reactive opportunities where AI assistance would be most valuable.
Consider what happens when an important email arrives. Without webhooks, you discover the email during your next inbox check, then separately decide whether to involve your AI assistant. With webhooks, the email arrival immediately triggers your AI, which can analyze the message, prepare relevant context, and either respond autonomously or surface insights proactively.
This shift from pull to push fundamentally changes how AI assists your work. Instead of you bringing events to the AI, events bring themselves. The assistant becomes aware of what happens in your digital world as it happens.
Webhooks act as the nervous system connecting external events to AI intelligence. Every service that can send an HTTP request becomes a potential trigger for proactive AI automation.
Enabling the Webhook Gateway
Getting webhooks working requires two configuration settings. First, enable the hooks system by setting hooks.enabled to true in your Clawdbot configuration. Second, define a hooks.token that will authenticate incoming requests.
The token serves as your security boundary. Any request to your webhook endpoint must include this token, preventing random internet traffic from triggering your AI. Treat this token like a password since anyone with it can wake your assistant with arbitrary messages.
Once enabled, Clawdbot exposes the /hooks/wake endpoint ready to receive POST requests from any external system. The gateway handles incoming connections, validates authentication, and routes the trigger to your AI session.
This architecture means your assistant can receive events from services that support outgoing webhooks, which includes most modern platforms. Email services, form builders, monitoring tools, calendars, CRM systems, payment processors, and countless other services can send webhook notifications.
Authentication Options
External services authenticate webhook requests in different ways, so Clawdbot supports multiple authentication methods. You can include your token as a Bearer token in the Authorization header, which follows standard OAuth patterns that many services use natively.
Alternatively, use the x-clawdbot-token header to pass your token directly. This custom header works well when configuring webhooks in systems that give you control over request headers but may not support standard Bearer authentication.
Both methods provide equivalent security. Choose whichever your triggering service supports more easily. The important thing is that every request includes valid authentication, ensuring only authorized sources can wake your AI assistant.
For services that cannot customize headers at all, you may need an intermediary like Zapier or Make to receive the original webhook and forward it to Clawdbot with proper authentication added.
The Wake Endpoint
All webhook triggers hit the same endpoint: POST /hooks/wake. This endpoint accepts a JSON body with two key fields that determine how your AI processes the incoming event.
The text field contains the message your AI will receive. This is where you include all the contextual information about the triggering event. What happened, when it happened, who was involved, any relevant data. Think of this as the prompt your AI will process.
The mode field controls timing. Set it to “now” for immediate processing where Clawdbot wakes up right away and handles the event. Set it to “next-heartbeat” if the event can wait until your AI’s next scheduled heartbeat cycle. Immediate mode suits urgent triggers like important emails or alerts. Heartbeat mode works for lower priority notifications you want batched together.
This two mode system lets you balance responsiveness against efficiency. Not every webhook needs instant attention. Batching non-urgent events into heartbeat cycles keeps your AI focused on what matters most while still processing everything eventually.
Preset Mappings for Common Services
Configuring webhooks manually for every service would be tedious. Clawdbot includes preset mappings for common integrations that simplify the most frequent use cases.
Gmail integration demonstrates this well. Instead of manually parsing email headers and formatting message bodies, the Gmail preset extracts sender, subject, timestamp, and content automatically. You configure the preset once, and every incoming email webhook arrives at your AI in a consistent, useful format.
These presets handle the translation layer between how external services format their webhook payloads and how your AI expects to receive information. The raw JSON from Gmail looks nothing like a natural language description of an email, but the preset transforms it into something your AI agent can understand and act upon.
Additional presets cover other common services, each handling the specific payload structure that service sends. Check the documentation for available presets and how to configure them for your accounts.
Message Templates with Mustache Syntax
When presets do not cover your use case or you want custom formatting, Clawdbot’s message templates provide full control over how webhook payloads become AI prompts. Templates use Mustache syntax, a simple templating language that inserts values from the incoming JSON into your message text.
Imagine a webhook from a form submission service. The raw payload contains fields like name, email, and message in a JSON structure. Your template might read: “New contact form submission from name with email address email. Their message: message” with each field name wrapped in double curly braces.
When the webhook arrives, Clawdbot replaces each template variable with the actual value from the payload. Your AI receives a natural language description of the form submission rather than raw JSON it would need to parse.
This templating capability means any webhook source can integrate with your AI. You write the template once, describing how to interpret that service’s payload format. Every subsequent webhook from that source arrives formatted exactly how you specified.
Templates support nested fields, conditionals, and loops for complex payloads. A monitoring alert might include arrays of affected services or nested objects with metric details. Mustache handles these structures, letting you extract precisely the information your AI needs.
Wiring External Systems Together
The webhook system turns Clawdbot into a hub for intelligent automation across your entire toolchain. Any event that can trigger an outgoing HTTP request can wake your AI with relevant context.
Start by identifying the events that would benefit from AI awareness. Email arrival is obvious, but consider form submissions, payment notifications, deployment alerts, calendar reminders, social mentions, or sensor readings. Any event where contextual AI response adds value becomes a candidate for webhook integration.
Configure each source to send webhooks to your Clawdbot endpoint with appropriate authentication. Use presets where available, templates where needed. Test each integration to verify the AI receives well-formatted, actionable information.
Build up your integrations gradually. Each new webhook source expands what your AI knows about your digital environment. Over time, your assistant develops awareness of events across platforms, able to correlate information and respond intelligently to situations that span multiple services.
The professionals gaining the most from AI are those who build integrated systems rather than isolated tools. Webhooks provide the connectivity layer that makes true integration possible. Your AI assistant stops being a destination you visit and becomes an intelligent layer responding to events throughout your workflow.
This integration capability represents where AI assistance is heading. Not smarter chat interfaces, but intelligent systems woven into how work actually happens. Webhooks are the practical mechanism that makes this vision achievable today.