EN
See the demo

AI agents and integrations

How to connect AI agents and other tools to a CRM safely

An AI agent or an outside service is safe in a CRM when it has its own identity, the smallest permissions that do the job and a log that a person reads. This guide gives a six-step method and a table that matches each job to a channel, then a section for each question on the way.

Short answer

To connect an AI agent or another system to a CRM safely, give the connection its own identity, start with read permissions, preview every change before it is written, read the call log weekly and set an end date for the access. Choose the channel by the job: MCP for chat assistants, webhooks and rules for services.

  • Steps: six
  • First permissions: read only
  • Every change: previewed before it is written
On this page
  1. Short answer
  2. Why a separate door
  3. The 6-step method
  4. Which channel to use
  5. Connect Claude with MCP
  6. Safe AI access
  7. What MCP is
  8. CRM automation examples
  9. Webhooks
  10. Custom integration rules
  11. Accounting sync
  12. Zapier, Make and n8n
  13. Roles for cost and margin
  14. Set up with an assistant
  15. A starting setup
  16. Common mistakes
  17. Checklist
  18. FAQ

Why an agent or a service needs its own door into a CRM#

An AI agent or an outside service touches CRM data safely only through a door built for it. A shared administrator login hides who did what, grants every permission at once and cannot be taken back without changing the password for everyone. A dedicated door gives each connection a name, a role, a log and an end date.

The CRM holds client contacts, prices, cost and payment status, so a mistake from a connection reaches real money. The method below fits any CRM and any tool. The sections after it show what each connection looks like in practice, from a chat assistant to an accounting sync.

AI agent
An AI agent is a program driven by a language model that calls the tools of another system to read data or make changes for a person.
MCP
MCP is the Model Context Protocol, a standard that lets an AI client such as Claude call the tools of another system through one address.
Webhook
A webhook is an HTTP call that a system sends to your address when an event happens, for example when a deal is won.
API key
An API key is a secret that identifies a program in the API of a system and carries a role, permissions and an expiry date.
Dry run
A dry run is a trial of a change or a rule that shows what would happen and writes nothing.

The 6-step method for connecting an agent or a service safely#

Connecting an AI agent or another system to a CRM safely takes six steps in a fixed order: define the job, give the connection its own identity, start with read access, preview every change, read the log and set an end date. The same steps apply to a chat assistant, a webhook receiver and an accounting sync.

  1. Define one job for the connection

    Write the job in one sentence that names the records it touches, such as “read the overdue invoices every Monday” or “send won deals to the billing system”. The sentence decides the channel and the permissions.

    A connection without a written job collects permissions it never uses.

  2. Give the connection its own identity

    Use a personal sign-in for a person who works with an assistant, and a named key for a program that runs alone. Never paste the password or the key of a colleague.

    The CRM can then show the connection by name in its log and revoke it without touching anyone else.

  3. Grant read access first

    Start with permissions to read, run the first tests and add permissions to change records one family at a time. Keep deletions and merges with people.

    A tool that cannot delete or merge records leaves the history of a client intact when it makes a mistake.

  4. Preview every change before it is written

    Use a dry run or a test delivery for the first calls of every new connection. Read what the preview says would be created or sent, compare it with the record on the screen and only then allow the real call.

    Add an idempotency key to writes, so a retry returns the first result and creates no second record.

  5. Read the log on a schedule

    Open the call log, the delivery log or the run log once a week during the first month. Look for rejected calls, repeated failures and calls at unusual hours.

    A log that nobody reads protects nothing.

  6. Set an end date and a way to revoke

    Give a key an expiry, rotate secrets after a person leaves and revoke a connection when its job ends. Write the revocation step next to the job from step 1, so the owner knows where to click.

Which channel fits which job#

The right channel depends on who starts the exchange and which way the data moves. A person who asks questions in a chat uses MCP, a program that reacts to events uses webhooks or rules, and a person who describes a setup in words uses an in-product assistant. The table matches each job to a channel and a guide.

