| name | ghl-onboard |
| description | Onboard a new client into GoHighLevel — creates contact, tags, notes, pipeline opportunity, follow-up task, finds calendar slot, and sends a welcome email. Use when user says 'onboard', 'new client', 'ghl onboard', 'add client to GHL', or invokes /ghl-onboard. |
Chain GHL CLI and Google Workspace operations to fully onboard a new client in one sequential workflow: contact creation, tagging, notes, pipeline opportunity, task, calendar slot discovery, and welcome email.
<input_parsing>
Extract from the user's message:
- firstName (required)
- lastName (required)
- email (required)
- package (optional, default: "Standard") — values in
config/packages.json
If any required field is missing, ask the user before proceeding.
</input_parsing>
Check if pipeline ID is cached in `/tmp/ghl-onboard-config.json`.
If not, discover it:
- Run
ghl opp pipeline --json
- If one pipeline: use it. If multiple: ask user to pick
- Extract
pipelineId and stageId (first stage)
- Cache to
/tmp/ghl-onboard-config.json
Execute all 7 steps sequentially using the Bash tool. Use `--json` on every `ghl` command. Track timing from Step 1.
Read each step's details from its reference file:
| Step | Reference | Action |
|---|
| 1 | workflow/01-upsert-contact.md | Create or update the contact |
| 2 | workflow/02-tag-contact.md | Apply package tags |
| 3 | workflow/03-add-note.md | Add onboarding note |
| 4 | workflow/04-create-opportunity.md | Create pipeline opportunity |
| 5 | workflow/05-create-task.md | Create follow-up task (due +2 days) |
| 6 | workflow/06-find-calendar-slot.md | Find next available kickoff slot |
| 7 | workflow/07-send-welcome-email.md | Send welcome email using templates/welcome-email.html |
<error_handling>
- Step 1 failure → STOP (all steps depend on contact ID)
- Steps 4, 6, 7 failure → continue, report in summary
- All errors reported in final output
</error_handling>
- ALWAYS use `--json` flag on all `ghl` commands
- ALWAYS parse JSON output to extract IDs — NEVER rely on text parsing
- The `ghl` and `gws` CLIs are already installed and authenticated
- ALL output MUST be in English regardless of user's language
See `output-format.md` for the summary template.
<success_criteria>
- Contact exists in GHL with correct tags and onboarding note
- Pipeline opportunity created with correct package value
- Follow-up task created with due date = today + 2 days
- Welcome email sent to client with booking link
- Summary displayed with timing and status for each step
</success_criteria>