hubspot-email-automation
Nebuchadnezzar v3.0 - Multi-Agent Sales Pipeline System
- Category: discovered
- Tags: github, community
- Version: 1.0.0
- Author: walid
- Downloads: 0
- GitHub stars: 1
- Updated: 2025-12-22
Download the latest version (v1.0.0) from this page.
SKILL.md
# HubSpot Email Automation Skill Execute cold outreach email sequences via HubSpot Lead records with Chrome browser automation. **Triggers**: "send email via hubspot", "hubspot email", "email sequence", "send outreach", "compose hubspot email" --- ## Pre-Flight Checks (CRITICAL - Do First) ``` BEFORE any email composition: 1. ASK USER: "Has this email already been sent or scheduled?" 2. CHECK: Recent communications section on Lead record 3. VERIFY: Current state of any open dialogs/modals 4. CONFIRM: Email sequence document exists and is current ``` --- ## Learned Anti-Patterns (NEVER DO) | Anti-Pattern | Consequence | Correct Approach | |--------------|-------------|------------------| | `Ctrl+Home` in email body | Closes dialog, loses draft | Use `Home` key only (no Ctrl) | | Assume context from previous session | Redo completed work | Verify current state with user | | Type in field without confirming focus | Text goes wrong place | Screenshot → Click → Verify → Type | | Click Send without screenshot verification | Can't undo sent emails | Always screenshot before send action | | Skip dropdown selection for To field | Email not linked to contact | Type email → Wait for dropdown → Click to select | | Use Ctrl+Enter to send | May not work in HubSpot | Click the Send button directly | | Press Enter after typing email | May submit prematurely | Click dropdown option instead | --- ## HubSpot Email Composer Field Sequence ### 1. TO FIELD ``` - Click To field → Type email address → Wait 500ms - Screenshot to verify dropdown appeared - Click contact name in dropdown (NOT just press Enter) - Verify chip appears with X ``` ### 2. SUBJECT FIELD ``` - Click Subject field → Verify cursor is in field - Type subject line - Verify Send button turns orange ``` ### 3. BODY FIELD ``` - Click at START of body (before signature) - Use Home key (NOT Ctrl+Home) to go to line start - Type email content - Content should appear ABOVE "Cheers," signature ``` ### 4. PRE-SEND VERIFICATION ``` - Screenshot entire email dialog - Verify: To (chip), Subject (filled), Body (above signature) - SHOW USER the screenshot for approval - Only then click Send button after user confirms ``` --- ## Orchestration Flow ``` ┌─────────────────────────────────────────────────────────────┐ │ MASTER ORCHESTRATOR │ ├─────────────────────────────────────────────────────────────┤ │ │ │ PHASE 1: PARALLEL PRE-FLIGHT │ │ ┌─────────────────┐ ┌─────────────────┐ │ │ │ Sub-Agent 1: │ │ Sub-Agent 2: │ │ │ │ Content │ │ State │ │ │ │ Validator │ │ Checker │ │ │ └────────┬────────┘ └────────┬────────┘ │ │ │ │ │ │ └──────────┬───────────┘ │ │ ▼ │ │ GATE: Both must pass before proceeding │ │ - Content validated? ✓ │ │ - No existing email? ✓ │ │ - Lead record ready? ✓ │ │ │ │ │ PHASE 2: SEQUENTIAL EXECUTION │ │ ▼ │ │ ┌─────────────────────────────────────┐ │ │ │ Sub-Agent 3: Email Dialog Handler │ │ │ │ (Must run sequentially - UI state) │ │ │ └─────────────────────────────────────┘ │ │ │ │ │ PHASE 3: USER VERIFICATION │ │ ▼ │ │ ┌─────────────────────────────────────┐ │ │ │ Show final screenshot to user │ │ │ │ "Ready to send. Confirm?" │ │ │ └─────────────────────────────────────┘ │ │ │ └─────────────────────────────────────────────────────────────┘ ``` --- ## Chrome MCP Quick Reference | Action | Tool | Key Parameters | |--------|------|----------------| | Take screenshot | `mcp__claude-in-chrome__computer` | `action: screenshot` | | Click element | `mcp__claude-in-chrome__computer` | `action: left_click, coordinate: [x,y]` | | Type text | `mcp__claude-in-chrome__computer` | `action: type, text: "..."` | | Single key | `mcp__claude-in-chrome__computer` | `action: key, text: "Home"` | | Navigate | `mcp__claude-in-chrome__navigate` | `url: "...", tabId: X` | | Get tab context | `mcp__claude-in-chrome__tabs_context_mcp` | `createIfEmpty: true` | ### HubSpot Email Dialog Coordinates (Approximate) - To field: ~625, 322 - Subject field: ~612, 388 - Body area: ~386, 441 - Send button: ~407, 668 (when orange/active) **Note**: Coordinates vary by screen size. Always screenshot first to verify positions. --- ## FirstMile Content Rules When composing emails for FirstMile outreach: | Rule | Correct | Incorrect | |------|---------|-----------| | Cold-chain | Never claim | "3-day cold-chain SLA" | | Carrier names | "National network", "Select network" | "UPS", "FedEx", "USPS" | | Punctuation | Hyphens (-) | Em-dashes (—) | | Service names | "Xparcel Ground (3-8d)" | "Ground shipping" | --- ## Sub-Agent References - [01-content-validator.md](references/01-content-validator.md) - Validates email content against rules - [02-state-checker.md](references/02-state-checker.md) - Checks HubSpot Lead state before action - [03-dialog-handler.md](references/03-dialog-handler.md) - Handles email dialog field-by-field --- ## Error Recovery | Error | Recovery | |-------|----------| | Dialog closed unexpectedly | Click Email button on Lead record to reopen | | Wrong text in field | Ctrl+A to select all, then retype | | Contact not in dropdown | Verify contact exists in HubSpot CRM first | | Send button grayed out | Check To field has selected contact (chip) | | Tab disconnected | Call `tabs_context_mcp` with `createIfEmpty: true` | | Garbled text after typing | Screenshot verify → Ctrl+A → Retype cleanly | --- ## Usage Example ``` User: Send Email 1 from Mad Rabbit sequence to Oliver Zak Claude: 1. [Parallel] Run Content Validator on Mad_Rabbit_Email_Sequence.md 2. [Parallel] Run State Checker on Mad Rabbit Lead record 3. [Gate] Verify both passed 4. [Sequential] Run Dialog Handler with validated content 5. [User Gate] Show screenshot, ask "Ready to send?" 6. [Action] Click Send only after user confirms ```