CRMBitrix24

Bitrix24 with your AI agent, step by step

Common Bitrix24 CLI tasks step by step: the first sync, keeping the copy fresh, safe agent writes.

Each scenario is a common task in order: the commands to run, why each one runs and what to look at in the answer. The same scenarios are in the terminal: b24 guide lists them, and b24 guide first-sync prints one.

Commands that use an account start with your profile, the name you gave the account at login, such as b24 personal ….

First sync and the pipeline board

Copy your deals and leads into the local store and see where each one stands.

  1. b24 work session start

    paste the portal's incoming webhook address. b24 checks it against the portal and keeps it in the keyring

  2. b24 work session status --check

    the employee the webhook acts as, and whether they are a Bitrix24 administrator

  3. b24 work users list

    your own user id and the ids of your colleagues

  4. b24 work config set crm.bitrix24:example.bitrix24.ru.unassigned 3327,4410

    optional. To copy a colleague's deals too, list their id and your own, with your portal's host in place of example.bitrix24.ru. Without this, a sync copies your own deals and leads

  5. b24 work sync

    copies the deals and leads, with their clients. The next sync takes only the changes

  6. b24 work pipelines show Sales

    the pipeline as a board, how many deals stand in each stage and how many reached it

  7. b24 work deals list status:open

    the open deals with stage, amount and owner, from the store, offline too

What to look at:

  • scope in the sync answer, which says whose deals and leads it copied
  • issues in the sync answer, such as a user it could not take or a scope the webhook lacks
  • the stage where most deals wait

work is the profile, the name you gave your portal's sign-in. example.bitrix24.ru stands for your portal's host, and 3327,4410 for your colleague's id and your own. The list replaces your own user, so a list without your id leaves your deals out.

In the terminal: b24 guide first-sync

Keep the copy up to date

Have the local store follow the portal on its own, and search it beside your other WireCat tools.

  1. b24 work schedule command crm --every 1h -- sync

    a timer on this computer that runs sync every hour. Each run reads only what changed

  2. b24 work schedule list

    the schedule, when it runs next and how its last run went

  3. b24 work store status

    how far each kind's sync is, how many records are stored and when it last ran

  4. b24 work search all kitchen

    stored deals and leads beside your messages, notes and meetings from other WireCat tools

What to look at:

  • a schedule whose last run failed
  • a kind in store status that is partial, which the next sync goes on with

In the terminal: b24 guide keep-in-sync

Let an agent change the CRM without surprises

Give an agent your CRM over MCP while the writes that reach clients or cannot be undone stay yours.

  1. b24 work config set permissions.deals.move readonly

    a stage change can start the portal's robots, which write to clients. Over MCP nobody answers ask, so only readonly stops the move

  2. b24 work config set permissions.deals.delete deny

    no agent deletes a deal, whatever it is asked

  3. b24 work mcp add claude-code --permission leads.delete=deny --allow-writes

    adds this profile to Claude Code. This server also refuses lead deletes, and --allow-writes says you accept the writes it still offers

  4. b24 work config show

    each permission with its level and where it came from

  5. b24 work runs list

    what the agent ran, refused writes too

What to look at:

  • the levels of deals.move, deals.delete and leads.delete in config show
  • refused runs in runs list, and which command asked

At a terminal ask still asks before the write. Over MCP nobody is there to answer, so a write at ask goes ahead. Set readonly or deny, or turn on approval of b24_write in the agent client.

In the terminal: b24 guide safe-agent-writes