# New Client

> Creates a new client workspace folder with standard structure (diagrams, logs, prompts, transcripts, context.md, avoca-client.json). Use when the user says "new client", "create client", "add client", or provides a client name and Avoca team ID for onboarding setup.

- Skill: `ivangit-avoca/new-client` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ivangit-avoca/new-client`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ivangit-avoca/new-client/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ivangit-avoca (https://skillmd.com/u/ivangit-avoca)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/ivangit-avoca/new-client

---


# New client setup

## When this applies

- User says **"new client {Name}"**, **"new client {Name}-{ID}"**, or similar.
- User provides a company name (and optionally an Avoca team ID) and wants the workspace scaffolded.

## Inputs

| Input | Required | Source |
|-------|----------|--------|
| Company name | Yes | User provides directly |
| Avoca team ID | Yes | User provides, or extracted from Avoca Team Link in the Onboarding Calendar spreadsheet |
| Extra details (AE, contact, email, CRM, products) | No | User provides, or looked up from the spreadsheet |

If the user gives **only a name** (no ID), search the Onboarding Calendar spreadsheet (see Step 2) to find the team ID. If the spreadsheet has no match and the user didn't provide an ID, ask for it.

## Workflow

### Step 1 — Parse input

Extract `{Name}` and `{ID}` from the user's message. Normalize the folder name to `{Name}-{ID}` (title-case name, numeric ID). Examples:

| User says | Folder name |
|-----------|-------------|
| "new client Acme-1234" | `Acme-1234` |
| "new client johnson plumbing 4567" | `Johnson Plumbing-4567` |
| "new client Acme" (no ID) | look up in spreadsheet → `Acme-{ID}` |

### Step 2 — Spreadsheet lookup (optional but preferred)

Search the **Onboarding Calendar** spreadsheet for the company name.

- **Spreadsheet ID:** `1dwYjbTF4izzBeN8E4UKgUXQ-iSncUjEoiOHMebSu0tQ`
- **Account:** `personal`
- **MCP server:** `user-google-workspace`

**Procedure:**

1. Call `getSpreadsheetInfo` to list sheet/tab names (they're weekly date ranges).
2. Read the most recent 2–3 sheets (they appear at the end or beginning of the list depending on order; pick the ones with the latest dates).
3. For each sheet, `readSpreadsheet` with range `{SheetName}!A:L` (header row has: Company Name, Hubspot Link, AE, POC Name, POC Email, Avoca Team Link, Onboarding POC, Asana Link, Products, Onboarding First Meeting, CRM, ACV).
4. Find the row where **Company Name** matches (case-insensitive, partial OK).
5. Extract the **Avoca Team ID** from the Avoca Team Link column (e.g., `https://app.avoca.ai/team/2388/...` → `2388`).
6. Extract any other populated fields (AE, POC Name, POC Email, Products, CRM, ACV, HubSpot Link, Asana Link).

If no match is found and the user didn't provide an ID, ask the user for the team ID before proceeding.

If the user already provided all details (name + ID + extras), skip the spreadsheet lookup entirely.

### Step 3 — Check for duplicates

Before creating anything, check if `clients/{Name}-{ID}/` already exists:

```bash
ls clients/ | grep -i "{ID}"
```

If it exists, tell the user and stop. Don't overwrite.

### Step 4 — Create folder structure

```
clients/{Name}-{ID}/
├── diagrams/
├── logs/
├── prompts/
├── transcripts/
├── context.md
└── avoca-client.json
```

Create all directories and both files in one pass.

### Step 5 — Populate context.md

