计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
email-newsletter-builder【效率与协作】Generate professional HTML email newsletters compatible with Gmail and Outlook. Creates table-based layouts with inline CSS for reliable rendering. Use it when asked to "build a newsletter," "create an email template," or draft a marketing, internal, or digest email.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate professional HTML email newsletters fully compatible with Gmail, Outlook, Apple Mail, and other major email clients. Uses table-based layout with inline CSS to ensure consistent rendering across all clients.
The layout field is a semantic tag indicating the intended purpose of the email, helping you choose the right combination of sections. The actual email structure is determined by the module types in the sections array.
| Layout Tag | Recommended Sections | Best For |
|---|---|---|
single-column | hero_banner + text + cta | General newsletters, announcements |
two-column | two_column + image_text | Product comparisons, side-by-side image/text |
hero | hero_banner + text + cta | Marketing emails, event invitations |
digest | Multiple article_card | Content digests, article roundups |
| Module Type | Description |
|---|---|
hero_banner | Full-width banner image with optional overlay title text |
text | Plain text paragraph with optional heading |
image_text | Image and text side by side |
cta | Call-to-action button |
divider | Horizontal separator line |
quote | Blockquote |
article_card | Article card (image + title + excerpt + link) |
two_column | Two-column content area |
Collect the following information from the user:
Based on user requirements, create a JSON configuration file. The format is as follows:
{
"layout": "single-column",
"theme": {
"primary_color": "#2563EB",
"secondary_color": "#1E40AF",
"accent_color": "#F59E0B",
"bg_color": "#F3F4F6",
"content_bg_color": "#FFFFFF",
"text_color": "#1F2937",
"muted_text_color": "#6B7280",
"font_family": "Arial, Helvetica, sans-serif",
"max_width": 600
},
"header": {
"logo_url": "",
"logo_alt": "Company",
"title": "Newsletter Title",
"subtitle": ""
},
"preheader": "Preview text shown in the inbox list",
"sections": [
{
"type": "text",
"title": "Section Title",
"body": "Section content in HTML or plain text."
}
],
"footer": {
"company": "Company Name",
"address": "Company Address",
"unsubscribe_url": "#",
"extra_links": [
{"text": "Website", "url": "#"}
]
}
}
Write the configuration to a temporary JSON file, then run the generation script:
python scripts/generate_newsletter.py --input config.json --output newsletter.html
{
"type": "hero_banner",
"image_url": "https://example.com/hero.jpg",
"title": "Welcome to Our Newsletter",
"subtitle": "Monthly updates and insights",
"overlay_color": "rgba(0,0,0,0.4)"
}
{
"type": "text",
"title": "Section Heading",
"body": "Paragraph content. Supports <b>bold</b>, <i>italic</i>, <a href='#'>links</a>."
}
{
"type": "image_text",
"image_url": "https://example.com/photo.jpg",
"image_alt": "Description",
"image_position": "left",
"title": "Feature Title",
"body": "Feature description text.",
"cta_text": "Learn More",
"cta_url": "#"
}
{
"type": "cta",
"text": "Get Started Now",
"url": "#",
"align": "center"
}
{
"type": "divider",
"color": "#E5E7EB",
"spacing": 20
}
{
"type": "quote",
"text": "This is a quoted text block.",
"author": "Author Name"
}
{
"type": "article_card",
"image_url": "https://example.com/thumb.jpg",
"title": "Article Title",
"excerpt": "Brief summary of the article...",
"url": "#",
"cta_text": "Read More"
}
{
"type": "two_column",
"left": {
"title": "Left Column",
"body": "Left content"
},
"right": {
"title": "Right Column",
"body": "Right content"
}
}
The generated HTML follows these email compatibility best practices:
<table> instead of <div> for Outlook compatibilitystyle attributes to prevent <style> tags from being stripped by email clientsbgcolor attributes and background-color styleshttps://placehold.co/600x300/EEE/333?text=Your+Image as a placeholder