# F6 — Lead Magnet Generator

_Lead Generation_

One prompt → 6 generated assets: long-form content (Markdown), branded PDF (Playwright), landing page (SitePage), capture form (Form), thank-you email (MessageTemplate), and a 3-step nurture drip (DripSequence triggered by the form submission). Each asset deep-links to its native editor (Web Studio, Forms, Templates, Drips) so you can refine post-generation.

## Steps
1. Go to Tools > Lead Generation > Lead Magnets (or /dashboard/leadgen/magnets).
2. Click "+ New magnet". Enter a topic ("The 2026 SaaS Pricing Playbook"), audience description, format (guide / checklist / report / template / toolkit), and target page count.
3. Submit. Generation runs INLINE in the request handler (typical 25-60s). The page shows a loading state — don't close the tab.
4. When done, you get back the magnet record with 5 asset IDs filled in. Each one is a working surface in its own editor: edit the PDF source markdown in Lead Magnets, edit the landing page in Web Studio, edit the form fields in Forms, edit the thank-you email in Templates, edit the drip in Marketing.
5. Click Publish to flip status from "ready" to "published" — that activates the landing page and the capture form. Until you publish, the magnet exists but isn't live.
6. View stats per magnet: page views, form submissions, drip enrollments, click-through rates.

## Tips
- Generation pipeline (each step logged): Sonnet writes content (heavy tier) → Playwright renders branded PDF → BYOS uploadFile stores it → Form created → SitePage created → MessageTemplate created → DripSequence created with triggerType=form_submitted.
- BYOS storage: the PDF lands in your connected storage provider (Google Drive / OneDrive / S3 / etc.) — you keep the file.
- Suite gating + role gating: only OWNER and ADMIN can generate magnets (ships internal-quality content with your brand).
- Per-request timeout extended to 5 minutes for generation — if you hit a timeout, your network was probably the problem (regenerate; previous attempt is auto-cleaned up).

## Example
A B2B agency wants a top-of-funnel asset live by end of week. Tuesday at 3pm: prompt "The 2026 RevOps Tech Stack Audit Workbook" + audience "RevOps managers at 100-500 employee SaaS companies" + 12 pages. 47 seconds later: branded PDF in their Google Drive, landing page at /lead-magnets/2026-revops-stack-audit, capture form (email + role + team size), thank-you email queued, 3-step drip (day 0 / day 3 / day 7) ready. Launch on LinkedIn Wednesday morning → 91 downloads → 24 sales-qualified meetings booked over the next 30 days.

## Troubleshooting
- **Generation timed out** — Heavy AI content step or PDF render took longer than the 5-min timeout (rare). Usually a network blip or transient AI provider hiccup. Fix: Magnet status flips to "failed" with an error message. Re-submit — partial assets from the failed attempt are not re-used (no double-charge for AI tokens beyond the failed step).
- **PDF looks plain — no logo or brand colors** — Org branding isn't configured — brand colors under Settings > Customize > Brand Colors, logo under Settings > Account > Organization. Fix: Upload a logo + set brand colors. Re-generate the magnet (or just regenerate the PDF from the magnet detail page if that's exposed).
- **Drip didn't fire when someone submitted the form** — The drip's isActive is false (forgot to publish the magnet), OR the drip got deleted manually. Fix: Publish the magnet (status → published) — that activates the drip. If the drip was deleted, regenerate the magnet.

## Plans
Core (Lead Gen is included on every plan) + OWNER/ADMIN role. Per-month magnet generation caps: Starter 1, Pro 5, Max unlimited. Marketing suite removes the cap. The credit is burned up-front (failed generations are not refunded — matches every other AI feature). AI tokens drawn from your monthly allocation (heavy tier for content step).
