Blog

OpenClaw API Integrations: Connecting Your Agent to External Tools

How to connect OpenClaw agents to CRMs, databases, email services, and third-party APIs — with real examples and working patterns.

March 29, 2026 · 9 min read

An OpenClaw agent operating in isolation is useful. An OpenClaw agent connected to your CRM, email platform, database, and analytics stack is a different class of tool entirely.

The difference is integration. When your agent can read customer records, update deal stages, send emails, query your database, and trigger workflows in response to real events — it stops being a chat assistant and starts being an operations layer.

This guide covers how OpenClaw API integrations work, the most common connection patterns, and what to watch for when building custom integrations.

How OpenClaw API integrations work

OpenClaw integrates with external tools through two primary mechanisms: skills and direct API calls within agent logic.

Skills are modular extensions that add capabilities to your agent. The ClawHub marketplace has pre-built skills for common services. A skill packages the API credentials, connection logic, and tool definitions needed for a specific integration — you install it, configure it, and it becomes available to your agent.

Direct API calls happen when your agent uses tool-use capabilities to call external REST endpoints as part of its reasoning. You define the tool schema (what the API accepts and returns), and the agent decides when and how to call it based on context.

The key architectural point: OpenClaw agents are stateless between sessions but can maintain state through external systems. Your CRM is the persistent memory for customer context. Your database is the persistent memory for operational data. The agent reads and writes to these systems rather than trying to remember everything itself.

CRM integrations

CRM integration is the highest-value OpenClaw connection for most businesses. When your agent can read and write customer and deal data, it can handle tasks that would otherwise require a human to log in and update records manually.

HubSpot is the most common CRM integration for OpenClaw deployments. The HubSpot API is well-documented, has clear rate limits, and supports the full contact/company/deal object model. A working pattern:

  • Agent receives an inbound email or message
  • Agent queries HubSpot for the existing contact record
  • Agent reads deal stage and recent activity
  • Agent drafts contextual response based on CRM data
  • Agent logs the interaction back to the contact record

Salesforce integrations are more complex but follow the same pattern. The Salesforce REST API requires OAuth, has more complex object relationships, and enforces stricter governor limits — but the integration unlocks the same workflow: agent reads context, acts, writes back.

For smaller operations, Pipedrive and Attio both have cleaner APIs with less overhead. If you're not locked into Salesforce or HubSpot, these are easier OpenClaw integration targets.

Email service connections

Email integration unlocks two distinct capabilities: reading and triage (processing what comes in) and sending (acting on outbound).

Gmail via Google OAuth is the most-deployed OpenClaw email connection. The agent authenticates with Gmail API scopes for reading and labeling mail, then processes the inbox according to rules defined in its SOUL.md or HEARTBEAT.md. Typical implementation: agent runs on a schedule, reads new mail, labels and prioritizes by rules, drafts replies for approval or sends directly based on message category.

Outlook/Microsoft Graph follows a similar pattern but requires Microsoft Azure app registration. The Graph API for mail is verbose but complete — you can read, send, move, flag, and search mail through it.

For transactional email sending, SendGrid and Resend are the cleanest API targets. Your agent can send emails via these services without touching your primary email account — useful for notifications, confirmations, and automated outreach.

Database and storage

Connecting your agent to a database enables persistent context that survives session resets.

Supabase is the most common database integration in OpenClaw deployments because it provides both PostgreSQL (for structured data) and vector storage (for semantic search). An agent can store notes, customer interactions, and learned preferences in Supabase, then query them with natural language via the vector search API.

Airtable is a lower-friction option for teams that already use it for operations. The Airtable API lets your agent read and write records, trigger automations, and maintain operational data without needing to run a database server.

Google Sheets via Sheets API works for simpler use cases — tracking tasks, maintaining lists, logging events. Not recommended for high-volume operations (rate limits bite you quickly), but sufficient for small teams doing periodic reads and writes.

Webhook triggers

Webhooks flip the integration direction: instead of your agent polling for changes, external systems push events to your agent when something happens.

OpenClaw supports webhook reception through its gateway server. You configure an endpoint, expose it publicly, and register it with the triggering service.

Common webhook patterns:

  • New lead in CRM → agent receives webhook → drafts and sends welcome email
  • Support ticket opened in Zendesk → agent receives webhook → classifies ticket, drafts response, assigns priority
  • New Stripe payment → agent receives webhook → logs transaction, triggers onboarding sequence
  • GitHub PR opened → agent receives webhook → reviews diff, posts initial comment

The webhook pattern is more reliable than polling for real-time responsiveness. If your use case requires immediate action when an external event happens, webhooks are the right pattern.

Building a custom integration

When there's no pre-built skill for the service you need, you build a custom integration. The process:

1. Define the tool schema. Document what the API endpoint accepts (parameters, authentication) and what it returns (response shape). This becomes the tool definition your agent uses to understand when and how to call the API.

2. Store credentials securely. API keys belong in environment variables, not in SOUL.md or agent instructions. OpenClaw reads from the system environment, so secrets stay out of your agent configuration files.

3. Write a thin wrapper function. For complex APIs, write a small function that handles authentication, error handling, and response parsing. Your agent calls the wrapper, not the raw API. This keeps your agent instructions clean and makes debugging easier.

4. Test incrementally. Start with read-only operations before adding writes. Confirm the agent calls the right endpoints with the right parameters before it starts creating or updating records in production systems.

Common patterns and gotchas

Rate limits. Every external API has rate limits. Your agent, if left unconstrained, will hit them. Build rate limit handling into your integrations — track call counts, add delays between bulk operations, and handle 429 responses with exponential backoff.

Token expiry. OAuth tokens expire. Build token refresh logic into your integrations or use service accounts with non-expiring API keys where the service allows it. Silent token expiry is the most common cause of integrations that "worked yesterday but stopped today."

Schema drift. External APIs change. A field that exists today might be renamed or removed in a future API version. Pin to specific API versions where possible and monitor for deprecation notices.

Error handling. Your agent needs to know what to do when an API call fails. Define fallback behavior explicitly: if the CRM query fails, what does the agent say or do? Without explicit fallback instructions, agents will either produce inaccurate data or silently fail.

The businesses getting the most from OpenClaw API integrations aren't the ones with the most connections — they're the ones with the most reliable connections. Three well-configured integrations that work every time beat ten integrations that break unpredictably.

Want OpenClaw working with your existing tools? See MrDelegate's managed setup →