P

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 embedding transactional emails in an application or a technical marketer building custom templates, Copilot significantly accelerates the creation process. It understands the 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 effective email campaigns, with variants adapted to your expertise level and project complexity.

The prompt

GitHub Copilot

Generate a complete email campaign for [PRODUCT/SERVICE] targeting [AUDIENCE]. The campaign includes 5 emails spaced over 14 days. For each email, provide: the subject line (with an A/B variant), preheader, responsive HTML body compatible with Outlook and Gmail (use tables for layout), a clear main CTA, and recommended send timing. The sequence should follow this progression: Email 1 - Welcome and value proposition, Email 2 - Education on the problem solved, Email 3 - Social proof and testimonials, Email 4 - Special offer with urgency, Email 5 - Final reminder and benefit recap. Use a [PROFESSIONAL/CONVERSATIONAL/FRIENDLY] tone and integrate 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 it 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. Specifying personalization tags and A/B variants steers the AI toward a directly production-ready output. By combining marketing context and technical requirements, the prompt leverages both of Copilot's strengths: code generation and natural language understanding.

Expected result

You will get a complete sequence of 5 emails with responsive HTML code ready to integrate into your email 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 for easy future modifications. The code will be compatible with major email clients thanks to the use of HTML tables and inline styles.

Variants by level

FAQ

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 is essential to test rendering with a tool like Litmus or Email on Acid before sending. Copilot is aware of constraints for Outlook, Gmail, and Apple Mail, but certain rendering specifics 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 add the framework name 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 using a JavaScript stack.
Can I use Copilot to personalize email content based on audience segments?
Yes, by specifying in your prompt the different segments and available personalization variables. Copilot can generate conditional blocks (like if/else 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 subscribers, active customers, customers inactive for 90 days', and Copilot will structure the variants accordingly.

Related prompts

How to use this prompt

  1. Copy the prompt with the button above.
  2. Paste it into ChatGPT, Claude or your favorite AI assistant.
  3. Replace the bracketed variables with your details, then refine the result.

About Prompt Guide

Prompt Guide is a free library of 4800+ ready-to-use prompts for ChatGPT, Claude and other AIs, with guides to learn prompting and tools to build and optimize your own prompts.

More prompts to explore

Go further

Get new prompts every week

Join our newsletter.