Which channel fits which job
JobChannelDirectionGuide
Ask Claude about deals, debtors or reports from a chatMCP connection with a personal sign-inPerson to CRMConnect Claude with MCP
Run an agent with nobody at the screenMCP address with a company API keyAgent to CRMSafe AI access to CRM data
Create a task or send a message when something happensAutomation rule with a trigger and actionsInside the CRMCRM automation examples
Push CRM events to your own systemOutbound webhookCRM to your systemCRM webhooks
Receive events from a service that has no connectorCustom integration rule with its own addressService to CRMCustom integration rules
Keep invoices and payments in step with accountingSync queue and journal for an accounting system (QuickBooks not yet checked on a live account)PlannedSync with QuickBooks Online
Connect Zapier, Make or n8nWebhooks and the APIBoth waysZapier, Make and n8n
Set up the CRM by describing the businessAssistant with a confirmation stepPerson to CRMSet up a CRM with an assistant

How to connect Claude to your CRM with MCP#

Krokul CRM is a B2B CRM for contract-based companies: deals, projects and profit per client in one system, implemented by integration partners. Its MCP server answers at https://app.krokul.com/mcp, and Claude connects to that address as a custom connector.

The person signs in with a Krokul account, chooses one company and ticks permissions on a consent screen. The permissions come in two groups, one for reading and one for creating and changing records, and Krokul checks the ticked permissions together with the live role of that person on every call. The full procedure is in the guide on connecting Claude to a CRM with MCP.

The tool list is built from the same specification as the Krokul API, so a tool never does what the API forbids. Tools that create or change records accept a dry run, and the Krokul page for the Claude integration describes the sign-in route.

Debtors screen: four ageing tiles and a table of clients with debt amount, days overdue and payment promise
The Debtors screen in a Krokul demo workspace shows the list that Claude reads through the tool client_company_read_debtors.

How to keep AI access to CRM data safe#

AI access to CRM data stays safe when four limits apply on every call: the permissions of the connection, the role of the person, a ban on destructive tools and a log. Krokul applies these limits on the server, so the same rules hold for a person in the interface, an API key and an AI client.

  • Permissions come as families for reading and for writing, and a connection carries only the families it was given.
  • A personal connection follows the live role of its owner, so lowering the role narrows the connection with the next call.
  • Tools that remove, delete, cancel, merge, archive or refund are never offered to a personal connection, and for a company API key an administrator decides this with one switch at creation that cannot be changed later.
  • Meeting transcripts and the management of API keys are never offered to a key or a connection.
  • Each call lands in the API call log with its route, status, outcome, duration and the address it came from.

The guide on safe AI access to CRM data shows how to choose permissions and a role for each kind of agent, and how to read the log.

What MCP is and what it changes for CRM data#

MCP gives an AI client one standard way to ask a system what it can do and to call those tools, so a CRM needs no separate plug-in for each assistant. In Krokul the names come from the API routes, and card_read_list is the tool for the route card/api-readList.

For CRM data this changes two things. An assistant answers from live records, and the owner of the CRM controls the answer through the same permissions as any other connection. The guide on what MCP changes for CRM data explains the protocol for readers who are new to it.

Which CRM automations save hours#

A CRM automation is a rule with a trigger and actions, and the most useful rules react to time passing or to money. Krokul triggers include a deal without activity for a set number of days, an overdue payment, a payment received, a client who has not bought for a set number of months, a date field that is reached and a document that is signed. Actions include creating a task, changing the manager, moving a deal to another stage, adding tags, emailing or texting the client, calling a webhook and calling a service connected by a rule.

Every new company starts with four active rules, and each one creates a task:

  • A deal without activity for 7 days creates a task for the manager to agree the next step.
  • A payment overdue by one day creates a task to remind the client.
  • A contract that expires in 14 days creates a task to agree the renewal.
  • A client who has not bought for 3 months creates a task to get in touch.

A fifth rule, which closes a deal as lost after five unanswered calls, is created switched off, because closing a deal without a person is a decision for the company. Each run is recorded in a run log. Automations come with the Money plan, and the guide on CRM automation examples lists more triggers and actions.

How to sync CRM events with your own system using webhooks#

