# Setup Guide — Lead Follow-Up Kit for n8n

## 1. Import
1. In n8n, open Workflows → "Import from File" and select `lead-followup-kit.workflow.json`.
2. The workflow arrives inactive, with an empty lead store. No credentials are needed and none are included in the file.

## 2. Try the demo (2 minutes)
1. Open the workflow and click "Execute Workflow" on the **Manual Trigger (Intake Demo)** branch.
2. You should see four outcomes: 1 × RECORDED, 2 × DUPLICATE_SKIPPED, 1 × REJECTED (with the three validation errors listed). Details in `sample-data.md`.
3. Run it again: the previously recorded lead is now skipped as a duplicate. The store persists between runs and across n8n restarts.

## 3. Generate the follow-up review queue
- Option A (manual): run the **Manual Trigger (Review)** branch.
- Option B (webhook): activate the workflow, then POST to the production webhook URL ending in `/webhook/lead-review-queue`. The response lists the queued follow-ups (with draft messages) and a summary of skipped leads with reasons.
- Queued is **not** sent. Review each draft, send it from your own mailbox, then update the lead: set `day3_sent` / `day7_sent` and keep the status current (REPLIED / BOOKED / CLOSED / OPTED_OUT as life happens).

## 4. Connect a real form
Replace the demo branch's input with any source that provides these fields per submission:
`name`, `email`, `message`, `received_at` (ISO 8601 timestamp).
- **n8n Form Trigger**: add a Form Trigger node with those fields and connect it to "Intake Pipeline". Map the form fields to the same names.
- **Jotform / Typeform / website form**: point the form's webhook at an n8n Webhook node connected to "Intake Pipeline", and rename the incoming fields to match (an extra Set or Code node can do the renaming).
- Do not expose the review-queue webhook publicly without protection; it reveals which leads are due a follow-up.

## 5. Optional: spreadsheet tracker
`google-sheets-lead-tracker.csv` mirrors the store's columns if you prefer to review leads in Google Sheets. This kit's core does not require Google Sheets, and a live Sheets integration is not part of the verified test results (see TEST_RESULTS.md).

## 6. Going live checklist
Use `setup-checklist.md`. In short: demo verified → real form connected with test data → statuses maintained → queue reviewed on your working days → backups of your n8n data enabled.
