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

Answer 3 questions and Léa tailors the prompt to your situation.

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 2500+ 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

GitHub Copilot Prompt for Creating Illustrations

GitHub Copilot, initially designed as a programming assistant, proves to be a remarkable tool for generating code to create illustrations

GitHub Copilot Prompt for Creating Infographics

GitHub Copilot, the AI-powered coding assistant, proves to be a formidable ally for generating SVG, HTML, and CSS code to create infographics.

GitHub Copilot Prompt for Creating Mockups

GitHub Copilot, GitHub's AI-powered code assistant, proves to be a formidable tool for creating mockups directly in your code editor.

GitHub Copilot Prompt for Extracting Data Insights

GitHub Copilot, the AI coding assistant integrated into IDEs, is a powerful ally for extracting insights from raw data. Whether you are working with CSV files, SQL databases, or pandas DataFrames, Copilot can quickly generate exploratory analysis, visualization, and statistical summary code. The main challenge lies in crafting the prompt: a well-structured prompt allows Copilot to produce relevant analysis code on the first try, without unnecessary iterations. By clearly specifying the data format, the metrics you're looking for, and the type of visualization desired, you turn Copilot into a true data analyst capable of detecting trends, anomalies, and hidden correlations in your datasets. This page offers an optimized main prompt as well as variants tailored to your skill level, to get the most out of GitHub Copilot in your data analysis workflows.

GitHub Copilot Prompt for Generating Advertising Visuals

GitHub Copilot, the AI-powered coding assistant, is not limited to classic code generation. It can also help you create powerful visuals...

GitHub Copilot Prompt for Optimizing SEO

GitHub Copilot, the AI-powered code assistant from GitHub, has become an essential tool for developers looking to optimize the natural referencing of their web projects. Beyond simple code completion, Copilot can generate optimized meta tags, structure schema.org data, create dynamic sitemaps, and implement technical SEO best practices directly in your codebase. By formulating precise prompts in your editor, you can automate the creation of SEO-friendly components, generate appropriate robots.txt files, optimize server-side rendering, and implement lazy loading to improve Core Web Vitals. This programmatic approach to SEO ensures technical consistency across your entire site, eliminates human errors, and significantly accelerates the deployment of optimizations. Whether you're working on a static site, a Next.js application, or an e-commerce project, the following prompts will enable you to fully leverage GitHub Copilot to transform your natural referencing.

Go further

Get new prompts every week

Join our newsletter.