A webhook syncs CRM events with your own system when the CRM calls your address at the moment an event happens, so your system never has to poll the CRM. Krokul sends eleven events, among them a deal created, a deal moved to another stage, a deal won or lost, a contact created, a task created, an invoice paid and a payment received. A subscription can be limited to one pipeline or one stage.

Every delivery can carry a signature, an HMAC-SHA256 of the timestamp and the body made with the secret of the subscription, and a delivery ID for deduplication. Check the signature before you trust the body. Krokul rejects receiver addresses in private networks, and a receiver that answers 410 Gone switches the subscription off at once.

A failed delivery is retried automatically up to eight times with pauses that grow from one minute to six hours. Once the attempts run out it gets the status failed in the delivery log and can be resent with the same delivery ID, so a receiver that deduplicates processes it once. A test delivery with a synthetic body checks the receiver before real events arrive.

The body of an event has the fields event, data, entity, companyUuid and sentAt and carries no ready-made message text. A chat tool that expects text needs one step in between. The guide on CRM webhooks walks through the setup.

How to connect a service the CRM has no connector for#

A custom integration rule connects a CRM to your own service without code: the service posts an event to an address, and the rule says how to find the record and what to create. In Krokul each rule gets its own address of the form /ingress/rule/ followed by a token, and the rule can require an HMAC-SHA256 signature.

Every edit saves a new version and keeps the old one. A version can be switched on only after a dry run on up to 20 sample events, which shows which records the rule would find and what it would create, and writes nothing. When a search matches two records, the rule stops with a message and does not guess. To roll back, switch on the previous version.

Rules can also send events out to a service, with a test send that runs only on request. Custom rules belong to the Margin plan, and every event that reaches a rule leaves a line in its run log. The guide on connecting a CRM to a custom service without code describes the screen.

How to sync CRM invoices with an accounting system#

Syncing CRM invoices with an accounting system starts with a mapping. A client in the CRM matches a customer in the accounting system, an invoice matches an invoice and a payment matches a payment, and each pair is stored as an external ID next to the record. Without those IDs a second run creates duplicates.

Krokul keeps external IDs for deals, contacts, clients, products, documents, payments, tasks and activities. For syncing with an accounting system Krokul has a queue of intended changes and a journal, and a failed item stays in the journal until someone retries it. The QuickBooks connection is not yet checked on a live account, so treat it as planned. The guide on syncing CRM invoices with QuickBooks Online applies the mapping to QuickBooks Online.

Tip. Send a few invoices first and compare the totals in both systems before the sync covers everything.

How to connect a CRM to Zapier, Make or n8n#

A CRM connects to Zapier, Make or n8n through a webhook in one direction and the API in the other. A Krokul webhook sends events to the catch-hook address of a scenario, and the HTTP module of the platform calls the Krokul API with a key.

Give the platform its own API key with a role that fits the scenario, and the key prefix identifies its calls in the call log. The API answers 429 with a Retry-After header when a scenario sends too fast, so add a pause to bulk scenarios. The guide on connecting a CRM to Zapier, Make or n8n shows the steps.

How to set CRM roles so cost and margin stay private#

Cost and margin stay private when the CRM hides them on the server for every role without the right to see them, whatever the channel. In Krokul administrators and managers can see cost, and the other roles do not receive those fields in the interface, in reports or in the API.

An AI client inherits the role of the person who connected it, and a company API key has the role chosen at creation. The default role of a new key is manager, which can see cost, so choose a role without that right for outside services. Administrators and managers can read the audit log of who changed what and when. The guide on CRM roles that hide cost explains the setup.

How to set up a CRM by describing your business to an AI assistant#

An in-product assistant sets up a CRM safely when it proposes a plan, waits for a confirmation and can undo what it created. Kro, the Krokul assistant, asks about the business and proposes modules, a pipeline with stages, sources, loss reasons, custom fields, templates and first tasks. An administrator applies exactly the plan that was shown and can untick items first.

