Easiest
Ask the AI assistant
Visual
Use a pre-built section
For developers
Build from scratch
Option 1: Ask the AI Assistant
Review and refine
The AI adds the form, creates the table if it doesn’t exist, and wires up the API handler. Ask for tweaks:
- “Make it a two-column layout”
- “Add a consent checkbox”
- “Show a thank-you message inline instead of redirecting”
Option 2: Use a Pre-Built Section
Drag and drop
Drag a newsletter section onto the page where you want it — footer, sidebar, end-of-post.
Configure the fields
Click the section to open the inspector. Adjust:
- Headline and subtext
- Field labels (Name, Email)
- Button text
- Thank-you message
- Styling (background, button color)
Option 3: Build From Scratch
If you want full control, you can write the form component directly.Write the API handler
Create an API route at
/api/subscribe that:- Validates email format
- Inserts into
newsletter_subscribers - Sends a confirmation email (if using double opt-in)
- Returns JSON (
{ success: true }or error)
Sync to your ESP
Use a workflow to push new subscribers to your email service. See Connect Mailchimp for the pattern.
Double Opt-In
Double opt-in is strongly recommended — it boosts deliverability, filters typos, and is required in several jurisdictions (Germany, Canada). Flow:- User submits form → row created with
confirmed_at = NULL - Send confirmation email with a tokenized link
- User clicks link → GET
/api/confirm?token=...→ updateconfirmed_at = now() - Only subscribers with
confirmed_at IS NOT NULLcount as “active”
GDPR-Compliant Patterns
- Explicit consent checkbox, not pre-checked
- Clear privacy policy link next to the submit button
- Unsubscribe link in every email you send
- Data export and delete path (users can request their data or deletion)
Form Placement Best Practices
| Placement | Intent | Notes |
|---|---|---|
| Footer | Low | Always present, low friction |
| Exit intent popup | High | Right moment, but annoying if overused |
| End of blog post | High | Reader just finished your content |
| Sidebar | Medium | Consistent visibility on scroll |
| Dedicated landing | Very high | Best for paid traffic |
Incentive Options
Asking for an email without a reason is a hard sell. Offer something:- Lead magnet — PDF checklist, template, mini-guide
- Discount code — 10% off first purchase
- Early access — beta features, new products
- Content upgrade — extended version of the blog post they just read
Syncing to Your Marketing List
Raw subscribers in your database aren’t enough — you need them in your email tool (Mailchimp, ConvertKit, etc.) to actually send to them. See:- Connect Mailchimp
- Connect Zapier for other ESPs
Verify It Worked
- Submit the form with a test email
- Check the
newsletter_subscriberstable — the row should be there - If using double opt-in, confirm the confirmation email arrives
- Click the confirmation link —
confirmed_atshould populate - Check your ESP (Mailchimp, etc.) — the subscriber should appear in your audience
Troubleshooting
Form submits but nothing saves
Form submits but nothing saves
The API route is erroring. Open browser DevTools > Network tab, submit the form, and look at the
/api/subscribe response. Common causes: database connection error, unique constraint violation (email already exists), validation failure.Confirmation email isn't being sent
Confirmation email isn't being sent
SMTP isn’t configured or the sender domain isn’t verified. Go to Settings > Email — you should see a green checkmark next to your sender domain. If not, see Send Emails for the setup.
Duplicate subscriptions for the same email
Duplicate subscriptions for the same email
Add a Handle the resulting error in your API handler — treat it as a successful subscribe (user is already on the list).
UNIQUE constraint on the email column if you haven’t:Spam signups flooding the list
Spam signups flooding the list
Bots are filling your form. Add a honeypot field (hidden input; real users don’t fill it, bots do) or reCAPTCHA on the form. If volume is extreme, add rate limiting by IP.
Subscribers not syncing to Mailchimp/ESP
Subscribers not syncing to Mailchimp/ESP
The sync workflow isn’t running or is erroring. Go to Workflows > Runs and inspect recent runs. If none exist, the trigger isn’t wired. If they exist but fail, check the error message — usually a bad API key or wrong audience ID.
What’s Next?
Connect Mailchimp
Sync subscribers to your email marketing tool
Welcome Sequence
Send a welcome email series to new subscribers