G
GHL SOPKnowledge Base
Search
← All topics

Close Won to Onboarding: GHL Trigger + N8N Heavy Lifting Architecture

runnable

Architecture for the close-won to onboarding workflow where GHL handles the trigger and removes from other workflows, then N8N does the heavy lifting: creating SaaS client, generating magic link, sending welcome SMS/email, and managing Supabase records.

ghln8nonboardingworkflowsupabase
Agent trigger phrases: close won onboarding workflow · ghl to n8n onboarding flow · magic link onboarding setup · new client onboarding automation · close won pipeline trigger n8n · saas client creation workflow

Close Won → Onboarding Workflow Architecture

Design Principle

GHL handles the trigger and simple native actions. N8N handles all complex logic.

GHL Side (Minimal)

  1. Trigger: Pipeline stage changed to "Close Won" in Sales Pipeline
  2. Action: Remove from all other workflows (native GHL action)
  3. Action: Send webhook to N8N

N8N Side (Heavy Lifting)

  1. Log webhook — Extract contact data from GHL webhook payload
  2. Create SaaS client — Insert into Supabase clients table
  3. Generate magic link — Create unique onboarding URL for the client
  4. Save token — Store authentication token in Supabase
  5. Cancel sales enrollments — Disenroll from all sales-related N8N workflows
  6. Create onboarding opportunity — Move to onboarding pipeline stage
  7. Send welcome SMS: "Hey {first_name}, welcome to Iron Automations! We're getting everything set up for you. Here's your onboarding form — takes about 5 minutes. {magic_link}"
  8. Send welcome email — Same content with more detail
  9. Post notification — Send to Mattermost notifications channel (NOT SMS replies channel)

Key Decisions

  • No inbound webhooks to GHL — Premium feature, never use it. Always send data OUT of GHL to N8N.
  • No custom webhook actions — Also premium. Off the table.
  • Tags: Only use if absolutely necessary for triggering other automations. Pipeline stage changes are preferred.
  • Onboarding form reminders: Should be a SEPARATE workflow, not bundled into this one.

Magic Link Onboarding Form Flow

The magic link leads to a mobile-optimized multi-step form:

  1. Loom video walkthrough explaining each question
  2. Services offered (creates individual pages on website)
  3. Service area / cities served (creates location pages)
  4. Google Business Profile link
  5. Facebook page link
  6. Logo upload (or request generation)
  7. Brand colors
  8. Photos (5-10 of job sites, team, equipment)
  9. Business details (legal name, address, phone, email)
  10. Domain name (existing or request new)

Form submissions feed into Iron Funnels for automated site/funnel generation.