A single action that the assistant proposes in a chat, such as creating a task, runs only after a confirmation and under the rights of the person, and the same proposal cannot run twice. An administrator can revert an applied plan, which undoes what the plan created. The guide on setting up a CRM with an AI assistant follows a full session.

What a safe starting setup looks like#

A safe starting setup gives each connection a different identity, the smallest permissions and a planned end. The table shows three connections of one company with invented values.

Example: three connections and their limits
ConnectionIdentityPermissionsEnds
Claude for the head of salesPersonal sign-inRead only for two weeks, then task creationRevoked in My profile when the pilot ends
Billing service that calls the APICompany key created for the serviceA role without cost, destructive tools offExpires after 90 days
Webhook to the finance systemSubscription with a secretEvents invoice.paid and payment.received onlySwitched off when the system is replaced

Each row answers the questions of the method: who the connection is, what it may touch and when it ends.

Which mistakes to avoid when connecting agents and services#

  • Sharing one administrator login with a tool hides who acted, so create a named key or a personal connection for every tool.
  • Keeping the default role of a key without a check can expose cost and margin, so choose the role that fits the job.
  • Switching on a rule or an integration without a trial run lets the first real event reveal a mapping error, so run the sample events first.
  • Trusting a webhook body without checking the signature lets anyone who learns the address post fake events, so verify the HMAC on every delivery.
  • Leaving a connection after a one-off job keeps access open with no owner, so revoke it the day the job ends.

A checklist before you switch a connection on#

  • The job of the connection is written in one sentence.
  • The connection has its own sign-in or its own key, and the name is clear in the log.
  • The first permissions are read only, and the role of a key is the least that does the job.
  • The first changes were previewed with a dry run or a test delivery.
  • Someone has a weekly slot to read the log during the first month.
  • The expiry or the revocation step is written down.

Frequently asked questions#

Can an AI agent delete records in a CRM?

It can only when the CRM offers destructive tools to it. In Krokul a personal MCP connection never receives tools that remove, delete, cancel, merge, archive or refund, and an administrator decides this for a company key with one switch at creation.

Is it safe to give an AI assistant my CRM password?

No, sign in through the consent screen of the connector instead. The assistant then receives a limited token and never sees the password.

How do I stop an AI connection quickly?

Revoke it, and the access ends at once. In Krokul a person revokes a personal connection in My profile under Connected apps, and an administrator revokes any connection or API key in the Marketplace.

How can I tell what an agent did in my CRM?

Read the API call log, which lists every call with its route, status and outcome, and the audit log for changes to records. Check both weekly during the first month.

Do I need a developer to connect a CRM to other tools?

A chat assistant connects without code, and a service that can post JSON to an address connects with a custom rule. A developer helps when you need your own application or signature checks, and an existing business with data to move can ask an integration partner for the setup.

Krokul Team

The people who build Krokul CRM

We write about getting paid, billing delivered work and project margin, and check every product statement against Krokul itself.

First published

Guides in this topic

AI agents and integrations

Safe AI access to CRM data: scopes, roles and an audit log

AI access to CRM data is safe when the agent has its own identity, the narrowest scopes that do the job, a role that limits what those scopes reach, no destructive tools and a call log that a person reads.

AI agents and integrations

API keys and the public API: what to automate first

Automate with a CRM API in this order: a read-only key that exports deals or payments to a spreadsheet or BI tool, then writes that create records from your own forms, then payments from accounting.

AI agents and integrations

How to build an automation rule in Krokul step by step

To build an automation rule in a CRM, pick one routine job, choose the event that starts it, narrow the event with conditions, add the actions in order, set working hours if people are the audience and read the log after the first runs.

AI agents and integrations

How to connect Claude to your CRM with MCP

To connect Claude to a CRM with MCP, add the CRM's MCP server address to Claude as a custom connector, sign in to the CRM, choose the company and approve only the permissions Claude needs.

AI agents and integrations

How to bring WooCommerce or Shopify orders into the CRM

To bring WooCommerce or Shopify orders into Krokul, connect the store card in the Marketplace, copy the address Krokul gives you into the shop webhook settings, add the signing secret and pick a pipeline.

See the demo