GitHub Copilot Prompt for Creating an Email Campaign
GitHub Copilot, GitHub's AI-powered coding assistant, is not limited to writing code. Used intelligently, it becomes a formidable ally for creating complete email campaigns, from responsive HTML templates to persuasive content. By leveraging its contextual generation capabilities, you can quickly produce professional email structures, automated sequences, and A/B test variants directly in your editor. Whether you are a developer integrating transactional emails into an application or a technical marketer building custom templates, Copilot significantly accelerates the creation process. It understands conventions of popular email frameworks like MJML, React Email, or Maizzle, and can generate code compatible with major email clients. This guide provides an optimized prompt to get the most out of GitHub Copilot in designing high-performing email campaigns, with variants adapted to your expertise level and project complexity.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
Generate a complete email campaign for [PRODUCT/SERVICE] targeting [AUDIENCE]. The campaign includes 5 emails spaced over 14 days. For each email, provide: subject line (with an A/B variant), preheader, body in responsive HTML compatible with Outlook and Gmail (use tables for layout), a clear main CTA, and recommended send delay. The sequence should follow this progression: Email 1 - Welcome and value presentation, Email 2 - Education on the solved problem, Email 3 - Social proof and testimonials, Email 4 - Special offer with urgency, Email 5 - Last reminder and benefits recap. Use a [PROFESSIONAL/CONVERSATIONAL/FRIENDLY] tone and include personalization tags {{first_name}} and {{company}}. Add comments in the HTML code to facilitate later customization.
Personalize this prompt with Léa
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
This prompt works because it provides Copilot with a precise structured framework with clear technical constraints (responsive HTML, email client compatibility) and a defined narrative progression for each email. The specification of personalization tags and A/B variants guides the AI toward production-ready output. By combining marketing context with technical requirements, the prompt leverages both of Copilot's strengths: code generation and natural language understanding.
Use Cases
Variants
Expected Output
You will obtain a complete sequence of 5 emails with responsive HTML code ready to integrate into your emailing tool, including subject lines with test variants, optimized preheaders, and strategically placed CTAs. Each email will follow the defined persuasive progression and contain explanatory comments to facilitate future modifications. The code will be compatible with major email clients thanks to the use of HTML tables and inline styles.
Frequently Asked Questions
Can GitHub Copilot generate HTML emails compatible with all email clients?
GitHub Copilot generates HTML that follows email best practices (nested tables, inline styles, fallback attributes), but it's essential to test the rendering using a tool like Litmus or Email on Acid before sending. Copilot knows the constraints of Outlook, Gmail, and Apple Mail, but some specific rendering quirks require manual adjustments, especially for dark mode and background images.
How do I adapt the prompt to use an email framework like MJML or React Email?
Simply mention the framework in your prompt, for example: "Generate the code in MJML instead of raw HTML" or "Use React Email components (@react-email/components)". Copilot knows these frameworks and will adapt the syntax accordingly. MJML is recommended if you want more readable code that compiles into compatible HTML, while React Email is better suited for teams already working with a JavaScript stack.
Can Copilot be used to personalize email content based on audience segments?
Yes, by specifying the different segments and the available personalization variables in your prompt. Copilot can generate conditional blocks (like if/else statements in template languages such as Liquid or Handlebars) that display different content depending on the segment. Specify the segments in the prompt, for example: "Adapt the message for three segments: new sign-ups, active customers, customers inactive for 90 days," and Copilot will structure the variants accordingly.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
- LéaAI
Ajoutez des précisions sur la longueur cible de chaque email et le niveau de détail attendu (ex. 150-200 mots), sinon GitHub Copilot risque de générer des blocs très inégaux. Pour un meilleur taux de délivrabilité, exigez aussi un fichier texte brut en complément du HTML et limitez les images lourdes à 2 par email. Enfin, demandez des lignes d’objet ≤ 45 caractères pour éviter la troncature sur mobile.
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Similar Prompts
Customer Referral Program
Referral marketing
Prompt to Create Blog Headlines That Drive Traffic
Generates 15 blog headlines optimized for organic traffic using proven copywriting formulas, power words and varied emotional angles.
Write an SEO audit report
Communicate SEO audit results
Write personalized subject lines
Personalize subject lines at scale