anysite-crm-setup
Connect and configure the user's CRM (HubSpot or Pipedrive) for safe AI-driven enrichment through anysite MCP crm_* tools. Runs a short discovery - reads the CRM schema including custom properties, agrees a deterministic field mapping with the user in 3-5 questions, and saves a local CRM profile that all future enrichment sessions follow. Use when the user wants to connect their CRM, set up CRM enrichment, configure field mapping, re-run CRM discovery after schema changes, or asks why CRM writes are skipped. Also defines the mandatory rules every agent must follow when writing to CRM with crm_upsert_contacts / crm_upsert_companies.
anysiteio · Static checks on file
Installation
Read the source and dependencies before running a command. Copying does not install or execute anything.
npx skills add anysiteio/agent-skills --skill anysite-crm-setupAbout this skill
name: anysite-crm-setup description: Connect and configure the user's CRM (HubSpot or Pipedrive) for safe AI-driven enrichment through anysite MCP crm_* tools. Runs a short discovery - reads the CRM schema including custom properties, agrees a deterministic field mapping with the user in 3-5 questions, and saves a local CRM profile that all future enrichment sessions follow. Use when the user wants to connect their CRM, set up CRM enrichment, configure field mapping, re-run CRM discovery after schema changes, or asks why CRM writes are skipped. Also defines the mandatory rules every agent must follow when writing to CRM with crm_upsert_contacts / crm_upsert_companies.
Anysite CRM Setup
Connect the user's CRM and produce a local CRM profile — a saved field mapping that makes every future enrichment write deterministic: the same data always lands in the same CRM properties.
When to use
- First-time setup: "connect my HubSpot", "connect my Pipedrive", "set up CRM enrichment"
- Re-discovery: CRM schema changed, mapping feels stale, or writes are being skipped unexpectedly
- Reference: the Writing rules section below applies to EVERY session that calls
crm_upsert_contacts/crm_upsert_companies, even outside setup
Prerequisites
The crm_* tools are visible only when the user has enabled CRM integration in their Anysite
dashboard (Profile → CRM Integration). If the tools are missing, ask the user to enable it there.
After they enable it, the tools do NOT appear instantly: the server flag takes up to a minute to
propagate, and the agent's tool list is cached per session — ask the user to reconnect the MCP
server (or start a new session), then retry. This is expected behavior, not an error.
Setup flow
1. Ensure a connection
Call crm_list_connections.
- If there is an active connection — proceed to step 2.
- If not, ask which CRM the user wants (HubSpot or Pipedrive) if not obvious, then call
crm_connect(provider="hubspot")orcrm_connect(provider="pipedrive"), give the user theconnect_urlto open in a browser, then pollcrm_connect_status(pending_id)every few seconds untilactive. - Only ONE CRM can be connected at a time. If
crm_connectreturns a conflict, the user must disconnect the current CRM in the dashboard first — never disconnect for them without asking.
2. Read the schema
Call crm_get_schema(). You get:
properties.contacts/properties.companies— every property withlabel,type,options(valid enum values),read_only,customlists— the user's CRM lists (id, name, processing type)protected_properties— fields the server will never let you write
3. Classify and auto-map
Silently classify properties:
- Standard equivalents — map automatically, do not ask. HubSpot:
email→email,jobtitle,firstname/lastname,phone,city,country,company,website,domain,industry,numberofemployees,linkedin_url→hs_linkedin_url. Pipedrive:email→email,name,job_title,phone, plus thedomainalias on companies (backed by a custom Domain field the server manages automatically). - Custom enrichment targets — custom properties whose name/label suggests enrichment
(score, tier, segment, tech stack, intent, source): candidates for user questions. Pipedrive
custom properties have hash-like names — rely on
labelto understand them. - Ignore —
read_only: true, calculated,hs_*system internals, protected fields.
Provider differences that change agent behavior:
- Pipedrive matches contacts by email or record_id only —
linkedin_urlmatching is HubSpot-only. Records with only a linkedin_url will not match existing Pipedrive persons. - Pipedrive companies match by the
domainalias — the server maps it to the portal's Domain field. If company writes fail with a "no domain field" error, reconnect the CRM with admin access so the server can create the field. - Enum values are labels in both CRMs — the server converts labels to Pipedrive option ids internally; always send the human-readable label from the schema options.
4. Ask 3-5 questions maximum
Ask ONLY about ambiguous or high-stakes decisions, one compact block, not an interview:
- Ambiguous targets: "Intent score →
Lead ScoreorICP Fit Score?" - Overwrite policy for volatile fields: "Job titles: overwrite on change or fill blanks only?"
- Working list: "Which list do you enrich most — 'Inbound' or 'Outbound Q3'?" (only if lists exist)
- Creation policy: "May agents create new contacts, or update existing only?"
- Plan: "Are you on MCP Unlimited or a credit-based plan?" — future sessions use this to
decide between credit estimates (credit plans) and time estimates (Unlimited) before bulk runs.
Skip it when
anysite-gtm-profilealready records the plan.
Confirm the full mapping as ONE list for approval, then save.
5. Save the local profile
Write the agreed profile to ~/.claude/skills/anysite-crm-profile/SKILL.md in Claude Code or
~/.codex/skills/anysite-crm-profile/SKILL.md in Codex (create the directory). Without file
access, give it as a block to paste into project or custom instructions. Use exactly this
structure:
---
name: anysite-crm-profile
description: The user's saved CRM field mapping and write rules for CRM enrichment via anysite MCP. ALWAYS consult this before calling crm_upsert_contacts or crm_upsert_companies - it defines which CRM properties to write, which may be overwritten, and which list is the working list. Generated by /anysite-crm-setup - do not edit manually, re-run setup to change.
---
# CRM Profile (<provider> portal <portal_id>, connection <connection_id>)
Generated <date> by anysite-crm-setup from live schema. Do not edit manually.
## Field mapping — contacts
| Anysite data | CRM property | mode |
|---|---|---|
| job title | jobtitle | fill_blank |
| linkedin url | hs_linkedin_url | fill_blan
Read the complete source ↗