The CRM lies exactly as much as you are too lazy to maintain it: a call happened, but the card is empty, and a deal has been "in progress" for three months now. The skill logs activities and updates contacts from correspondence and the calendar on its own, flags stalled items, and changes nothing without your approval, so the CRM can be trusted without opening it.
Quick start
Pull context from the specified email or calendar event, find the right contact and deal in ~~crm, log the activity, and show what changed. To clean up a deal, reconcile it with recent correspondence/calendar and suggest edits — never apply them without approval.
Собственник: "занеси этот звонок к сделке Акме"
→ Прочитай последнее завершённое событие в ~~календарь
→ Подтверди, что участники бьются с контактами сделки Акме
→ Запиши активность-звонок к сделке Акме
→ Отчитайся: "Звонок занесён к сделке «Акме, расширение 2 кв.». [ссылка на сделку]"
Workflow
-
Determine the intent. Decide which of the three paths fits based on the message and the owner's context:
- Email path — "update the CRM", "add this to the deal", or any reference to correspondence
- Call path — "log this call", "log the meeting", or any reference to a calendar event
- Cleanup path — "clean up the CRM", "is this deal current", or any request to audit a specific deal If the intent is ambiguous (for example, "update the CRM" with no reference to an email/meeting/deal), ask which path before continuing.
-
Gather context.
- Email path: read the correspondence (subject, participants, last 1–3 messages) in
~~почта. Identify the main external contact. - Call path: read the event
~~календарь(title, participants, time, description). If no event is specified, take the last completed meeting within the past 24 hours and confirm with the owner before continuing. - Cleanup path: pull the deal (stage, amount in ₽, close date, next step, related contacts, activities over the last 60 days), plus correspondence over the last 14 days and calendar events with the deal's contacts.
- Email path: read the correspondence (subject, participants, last 1–3 messages) in
-
Find the contact and deal in the CRM. For the email/call paths:
- Search for contacts
~~crmby email/phone. If the contact does not exist, create it from the email signature or calendar invitation data — announce the creation in chat before writing. - Find the correct deal in this order: (a) an explicit match if the owner named it, (b) the contact's only open deal, (c) a fuzzy match against the contact's open deals versus the email subject or meeting title — confirm before writing, (d) ask the owner if there is no match. Never create a deal automatically.
- Field names, activity types, and linking rules — read reference/hubspot-fields.md (CRM field mapping — Bitrix24/amoCRM) before any write to the CRM.
- If deduplication or deal selection seems ambiguous, before continuing look at reference/gotchas.md — the most common mistakes are covered there.
- Search for contacts
-
Perform the action.
- Email path: log an email activity with the correspondence subject as the title and a brief summary (not the entire correspondence) as the body. Set the timestamp based on the last message. A worked example — reference/examples/log-email-happy-path.md.
- Call path: log a call activity with the event title, duration, and available notes. The timestamp is the event start. A worked example with a missing-contact scenario — reference/examples/log-call-happy-path.md.
- Cleanup path: go through each field according to reference/cleanup-checklist.md and compile a list of proposed changes. Show current → proposed side by side. Write only what the owner approved. Full worked example — reference/examples/cleanup-deal.md.
-
Approval gate — every externally visible write. To create a contact and log activity, announce before recording and show the result after. For cleanup edits, do not write anything until the owner approves the specific changes.
-
Report what happened. Tell the owner what was recorded and what is pending. Add a link to the affected deal in the CRM if possible. Briefly.
Approval gates
- Never delete records. Neither contacts, nor deals, nor activities. If the owner asks, say that the skill does not do this, and direct them to the CRM.
- Never change the deal stage or close a deal without the owner's explicit approval. Even if the evidence is strong. Flag and defer.
- Never create a new deal without a request. Ask if the correct deal cannot be determined.
- Announce contact creation before recording. One line — lets the owner catch a typo or duplicate.
- Side-by-side diff for cleanup. Show the current value and the proposed one; wait for approval on each item.
Reference
- reference/hubspot-fields.md — CRM field mapping (Bitrix24/amoCRM): activity types, field names, linking rules
- reference/cleanup-checklist.md — fields checked during deal cleanup, and evidence for flagging each
- reference/gotchas.md — "good / bad" patterns for contact selection, activity summaries, and cleanup suggestions
- reference/examples/log-email-happy-path.md — worked example: email to an existing deal
- reference/examples/log-call-happy-path.md — worked example: meeting for an existing deal, missing contact
- reference/examples/cleanup-deal.md — worked example: audit of a stalled deal