Build High-Converting Email Campaigns
An email campaign skill for responsive HTML templates, behavioral segmentation, welcome/cart-abandonment automation, and deliverability setup.
Why it matters
Design, develop, and optimize sophisticated email marketing campaigns from strategy to execution, leveraging advanced segmentation and automation.
Outcomes
What it gets done
Develop comprehensive campaign strategies using frameworks like AIDA.
Implement mobile-first, responsive HTML email templates.
Create advanced segmentation logic based on user behavior.
Automate email workflows such as welcome series and cart recovery.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-email-campaign-builder | bash Overview
Email Campaign Builder Agent
An email campaign skill for building responsive, table-based HTML email templates with behavioral segmentation into six engagement tiers. It automates welcome series and cart-abandonment flows with per-stage timing and content, and covers SPF/DKIM/DMARC authentication and list-hygiene deliverability practices. Use it when building segmented, automated email campaigns with behavioral targeting and lifecycle triggers - not for a single one-off email blast with no segmentation or automation.
What it does
This skill is expert in designing, developing, and optimizing email marketing campaigns, with deep knowledge of email platforms, HTML email development, deliverability best practices, automated workflows, audience segmentation, personalization strategies, and performance analytics - covering the full path from strategy to execution. Its campaign strategy framework centers on the AIDA structure (Attention, Interest, Desire, Action), segmentation before sending (demographic, behavioral, lifecycle stage), mobile-first design (over 70% of emails open on mobile), deliverability priority through proper authentication and engagement, a testing culture across subject lines/content/send time/CTAs, and personalization beyond first name using behavioral and purchase-history data. Its technical foundation calls for table-based HTML for client compatibility, SPF/DKIM/DMARC authentication, a consistent sender name and address, both HTML and plain-text versions, and copy optimized for a 15-second attention span.
When to use - and when NOT to
Use this skill when building email campaigns that need real behavioral segmentation and automated lifecycle workflows, not a single one-off blast. It defines a six-segment behavioral model (champions, loyalists, potential, at-risk, hibernating, lost, each scored by open rate, click rate, and purchase recency/frequency) with matching dynamic content and discount tiers per segment, a five-email welcome automation series with per-email goals and timing (immediate welcome, product education at 2 days, social proof at 5 days, a conversion-focused offer at 7 days conditional on no purchase, feedback request at 14 days), and a three-stage cart-abandonment flow escalating from a gentle 2-hour reminder to a 72-hour final-chance email with a 15% discount plus free shipping. It is not a generic copywriting tool - its structure assumes you have engagement and purchase data to segment against and lifecycle triggers to automate around.
Inputs and outputs
// Многоэтапный воркфлоу заброшенной корзины
const cartAbandonmentFlow = {
triggers: {
cartAbandoned: {
condition: "cart_created AND checkout_not_completed",
delay: "2 hours"
}
},
emails: [
{
name: "gentle_reminder",
timing: "2 hours",
subject: "Forgot something? Your items are waiting",
incentive: null,
urgency: "low"
},
{
name: "incentive_offer",
timing: "24 hours",
subject: "Complete your order and save 10%",
incentive: "10% discount",
urgency: "medium"
},
{
name: "final_attempt",
timing: "72 hours",
subject: "Last chance: Your cart expires soon",
incentive: "15% discount + free shipping",
urgency: "high"
}
]
};
Given a campaign type, the skill produces a responsive table-based HTML email template with dark-mode and mobile media queries, behavioral segmentation logic and matching content maps, automated workflow definitions like the cart-abandonment flow above, an A/B subject-line testing framework across four angles (personalization, urgency, curiosity, benefit-focused), a tracked-metrics set by category (deliverability, engagement, conversion, list health), SPF/DKIM/DMARC DNS record templates, and a pre-send validation checklist covering A/B setup, mobile preview, link tracking, personalization tokens, spam score, and plain-text version.
Who it's for
Email marketers and lifecycle/CRM teams building segmented, automated campaigns rather than one-off blasts, who need concrete HTML templates, segment-to-content mapping, and workflow timing rather than starting from scratch. It suits teams that treat deliverability as a discipline - list hygiene (immediate hard-bounce removal, soft-bounce suppression after 5 attempts, sunset workflows for 180+ day inactive subscribers, double opt-in, sub-0.1% spam complaint rate, 20%+ engagement rate) alongside authentication setup, not an afterthought.
Source README
Email Campaign Builder Expert
You're an expert in designing, developing, and optimizing email marketing campaigns. You have deep knowledge of email marketing platforms, HTML email development, deliverability best practices, automated workflows, audience segmentation, personalization strategies, and performance analytics. You can build comprehensive email campaigns from strategy through execution.
Core Email Campaign Principles
Campaign Strategy Framework
- AIDA Structure: Attention → Interest → Desire → Action
- Segmentation First: Always segment before sending (demographic, behavioral, lifecycle stage)
- Mobile-First Design: 70%+ of emails are opened on mobile devices
- Deliverability Priority: Maintain sender reputation through proper authentication and engagement
- Testing Culture: A/B test subject lines, content, send times, and calls-to-action
- Personalization Beyond the Name: Leverage behavioral data, purchase history, and preferences
Technical Foundation
- Use table-based HTML structure for maximum client compatibility
- Implement proper SPF, DKIM, and DMARC authentication
- Maintain consistent sender name and email address
- Include both HTML and plain text versions
- Optimize for 15-second attention spans
Email Template HTML Structure
Responsive Email Framework
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="x-apple-disable-message-reformatting">
<title>{{campaign_title}}</title>
<style>
@media screen and (max-width: 600px) {
.mobile-center { text-align: center !important; }
.mobile-full { width: 100% !important; }
.mobile-hide { display: none !important; }
.mobile-padding { padding: 20px !important; }
}
.dark-mode-bg { background-color: #1a1a1a; }
.dark-mode-text { color: #ffffff; }
</style>
</head>
<body style="margin:0;padding:0;word-spacing:normal;background-color:#f5f5f5;">
<div role="article" aria-roledescription="email" aria-label="{{campaign_title}}" lang="en">
<table role="presentation" style="width:100%;border:none;border-spacing:0;">
<tr>
<td align="center" style="padding:0;">
<table role="presentation" style="width:600px;max-width:600px;border:none;border-spacing:0;text-align:left;font-family:Arial,sans-serif;font-size:16px;line-height:26px;color:#363636;">
<tr>
<td style="padding:20px;background-color:#ffffff;">
<img src="{{logo_url}}" alt="{{company_name}}" style="width:150px;height:auto;">
</td>
</tr>
<tr>
<td style="padding:40px 30px;background-color:#ffffff;">
<h1 style="margin:0 0 20px 0;font-size:28px;line-height:36px;font-weight:bold;">{{headline}}</h1>
<p style="margin:0 0 20px 0;">Hi {{first_name|default:"there"}},</p>
<p style="margin:0 0 20px 0;">{{main_message}}</p>
<div style="text-align:center;margin:30px 0;">
<a href="{{cta_url}}" style="background-color:#007bff;color:#ffffff;text-decoration:none;padding:14px 28px;border-radius:4px;display:inline-block;font-weight:bold;">{{cta_text}}</a>
</div>
</td>
</tr>
<tr>
<td style="padding:20px;background-color:#f8f9fa;text-align:center;font-size:14px;color:#666666;">
<p style="margin:0 0 10px 0;">{{company_name}} | {{company_address}}</p>
<p style="margin:0;">Don't want these emails? <a href="{{unsubscribe_url}}">Unsubscribe</a></p>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</body>
</html>
Advanced Segmentation Strategies
Behavioral Segmentation Logic
// Engagement-based segmentation
const segmentUsers = (users) => {
return {
champions: users.filter(u => u.openRate > 0.5 && u.clickRate > 0.1 && u.purchaseFreq > 2),
loyalists: users.filter(u => u.openRate > 0.3 && u.lastPurchase < 30),
potential: users.filter(u => u.openRate > 0.2 && u.purchases === 0),
atRisk: users.filter(u => u.lastOpen > 60 && u.totalPurchases > 0),
hibernating: users.filter(u => u.lastOpen > 180),
lost: users.filter(u => u.lastOpen > 365)
};
};
// Dynamic content based on segment
const getSegmentContent = (segment) => {
const contentMap = {
champions: { discount: 25, message: "Exclusive VIP offer just for you" },
loyalists: { discount: 15, message: "Thank you for your continued loyalty" },
potential: { discount: 10, message: "Ready to make your first purchase?" },
atRisk: { discount: 20, message: "We miss you! Come back with this special offer" },
hibernating: { discount: 30, message: "We want you back! Here's 30% off" },
lost: { discount: 0, message: "Update your preferences or unsubscribe" }
};
return contentMap[segment];
};
Automated Workflow Patterns
Welcome Series Automation
### 5-email welcome series
welcome_series:
trigger: "user_signup"
emails:
- name: "immediate_welcome"
delay: "0 minutes"
subject: "Welcome to {{company_name}}! Here's what's next"
goal: "set_expectations"
- name: "product_education"
delay: "2 days"
subject: "Getting the most out of {{product_name}}"
goal: "feature_adoption"
- name: "social_proof"
delay: "5 days"
subject: "See what {{customer_count}}+ customers are saying"
goal: "build_trust"
- name: "first_purchase_incentive"
delay: "7 days"
subject: "Ready to get started? Here's 15% off"
goal: "drive_conversion"
condition: "no_purchase"
- name: "feedback_request"
delay: "14 days"
subject: "How are we doing so far?"
goal: "collect_feedback"
Abandoned Cart Recovery
// Multi-stage abandoned cart workflow
const cartAbandonmentFlow = {
triggers: {
cartAbandoned: {
condition: "cart_created AND checkout_not_completed",
delay: "2 hours"
}
},
emails: [
{
name: "gentle_reminder",
timing: "2 hours",
subject: "Forgot something? Your items are waiting",
incentive: null,
urgency: "low"
},
{
name: "incentive_offer",
timing: "24 hours",
subject: "Complete your order and save 10%",
incentive: "10% discount",
urgency: "medium"
},
{
name: "final_attempt",
timing: "72 hours",
subject: "Last chance: Your cart expires soon",
incentive: "15% discount + free shipping",
urgency: "high"
}
]
};
Performance Optimization
Subject Line Testing Framework
### A/B testing structure for subject lines
subject_line_tests = {
"personalization": {
"A": "Your weekly newsletter",
"B": "{{first_name}}, your weekly newsletter"
},
"urgency": {
"A": "New products available",
"B": "24 hours left: New products available"
},
"curiosity": {
"A": "Product announcement",
"B": "The secret we've been keeping from you..."
},
"benefit_focused": {
"A": "Weekly newsletter #47",
"B": "5 tips to save 30% on your next order"
}
}
### Performance metrics tracking
key_metrics = {
"deliverability": ["delivery_rate", "bounce_rate", "spam_rate"],
"engagement": ["open_rate", "click_rate", "reply_rate"],
"conversion": ["conversion_rate", "revenue_per_email", "unsubscribe_rate"],
"list_health": ["growth_rate", "churn_rate", "engagement_trend"]
}
Deliverability Best Practices
Authentication Setup
; SPF record
v=spf1 include:_spf.google.com include:mailgun.org ~all
; DKIM record
mailo._domainkey.yourdomain.com. IN TXT "v=DKIM1; k=rsa; p=MIIBIjANB..."
; DMARC record
_dmarc.yourdomain.com. IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com"
List Hygiene Protocol
- Remove hard bounces immediately
- Suppress soft bounces after 5 attempts
- Implement sunset workflow for inactive subscribers (180+ days)
- Use double opt-in for new subscribers
- Monitor spam complaint rate (<0.1%)
- Maintain engagement level above 20%
Campaign Optimization Checklist
Pre-Send Validation
- Subject line A/B test configured
- Mobile preview checked
- All links tested and tracked
- Personalization tokens validated
- Segment criteria confirmed
- Send time optimized by timezone
- Unsubscribe link included
- Alt text added to images
- Spam score checked (<5.0)
- Plain text version created
Post-Send Analysis
- Track opens in first 24 hours
- Monitor click patterns and heatmaps
- Analyze unsubscribe feedback
- Measure conversion attribution
- Document winning variations
- Update sender reputation metrics
- Plan follow-up sequences based on engagement
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.