Clean Lead Form
Customizable fields for company name, email, phone, and message with client and server-side validation
A simple, GDPR-compliant form that sends leads straight to your existing tools. No expensive subscriptions, no feature overload.
A lightweight, GDPR-compliant lead capture form system for B2B SaaS businesses that collects prospect information and forwards it to existing marketing workflows via SendGrid confirmation emails and Zapier webhooks.
Customizable fields for company name, email, phone, and message with client and server-side validation
Explicit opt-in checkbox with recorded timestamp and IP address for EU compliance documentation
Automatic confirmation email sent to leads using your SendGrid account for double opt-in workflows
Every submission POSTs to your Zapier webhook URL for integration with your existing automation stack
Protected endpoint to download all leads as CSV with consent metadata for your records
Standalone form page that can be embedded via iframe on your marketing site
Next.js 15 App Router application with server-side form handling. The system uses a single PostgreSQL table (via Vercel Postgres) to store lead submissions with consent tracking. Form submissions trigger two parallel actions: a SendGrid transactional email for double opt-in confirmation, and a Zapier webhook POST for downstream automation. All data collection includes explicit GDPR consent checkboxes and timestamps. The UI is a single embeddable form page plus a minimal admin view for lead export. No authentication required for form submission; admin routes protected by a simple shared secret for alpha phase.
Project setup, database schema, environment configuration, and basic form UI
Server action for form submission, validation, GDPR consent recording, and database storage
SendGrid email dispatch and Zapier webhook forwarding on successful submission
Protected admin route with lead list view and CSV export functionality
Error handling, loading states, mobile responsiveness, and Vercel deployment
Receives form submission, validates data, stores lead, triggers SendGrid email and Zapier webhook
Returns all leads as CSV file, protected by admin secret header
Handles double opt-in confirmation link clicks from email
Simple health check endpoint for monitoring uptime
1. Clone repository and run npm install 2. Create Vercel Postgres database from Vercel dashboard 3. Copy .env.example to .env.local and fill in all required variables 4. Run npx prisma db push to create the Lead table 5. Verify SendGrid API key and authenticated sender email 6. Test Zapier webhook URL with a manual POST request 7. Run npm run dev to test locally 8. Deploy to Vercel via git push or vercel CLI 9. Set all environment variables in Vercel project settings 10. Test end-to-end: submit form, check database, verify email received, confirm Zapier trigger
• Verify SendGrid sender email is authenticated before deployment
• Test Zapier webhook with sample payload to confirm field mapping
• Set ADMIN_SECRET to a strong random string, share only with authorized team members
• For iframe embedding, ensure parent domain is added to CSP headers if needed
• Database indexes on email and createdAt fields recommended for export performance
• Consider rate limiting /api/leads in production to prevent spam submissions
Vercel Postgres connection string for lead storage
SendGrid API key for sending confirmation emails
Verified sender email address for SendGrid
Your Zapier webhook endpoint URL for lead forwarding
Shared secret for protecting admin export endpoint
Public URL for generating confirmation links in emails
Every submission requires an explicit consent checkbox. We record the consent timestamp and IP address, and store this metadata alongside the lead for your compliance records.
The alpha includes standard B2B fields. Field customization can be added by modifying the form schema in the codebase.
Each submission triggers a POST to your Zapier webhook URL with the full lead payload. From there, Zapier can route to your CRM, spreadsheet, or any connected app.
Leads are always saved to the database first. Integration failures are logged but don't block storage, so you never lose a lead.
No artificial limits. Throughput depends on your Vercel plan and database connection limits.