Build a Lead Magnet Delivery System with n8n in 30 Minutes
Quick win: Automate your lead magnet delivery in 30 minutes. No code needed, works with any opt-in form.
This replaces ConvertKit ($29/month) with n8n (free) + SendGrid (free up to 100/day).
What You’ll Build
The system:
- Someone fills out your opt-in form
- n8n captures their email instantly
- SendGrid sends lead magnet PDF automatically
- Contact added to Google Sheets for tracking
- Slack notification for every new subscriber
What you need:
- n8n (self-hosted or Cloud)
- SendGrid account (free tier: 100 emails/day)
- Google Sheets
- Your lead magnet PDF
Time to set up: 30 minutes Monthly cost: $0 (under 100 leads/day)
Step 1: Create Opt-in Form
Option A: Simple HTML form
<form id="leadForm">
<input type="email" name="email" placeholder="Your email" required>
<input type="text" name="name" placeholder="Your name" required>
<button type="submit">Get Free Guide</button>
</form>
<script>
document.getElementById('leadForm').addEventListener('submit', async (e) => {
e.preventDefault();
const formData = new FormData(e.target);
const data = Object.fromEntries(formData);
await fetch('YOUR_N8N_WEBHOOK_URL', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(data)
});
alert('Check your email for the download link!');
e.target.reset();
});
</script>
Option B: Use existing form plugin
- WordPress: Contact Form 7, WPForms
- Webflow: Native forms
- DashNex: Built-in forms
Just point form submissions to n8n webhook (step 2).
Step 2: Set Up n8n Webhook
In n8n:
- Create new workflow
- Add “Webhook” node
- Set method: POST
- Copy webhook URL
Webhook URL looks like:
https://your-n8n.com/webhook/lead-magnet
Test it:
curl -X POST https://your-n8n.com/webhook/lead-magnet \
-H "Content-Type: application/json" \
-d '{"email":"[email protected]","name":"Test User"}'
Should see success in n8n execution log.
Step 3: Configure SendGrid
Create SendGrid account:
- Sign up at sendgrid.com (free tier)
- Verify your sender email
- Create API key (Settings → API Keys)
- Copy API key for n8n
Create email template:
- Go to Email API → Dynamic Templates
- Create new template
- Add template version
- Design email with lead magnet link
Template variables:
- {{name}}` - Subscriber’s name
- {{downloadUrl}}` - Link to PDF
Example template:
Hi \{\{name\}\},
Thanks for subscribing! Here's your free guide:
[Download Now](\{\{downloadUrl\}\})
Questions? Just reply to this email.
Mike
Copy template ID (looks like: d-abc123...)
Step 4: Build n8n Workflow
Workflow structure:
Webhook → Function (prepare data) → SendGrid (send email) → Google Sheets (log) → Slack (notify)
Node 1: Webhook
Already set up in Step 2.
Node 2: Function Node
Prepare data for SendGrid:
return [
{
json: {
email: $json.email,
name: $json.name,
downloadUrl: 'https://yoursite.com/lead-magnet.pdf',
timestamp: new Date().toISOString()
}
}
];
Node 3: SendGrid Node
Add SendGrid credentials:
- API Key: (from Step 3)
Configure node:
- From Email: [email protected]
- To Email: {{$json.email}}`
- Template ID: (from Step 3)
- Dynamic Template Data:
{ "name": "=\{\{$json.name\}\}", "downloadUrl": "=\{\{$json.downloadUrl\}\}" }
Node 4: Google Sheets Node
Add to spreadsheet:
- Operation: Append
- Sheet: Lead Magnet Subscribers
- Columns:
- Email: {{$json.email}}`
- Name: {{$json.name}}`
- Date: {{$json.timestamp}}`
Node 5: Slack Node (Optional)
Send notification:
- Channel: #marketing
- Message: New lead: {{$json.name}} ({{$json.email}})
Step 5: Host Your Lead Magnet
Option 1: Public hosting (easiest)
- Upload PDF to your website:
yoursite.com/lead-magnet.pdf - Anyone with link can download
- Good for: Non-sensitive content
Option 2: Signed URLs (more secure)
- Store PDF on S3/DigitalOcean Spaces
- Generate temporary download URL in n8n
- Link expires after 24 hours
- Good for: Premium content
Option 3: Email attachment
- Attach PDF directly in SendGrid
- Larger email size (watch limits)
- Good for: Small files (<1MB)
My recommendation: Start with Option 1, upgrade to Option 2 if needed.
Testing Your Workflow
Test checklist:
- ✅ Submit form with real email
- ✅ Check n8n execution (should be green)
- ✅ Verify email received within 1 minute
- ✅ Click download link (should work)
- ✅ Check Google Sheet (row added)
- ✅ Check Slack (notification sent)
Common issues:
“Email not received”
- Check SendGrid Activity Feed
- Verify sender email is verified
- Check spam folder
- Ensure template ID is correct
“Webhook not triggered”
- Test webhook URL with curl
- Check CORS headers if from browser
- Verify form is actually submitting
“Download link broken”
- Verify PDF URL is accessible
- Check for typos in URL
- Test in incognito window
Upgrade: Add Welcome Sequence
Want to send 3 emails instead of 1?
Add after SendGrid node:
- Wait node: 1 day
- SendGrid node: Email 2 (tips for using lead magnet)
- Wait node: 3 days
- SendGrid node: Email 3 (offer for paid product)
Welcome sequence timing:
- Email 1: Immediate (lead magnet)
- Email 2: +1 day (helpful tips)
- Email 3: +4 days (soft pitch)
This typically converts at 2-3% to paid offers.
Cost Breakdown
Free tier (under 100 leads/day):
- n8n: $0 (self-hosted) or $20/month (Cloud)
- SendGrid: $0 (up to 100 emails/day)
- Google Sheets: $0
- Slack: $0
- Total: $0-20/month
Growing (100-1000 leads/day):
- n8n: $0-20/month (same)
- SendGrid Essentials: $19.95/month (up to 50K emails/month)
- Total: $19.95-39.95/month
Compare to ConvertKit:
- 0-1,000 subscribers: $29/month
- 1,000-3,000: $49/month
- 3,000-5,000: $79/month
Savings with n8n: $29-79/month = $348-948/year
Downloadable Workflow
I’ve created a ready-to-use workflow template you can import into n8n.
What’s included:
- Complete workflow JSON
- SendGrid template HTML
- Example opt-in form code
- Setup instructions
To use:
- Download workflow JSON from this link
- Import into n8n (Settings → Import)
- Update credentials
- Activate workflow
Customize:
- Change email template
- Add your lead magnet URL
- Adjust welcome sequence timing
- Connect your CRM instead of Sheets
Advanced: Track Conversion Rate
Want to know how many leads turn into customers?
Add tracking:
- Include unique ID in download URL
- Track who clicks download link
- Tag customers in your CRM
- Calculate conversion rate weekly
n8n workflow addition:
Download clicked → HTTP Request (log click) → Update Google Sheet → Check if purchased
This tells you which lead magnets convert best.
Real Results
My lead magnet stats (90 days):
- 487 opt-ins
- 94% email delivery rate
- 78% download rate
- 11 sales from follow-up sequence
- 2.26% conversion rate
Revenue generated: $1,287 Cost of system: $0 (under SendGrid free tier) ROI: Infinite
Next Steps
- Set up SendGrid account (5 minutes)
- Create lead magnet (if you don’t have one)
- Build n8n workflow (15 minutes)
- Test with your own email (5 minutes)
- Add opt-in form to website (5 minutes)
- Drive traffic (the hard part)
Need n8n hosting? Read my n8n deployment guide.
FAQ
Q: Can this work with MailChimp instead of SendGrid?
Yes! n8n has a MailChimp node. Setup is similar.
Q: What if I get more than 100 signups per day?
Upgrade SendGrid to Essentials ($19.95/month for 50K emails/month).
Q: Can I segment subscribers?
Yes! Add tags in Google Sheets or use Airtable for more advanced segmentation.
Q: How do I handle unsubscribes?
SendGrid handles this automatically. They’ll be marked as unsubscribed and won’t receive future emails.
Q: Can I use this for a course or membership?
Yes! Just replace the PDF link with your course/membership login page.
About the author: I’m Mike Holownych, an automation consultant. I’ve set up lead magnet systems for 50+ entrepreneurs. Learn more →
More Posts You'll Love
Based on your interests and activity