n8n Pipeline Spec
n8n Pipeline Spec — AI Opportunity Audit Automation
Section titled “n8n Pipeline Spec — AI Opportunity Audit Automation”Intake → Claude analysis → Branded PDF + shareable graphic + client portal → GHL delivery
Section titled “Intake → Claude analysis → Branded PDF + shareable graphic + client portal → GHL delivery”Goal: Turn a paid audit purchase into a delivered, impressive, mostly-automated package with minimal human time per engagement. Target: 3–5 hours of your hands-on time per audit (interviews + final review + Loom), the rest automated.
Stack: n8n (orchestration), Claude Sonnet + Haiku (analysis), Supabase (data store), Carbone or Gotenberg (PDF, self-hosted on Hostinger VPS), Placid or Bannerbear (shareable graphic), Metabase + Softr (client portal), GHL (delivery + CRM + nurture), Loom (walkthrough), Stripe or GHL payments (checkout).
This doc covers two pipelines:
- Lead-magnet pipeline (free scorecard → nurture → paid audit) — lightweight, always-on.
- Fulfillment pipeline (paid audit → delivered package) — the main event.
PIPELINE 1 — LEAD MAGNET (ScoreApp → GHL nurture)
Section titled “PIPELINE 1 — LEAD MAGNET (ScoreApp → GHL nurture)”ScoreApp webhook ──► n8n ──┬──► GHL: upsert contact + add tag "scorecard_complete" ├──► Supabase: insert scorecard_result row ├──► Placid: generate branded score graphic → upload to GHL media └──► GHL: trigger nurture workflow (email 1: score + audit offer)Nodes:
- Webhook node — receives ScoreApp payload (see Asset 2 for JSON shape). URL:
https://[your-n8n]/webhook/scoreapp. - Function/Set node — normalize: extract
contact,score.overall,score.dimensions,score.binding_constraints,answers. - GHL node —
Upsert Contactwith custom fields:ai_readiness_score,ai_readiness_band,binding_constraint_1,binding_constraint_2. Add tag:lead_scorecard. Add to workflowAudit Nurture v1. - Supabase node —
INSERTintoscorecard_results(full payload + timestamp) for analytics and later benchmarking. - Placid node (HTTP or native) — POST score + band + dimension radar data to a Placid template → returns branded share-image URL.
- GHL node — send Email 1: “Your AI Readiness Score: [X]/100” with the graphic attached + link to the sales page pricing section.
- IF node — if
score.overallbetween 40 and 79 (prime buyer band) → add taghot_audit_lead→ trigger a Slack/email internal alert so you can do personal outreach.
Nurture sequence (in GHL, not n8n):
- Email 1 (immediate): score + graphic + audit offer.
- Email 2 (+2 days): case study / testimonial.
- Email 3 (+5 days): “only 4 slots this month” scarcity.
- Email 4 (+10 days): “what an audit actually looks like” (sample report teaser).
PIPELINE 2 — FULFILLMENT (paid audit → delivered package)
Section titled “PIPELINE 2 — FULFILLMENT (paid audit → delivered package)”This is the core. Steps map to the delivery workflow in the blueprint. [Auto] = automated, [Semi] = automated draft + you review, [Manual] = you.
Step 0 — Checkout & kickoff [Auto]
Section titled “Step 0 — Checkout & kickoff [Auto]”Stripe/GHL checkout (success) ──► n8n ──► GHL: move contact to "Audit In Progress" ──► Supabase: create engagement row (status: kickoff) ──► GHL email: "You're in" + Fillout intake link + Calendly bookingStep 1 — Deep intake [Auto → Semi]
Section titled “Step 1 — Deep intake [Auto → Semi]”Tool: Fillout (or Typeform). 7-dimension deep questionnaire — more granular than the lead-magnet scorecard: 5–7 questions per dimension + a “use-case inventory” section where they list their top 10 most time-consuming tasks (impact, effort, data source, owner, frequency).
Fillout webhook ──► n8n ──► Supabase: store intake_responses (engagement_id) ──► GHL: tag "intake_complete", update custom fields ──► (IF node) if Tier = Deep Dive → send Fillout "stakeholder roster" form to collect 5–6 interviewee namesStep 2 — Discovery / stakeholder interviews [Manual]
Section titled “Step 2 — Discovery / stakeholder interviews [Manual]”You run 1 (Snapshot) to 6 (Deep Dive) interviews on GHL-calendar bookings. Record each (with consent).
Automation assist: Each interview recording → n8n via Loom/Drive webhook → Claude Haiku node transcribes + extracts structured notes against the 7 dimensions (prompt template below) → stores structured notes in Supabase under the engagement.
Loom/Drive new video ──► n8n ──► Haiku: transcribe + extract dimension notes ──► SupabaseStep 3 — Analysis (AI-assisted) [Semi — the brain]
Section titled “Step 3 — Analysis (AI-assisted) [Semi — the brain]”This is the most valuable node in the whole pipeline. n8n orchestrates a multi-step Claude Sonnet analysis.
n8n (manual trigger "Run Analysis") ──► gather: intake_responses + all interview notes (from Supabase) ──► Claude Sonnet node: "Score the 7 dimensions" ──► Claude Sonnet node: "Generate opportunity matrix (15–20 use cases)" ──► Claude Sonnet node: "Draft 30/60/90 roadmap" ──► Claude Sonnet node: "Draft ROI projection" ──► Claude Haiku node: "Format to style-guide HTML sections" ──► Supabase: store all drafts (status: review) ──► notify you (Slack/email): "Analysis ready for review"Each Claude node = one focused prompt. See PROMPT LIBRARY below for exact templates.
Step 4 — Your review + edits [Manual]
Section titled “Step 4 — Your review + edits [Manual]”You open a simple admin view (Softr on Supabase, or just the Supabase dashboard) → review the drafted scores, opportunities, roadmap, ROI → edit any you disagree with → mark status: approved.
Supabase status: review → approved (you flip it) ──► n8n trigger "Generate Deliverables"Step 5 — Deliverable production [Auto]
Section titled “Step 5 — Deliverable production [Auto]”n8n "Generate Deliverables" trigger (on approval) ──► assemble final JSON (approved scores, opportunities, roadmap, ROI, client branding) ──► BRANCH A: Carbone/Gotenberg node → branded PDF report ──► BRANCH B: Placid node → shareable score graphic (radar + headline number + client logo) ──► BRANCH C: Metabase/Softr → populate portal (radar chart, heatmap, roadmap tiles) ──► n8n waits for all 3 ──► Supabase: store asset URLs (status: deliverables_ready)Branch A — PDF (Carbone on Hostinger VPS):
- Template: a branded HTML/DOCX template in Carbone. Tags:
{{client_name}},{{score}},{{band}},{{#each dimensions}},{{#each opportunities}},{{#each roadmap_phases}},{{roi_summary}}. - n8n POSTs the final JSON to Carbone’s API → returns PDF → n8n uploads to GHL media + Supabase.
Branch B — Shareable graphic (Placid):
- Template: a square 1080×1080 + a LinkedIn-landscape 1200×627, both with: client logo, score number, band label, mini radar.
- Auto-generated, so the client can post immediately.
Branch C — Interactive portal (Metabase + Softr):
- Metabase reads from Supabase
engagement_results→ radar chart + dimension bars + opportunity heatmap + roadmap list. - Softr page (gated, per-engagement) embeds the Metabase dashboards → looks like a custom client portal.
- n8n writes the Softr row + generates a magic link.
Step 6 — Loom walkthrough [Semi → Manual]
Section titled “Step 6 — Loom walkthrough [Semi → Manual]”n8n: status deliverables_ready ──► notify you: "Record Loom for [client]"You record a 5–8 min Loom: one key message (their binding constraints), walk the radar, highlight top 3 opportunities, point to the roadmap, end with CTA (proceed to build? book debrief?).
Automation assist: n8n can pre-draft the Loom script from the approved analysis (Claude Haiku node) so you just read/refine it.
After Loom upload ──► Loom webhook ──► n8n ──► Supabase: store loom_url (status: loom_ready)Step 7 — Delivery [Auto]
Section titled “Step 7 — Delivery [Auto]”n8n: status loom_ready ──► GHL email: "Your AI Opportunity Audit is ready" - PDF attached / linked - Portal magic link - Loom embed - "Book your debrief call" link (GHL calendar) ──► GHL: tag "audit_delivered", move to "Debrief" stage ──► Supabase: status: delivered ──► (delay 24h) GHL email: "Share your AI Readiness Score" with the Placid graphic + referral linkStep 8 — Debrief call [Manual]
Section titled “Step 8 — Debrief call [Manual]”You run the 60-min recorded debrief. n8n logs attendance + sends a “recap + next steps” email via GHL after.
Step 9 — Referral loop activation [Auto]
Section titled “Step 9 — Referral loop activation [Auto]”Audit delivered ──► GHL: create affiliate record for the client (GHL Affiliate Manager) ──► generate their unique referral link ──► email: "Earn $400 for every business you refer" with their link + shareable score graphic ──► if anyone books via their link → GHL attributes → 30 days after they pay → Wise payout (you trigger manually or automate via Wise API)PROMPT LIBRARY (Claude nodes)
Section titled “PROMPT LIBRARY (Claude nodes)”Each prompt is a separate Claude node. Feed structured input, get structured output (JSON).
Prompt 1 — Score the 7 dimensions (Sonnet)
Section titled “Prompt 1 — Score the 7 dimensions (Sonnet)”SYSTEM: You are a fractional Chief AI Officer conducting an AI Opportunity Audit.You are rigorous, honest, and avoid hype. You score on evidence, not optimism.
INPUT: {intake_responses JSON} + {interview_notes JSON}
TASK: Score each of the 7 dimensions 1–5 (use 0.5 increments if needed),with a 1-paragraph justification per dimension citing specific evidence from the input.
DIMENSIONS: strategy_leadership, data_readiness, technology_tooling,process_automation, talent_literacy, governance_compliance, value_roi.
RULES:- Score by the binding-constraint method: the overall maturity is gated by the two lowest dimensions, not the average. Note which two are lowest.- If evidence is missing for a dimension, score conservatively (don't assume capability that isn't stated).- 1 = nothing in place, 5 = leading-edge. Be demanding; most businesses score 2–3.
OUTPUT: JSON { "dimensions": [{"name","score","justification"}],"binding_constraints": ["dim1","dim2"], "overall_maturity_note": "..." }Prompt 2 — Opportunity matrix (Sonnet)
Section titled “Prompt 2 — Opportunity matrix (Sonnet)”SYSTEM: You are an AI automation strategist. You rank real opportunities byimpact × effort, grounded in the client's actual processes and data.
INPUT: {intake + interview notes} + {dimension scores}
TASK: Identify 15–20 concrete AI/automation opportunities for this business.For each, provide:- name- description (1–2 sentences)- impact_score (1–5)- effort_score (1–5)- data_readiness (ready / partial / not ready)- estimated_hours_saved_per_week (range)- estimated_annual_savings_usd (range, show math: hours × loaded cost × 48 wks)- time_to_value (weeks)- owner_suggestion- quadrant (quick_win / strategic_bet / fill_in / park)
RULES:- Only include opportunities grounded in the client's stated processes. No generic "implement a chatbot" unless their intake supports it.- Rank by (impact ÷ effort) descending.- Be honest about data_readiness — if a use case needs data they don't have, flag it as a prerequisite, not a quick win.
OUTPUT: JSON array of 15–20 opportunity objects.Prompt 3 — 30/60/90 roadmap (Sonnet)
Section titled “Prompt 3 — 30/60/90 roadmap (Sonnet)”SYSTEM: You are a fractional CAIO building an implementation roadmap.
INPUT: {dimension scores} + {opportunity matrix} + {binding_constraints}
TASK: Create a 30/60/90-day roadmap.
STRUCTURE:- Days 1–30 (Foundations): fix the binding constraints. 2–4 initiatives.- Days 31–60 (Quick Wins): ship the highest impact/effort opportunities. 3–5 initiatives.- Days 61–90 (Scale): strategic bets + governance hardening. 2–4 initiatives.
For each initiative: name, what, why (ties to which dimension/opportunity),owner, dependency, success metric.
RULES:- The 30-day phase MUST address the binding constraints first.- Be specific enough that a competent operator could start Monday.
OUTPUT: JSON { "phases": [{"phase","initiatives":[...]}] }Prompt 4 — ROI projection (Sonnet)
Section titled “Prompt 4 — ROI projection (Sonnet)”SYSTEM: You are a financial analyst building a defensible ROI projection.
INPUT: {opportunity matrix}
TASK: Produce a 12-month and 24-month cumulative ROI projection.
For each: sum the estimated_annual_savings across implemented opportunities,apply a realistic ramp (30% year-1 adoption, 70% year-2), subtract animplementation cost estimate (your hourly × hours, or a flat $X per initiative),and present cumulative net savings.
Include a "money slide" headline: "Estimated 24-month net savings: $X(YYY% ROI on a $3,000 audit)."
RULES: be conservative. Round down. Show the math. If data is thin,give a range with a stated assumption.
OUTPUT: JSON { "12mo": {...}, "24mo": {...}, "money_slide": "...", "assumptions": [...] }Prompt 5 — Loom script draft (Haiku, cheap)
Section titled “Prompt 5 — Loom script draft (Haiku, cheap)”INPUT: {approved scores, top 3 opportunities, binding constraints, money_slide}
TASK: Write a 5–8 minute Loom script for the consultant to read.Tone: confident, warm, no hype. Structure:- Hook (their binding constraint, in plain English)- The score + what it means- Top 3 opportunities (one sentence each, with the savings number)- The 30-day priority- Close + CTA (book debrief / proceed to build)
OUTPUT: a markdown script with [SLIDE/CURSOR] cues.SUPABASE SCHEMA (minimum viable)
Section titled “SUPABASE SCHEMA (minimum viable)”CREATE TABLE engagements ( id UUID PRIMARY KEY, ghl_contact_id TEXT, client_name TEXT, company TEXT, tier TEXT, -- snapshot | opportunity | deep_dive status TEXT, -- kickoff|intake|analysis|review|deliverables|loom|delivered created_at TIMESTAMPTZ DEFAULT now());
CREATE TABLE scorecard_results ( id UUID PRIMARY KEY, engagement_id UUID REFERENCES engagements(id), overall_score INT, band TEXT, dimensions JSONB, binding_constraints JSONB, answers JSONB, created_at TIMESTAMPTZ DEFAULT now());
CREATE TABLE intake_responses ( id UUID PRIMARY KEY, engagement_id UUID REFERENCES engagements(id), responses JSONB, use_case_inventory JSONB, created_at TIMESTAMPTZ DEFAULT now());
CREATE TABLE interview_notes ( id UUID PRIMARY KEY, engagement_id UUID REFERENCES engagements(id), interviewee_name TEXT, transcript TEXT, structured_notes JSONB, -- extracted by Haiku created_at TIMESTAMPTZ DEFAULT now());
CREATE TABLE analysis_drafts ( id UUID PRIMARY KEY, engagement_id UUID REFERENCES engagements(id), dimension_scores JSONB, opportunities JSONB, roadmap JSONB, roi_projection JSONB, loom_script TEXT, status TEXT, -- draft|approved created_at TIMESTAMPTZ DEFAULT now());
CREATE TABLE deliverables ( id UUID PRIMARY KEY, engagement_id UUID REFERENCES engagements(id), pdf_url TEXT, graphic_url TEXT, portal_url TEXT, loom_url TEXT, created_at TIMESTAMPTZ DEFAULT now());Metabase points at these tables; Softr builds the client-facing portal on top.
HOSTINGER VPS DEPLOYMENT
Section titled “HOSTINGER VPS DEPLOYMENT”Self-host the heavy lifters to avoid per-render fees:
- n8n — Docker on your VPS. Use the official n8n Docker image + Postgres for n8n’s own DB.
- Carbone or Gotenberg — Docker container alongside n8n. Carbone for DOCX/HTML→PDF, Gotenberg for pure HTML→PDF (preserves your CSS). Expose on localhost only; n8n calls it internally.
- Supabase — use Supabase Cloud (free tier is fine to start); only self-host Postgres if you want full control.
This keeps recurring costs near $0 beyond your existing Hostinger VPS.
WHAT YOU AUTOMATE vs. KEEP HUMAN
Section titled “WHAT YOU AUTOMATE vs. KEEP HUMAN”| Automated (n8n + Claude) | You (manual) |
|---|---|
| Intake capture & validation | Discovery & stakeholder interviews |
| Transcription + note extraction | Push back / probe in interviews |
| Dimension scoring (draft) | Final score judgment + edits |
| Opportunity matrix (draft) | Final priority judgment |
| Roadmap + ROI (draft) | Final review of roadmap/ROI |
| PDF / graphic / portal generation | Loom narration (your voice = trust) |
| Delivery email + nurture | Debrief call |
| Referral link generation | Relationship / sales follow-up |
Time per audit after the pipeline is built: ~3–5 hours of your time (mostly interviews + review + Loom), vs. 15–20 hours fully manual. That’s what makes a $3K audit profitable for a solo.
BUILD ORDER (recommended sequence)
Section titled “BUILD ORDER (recommended sequence)”- Week 1 — Supabase schema + GHL custom fields + Fillout intake form. Get data flowing into storage.
- Week 2 — n8n intake → Supabase → GHL (Pipeline 2 Steps 0–1). Verify data lands.
- Week 3 — Claude analysis nodes (Step 3) with the prompt library. Test on your LMS data (you already have it). Iterate prompts until output is genuinely good.
- Week 4 — Carbone PDF template + Placid graphic template. The “looks impressive” layer.
- Week 5 — Softr/Metabase portal + Loom integration + delivery email (Steps 5–7).
- Week 6 — GHL affiliate + referral email (Step 9). Run 2 pilot audits end-to-end.
Critical: Run the full pipeline on yourself first (audit your own LMS engagement) — you’ll find every broken node before a paying client does.