Library
N8N Foundation · Chapter 10 of 10
Chapter 10

Capstone:
AI Sales Assistant

One end-to-end project that stitches every chapter: form → AI → CRM → WhatsApp → invoice → analytics.

CapstoneAICRM
A Handbook For Builders
Capstone:
AI Sales Assistant
Chapter 10
The Claude Code Handbook

The one workflow to prove you own this material — build it, then charge for it.

Section 1

1. The Goal

A prospect submits a form. Within 90 seconds they receive a personalised WhatsApp reply, a Stripe payment link, and their record lands in your CRM with a lead score.

Section 2

2. Architecture

  • Webhook — form data.
  • OpenAI — enrich + score + draft message.
  • Supabase — insert row, upsert customer.
  • Stripe — create Checkout Session.
  • WhatsApp Cloud API — send the reply.
  • Slack — DM sales team.
  • Error Workflow — catches everything.
Section 3

3. Build Steps

  1. Wire the webhook. Validate inputs with Set + IF.
  2. OpenAI call with structured JSON output (score, tags, message).
  3. Supabase insert. Save score + tags.
  4. Stripe HTTP node → Checkout Session → grab URL.
  5. WhatsApp Cloud API POST with message + link.
  6. Slack DM with lead summary.
  7. Respond 200 to the webhook.
Section 4

4. Ship

Point Error Workflow at your handler. Deploy to Railway. Add a UptimeRobot ping. Record a 60-second Loom.