Use the template from `knowledge/onboarding/client-template.md` and fill in every field you have data for. Leave unknown fields blank (don't remove them).

Field mapping from spreadsheet columns:

| Template field | Spreadsheet column |
|----------------|-------------------|
| `{Client Name}` | Company Name |
| `{ID}` | extracted from Avoca Team Link |
| **AE** | AE |
| **Primary contact** | POC Name |
| **Email** | POC Email |
| **Products** | Products |
| **CRM** | CRM |
| **ACV** | ACV |
| **HubSpot deal** | Hubspot Link |
| **Asana project** | Asana Link |
| **Avoca Team Link** | Avoca Team Link |

Set **Status** to `🟡 Kickoff`.

### Step 6 — Create avoca-client.json

```json
{
  "avoca_client_id": "{ID}"
}
```

### Step 7 — Auto-sync Gmail, GCal & Attention

Immediately after creating the folder, pull recent emails, upcoming meetings, and Attention calls into `context.md`. This replaces the need to run `sync {Name}` manually.

**Prerequisites:** Need at least one of: POC email (for Gmail) or company name (for GCal/Attention). If neither is available, skip this step and note it in the confirmation.

**Run all three lookups in parallel:**

#### Gmail — recent threads

- **MCP server:** `user-google-workspace`
- **Tool:** `searchGmail`
- **Args:** `account: "personal"`, `query: "from:{POC email} OR to:{POC email}"`, `maxResults: 10`
- If no POC email, skip.

Write into `## Recent emails`:

```markdown
| Date | Subject | Summary |
|------|---------|---------|
| 4/3  | RE: Onboarding kickoff | Confirmed 4/6 meeting, will have ST creds ready |
```

If no results: `_No recent email threads found._`

#### GCal — upcoming meetings

- **MCP server:** `user-google-workspace`
- **Tool:** `searchCalendarEvents`
- **Args:** `account: "personal"`, `query: "{company name}"`, `timeMin: 7 days ago (ISO 8601)`, `timeMax: 21 days from now (ISO 8601)`, `maxResults: 10`

Write into `## Upcoming meetings`:

```markdown
| Date | Time | Event | Attendees |
|------|------|-------|-----------|
| 4/9/2026 | 11:00 AM – 12:00 PM EDT | Kickoff call | Ivan, Samantha |
```

If no results: `_No upcoming meetings found._`

#### Attention — recent calls

- **MCP server:** `user-attention`
- **Tool:** `search_calls`
- **Args:** `title: "{company name}"`, `from_date: 30 days ago (ISO 8601)`, `size: 5`

Write into `## Recent calls`:

```markdown
| Date | Call title | Participants | Duration |
|------|-----------|--------------|----------|
| 4/6  | Avoca Acme Kickoff | Ivan, John Smith | 32 min |
```

If no results: `_No recent Attention calls found._`
If Attention MCP is unavailable, skip silently and write `_Attention sync skipped._`

#### Write back

Update `context.md` with all three sections populated. Add (or update) the `<!-- last_synced: {ISO 8601 timestamp} -->` line at the bottom. Don't touch any other sections.

### Step 8 — HubSpot context (if available)

Pull deal data and AE pre-onboarding notes from HubSpot into `## HubSpot context`. This is the most valuable enrichment for new clients — the AE's Attention-generated notes live in HubSpot deal notes.

**Availability:** HubSpot MCP is only available in **Claude Code** (terminal), not in Cursor agent mode. Attempt the step; if HubSpot tools aren't available, skip gracefully.

**Procedure:**

1. Check if HubSpot MCP tools are available (try to list/discover them).
2. **If unavailable** (running in Cursor): skip silently. In the confirmation (Step 9), note: "HubSpot sync skipped — run `sync hubspot for {Name}` from Claude Code to pull deal context."
3. **If available** (running in Claude Code):
   - Check `## Links > HubSpot deal` in `context.md` for a deal URL. If present, parse the deal/record ID from the URL.
   - If no HubSpot deal URL exists, **search HubSpot by company name** to find the matching deal. If found, backfill the URL into `## Links`.
   - Use the HubSpot MCP to pull deal properties: **stage, amount, close date, last activity date, associated contacts, deal description/notes**.
   - Write a compact summary into `## HubSpot context`:

```markdown
## HubSpot context

- **Deal stage:** Onboarding
- **Amount:** $X,XXX
- **Close date:** YYYY-MM-DD
- **Last activity:** YYYY-MM-DD
- **Contacts:** Jane Smith (AE), John Doe (POC)

### AE notes

> {The AE's pre-onboarding notes / deal description — this is the Attention-generated
> summary of the sales calls that gives context on what was promised, discussed, and
> what the client expects from onboarding.}
```

4. Don't touch any other sections of `context.md`.

### Step 9 — Add to Notion To-Do page

Add a new client section to Ivan's Onboarding To-Dos Notion page with the standard onboarding phases and pre-onboarding checklist items.

- **MCP server:** `user-notion`
- **Tool:** `notion-update-page`
- **Page ID:** `33bf2b56d4d58120be23e4c874b28a8e`
- **Command:** `update_content`

Append the following section before the trailing empty blocks at the end of the page. Use the last client section's `</details>` + `---` as the anchor for the `old_str`, and include the new section in `new_str`.

**Standard section template:**

Note: System-verifiable items (ST creds, employee contacts, transfer destinations, on-call, etc.) are tracked automatically in `context.md` via the health check skill. The Notion section is for **manual/ad-hoc items only**.

```
## {Client Name} {toggle="true"}
	<details>
	<summary>📋 Pre-Onboarding</summary>
		- [ ] prep for kickoff
	</details>
	<details>
	<summary>📞 First Onboarding</summary>
	</details>
	<details>
	<summary>🧪 Testing Call</summary>
		- [ ] Share test call sheet
	</details>
	<details>
	<summary>🔄 Testing Follow-Up</summary>
	</details>
	<details>
	<summary>🚀 Go-Live</summary>
	</details>
	<details>
	<summary>✅ Post Go-Live</summary>
	</details>
```

Add any client-specific items (e.g., "review Attention notes", "schedule kickoff call") as needed. If you know the products from the spreadsheet, add a `- [ ] Products: {products}` item to Pre-Onboarding too.

### Step 10 — Confirm

Tell the user:
- Folder path created
- Which fields were populated vs left blank
- What the sync found (e.g. "3 email threads, 1 upcoming meeting, 2 Attention calls")
- Whether HubSpot context was pulled or skipped
- That the client was added to the Notion to-do page

## Output

Keep it concise. Example:

> Created `clients/Acme-1234/` with context.md pre-filled (AE: Jane, POC: John Smith, CRM: ServiceTitan). Synced: 2 email threads, 1 upcoming meeting on 4/8, 1 Attention call. HubSpot: deal stage Onboarding, AE notes pulled. Added to Notion to-do page.

If HubSpot was skipped:

> Created `clients/Acme-1234/` with context.md pre-filled (AE: Jane, POC: John Smith, CRM: ServiceTitan). Synced: 2 email threads, 1 upcoming meeting on 4/8, 1 Attention call. HubSpot sync skipped — run `sync hubspot for Acme` from Claude Code. Added to Notion to-do page.

