Series: The B2B Marketing Automation Playbook
Part 6: Bonus - Read Part 1: Stop Using Your MAP Like an Email Platform | Part 2: The Campaign Playbook | Part 3: The Five-Tier Maturity Model | Part 4: Email Deliverability | Part 5: Platform Comparison
TL;DR
Every major marketing automation platform has its own code conventions, tracking scripts, and design restrictions. Some of those constraints are reasonable. Some are genuinely limiting, and working around them manually is slow. This article covers how artificial intelligence (AI) tools (primarily large language model (LLM) assistants like Claude, ChatGPT, and Cursor) can close the gap between what you want your email to do and what your platform will let it do. We cover platform-specific code constraints, then walk through seven practical AI-assisted workflows: formatting fixes, code compression, device-specific content sections, automated alt text, automated UTM tagging, hover effects and interactive elements, and advanced features including Google sender profiles and product card code.
The Problem Nobody Talks About in Email Design
Most email marketing content focuses on copy, subject lines, and send time. The stuff that actually breaks campaigns quietly in the background gets far less coverage: the fact that email HTML is its own ecosystem, operating under constraints that have no equivalent in web development, and that every major marketing automation platform adds another layer of proprietary requirements on top of the base email client challenge.
If you have ever tried to use a web designer's Figma export directly in Pardot's email builder, you already know what this feels like. If you have tried to add a custom hover effect to a button in Marketo and found it stripped on send, you have been there too. Here is the reality of what you are working with.
Part 1: Platform Code Constraints: What You Are Actually Dealing With
Munchkin and Marketo's Tracking Layer
Marketo's Munchkin tracking script is one of the most recognized pieces of code in B2B marketing operations. It sits on your website and in your Marketo-hosted landing pages, tracking visitor activity and associating it with known leads in your Marketo database. When it works correctly, it is invisible. When it does not, it is a debugging headache.
The challenge for email specifically is that Munchkin is not designed for email environments. Email clients strip or sandbox JavaScript by default: every major client (Gmail, Outlook, Apple Mail) does this for security reasons. Munchkin relies on JavaScript, which means any Munchkin-based tracking you attempt to build into an email body will not fire in the inbox.
What Marketo uses instead is pixel-based tracking via image requests and link redirects. Every link in a Marketo email is wrapped in a Marketo tracking redirect URL before the email goes out. This redirect logs the click and then forwards the recipient to the intended destination. It works, but it has two practical implications:
- Your raw email HTML, if designed outside Marketo and then imported, needs to be compatible with Marketo's link-wrapping process. Links with unusual formatting, JavaScript onclick handlers, or certain anchor tag structures can break the redirect wrapping and result in untracked or broken links.
- Email preheader and plain-text versions, if not carefully managed, can expose Marketo's redirect URLs to recipients, which looks unprofessional and can trigger spam filters.
The takeaway: email code written for Marketo needs to be clean, standards-compliant, and tested specifically in a Marketo send environment, not just in a browser preview.
Pardot's Email Builder Limitations
Pardot's email builder has historically been one of the most constrained in the enterprise marketing automation platform (MAP) market. The Lightning email builder (the current default) improved significantly over the legacy builder, but it still imposes meaningful restrictions on what a designer can achieve without going directly into the HTML source. The specific constraints that affect design quality include:
- Limited layout flexibility. The drag-and-drop interface works from a column grid. Multi-column layouts with mixed-width sections, layered background images, or non-standard padding behavior often require direct HTML/CSS overrides that the visual editor does not expose.
- CSS scoping. Pardot's builder scopes inline styles to individual elements. Global CSS rules, style blocks in the head, and media queries can be added via the raw HTML editor, but they may be partially stripped or overridden by Pardot's own wrapper styles on send.
- Image hosting. Pardot hosts uploaded images on its own CDN. Images you reference from external URLs may work in preview but can flag deliverability issues or fail in certain email clients. For anything production-quality, images need to be uploaded to Pardot's asset manager, which adds steps to the production workflow.
- Template locking. Pardot templates support locked and unlocked regions, a feature designed so marketing ops teams can control what content marketers can and cannot edit. This is genuinely useful for governance, but if the locked regions are set incorrectly during template build, they can prevent even administrators from making layout changes without rebuilding from scratch.
The practical result: sophisticated Pardot email designs almost always require someone comfortable working directly in HTML source code. The visual builder gets you 60-70% of the way there. The rest requires manual code work.
AMP Email Support: What Is Actually Available
Accelerated Mobile Pages for Email (AMP Email, or text/x-amp-html) is an email format standard that allows certain interactive behaviors inside the inbox itself: real-time data updates, carousels, accordions, form submissions, and shopping cart-style interactions. It is supported by Gmail (desktop and mobile), Yahoo Mail, and a limited set of other clients. The important caveats before you invest in building AMP email:
Outlook does not support AMP email. In most B2B markets, Outlook accounts for a significant portion of inboxes, particularly in enterprise and financial services environments. Any AMP email needs a well-designed fallback for non-AMP-supporting clients, which means maintaining two versions of the same content within a single send.
Your marketing automation platform may not support AMP sends. As of 2026, AMP email send support varies:
- HubSpot Marketing Hub: No native AMP email support. AMP code is stripped on send.
- Marketo Engage: AMP send support is available but requires specific configuration and is not enabled by default.
- Pardot (Marketing Cloud Account Engagement): No native AMP email support.
- Oracle Eloqua: Limited AMP support through advanced configuration.
Sending AMP email from platforms that strip it is not dangerous: the send just falls back to the HTML version silently. But if you are designing AMP-specific interactive elements, you need to verify your platform supports the text/x-amp-html MIME part before investing production time in building it.
Registration requirement. To send AMP email to Gmail users, you need to register your sending domain with Google. This involves submitting your domain and passing a review process. Without registration, Gmail will show the HTML fallback even if your AMP code is technically correct. Where AMP email makes clear practical sense in B2B: event registration confirmations with real-time seat availability, account status updates in customer onboarding sequences, and interactive product selection flows where reducing friction at the inbox level measurably improves conversion.
Part 2: How AI Tools Change the Email Production Workflow
Here is where this gets practical. Most email production workflows today look like this: a designer creates a template in a tool like Figma, a developer converts it to HTML/CSS, someone uploads it to the MAP, and then the QA and revision cycle begins, often across email clients, until it renders consistently. Each revision adds hours.
AI, specifically large language model assistants with strong code generation capabilities, compresses this cycle significantly. Not because they replace the designer or the developer, but because they handle the tedious, repetitive, and highly specific parts of email coding that drain the most time. Here are the seven workflows worth building into your production process.
Step 1: AI to Fix and Standardize Email HTML Formatting
Email HTML is not web HTML. What renders perfectly in Chrome may be unreadable in Outlook 2019 because Outlook renders HTML through Microsoft Word's rendering engine rather than a browser. This is not a typo: Outlook's layout engine is Word, which means flexbox, CSS Grid, and most modern CSS layout properties simply do not work. The safe email HTML conventions (table-based layouts, inline styles, specific CSS property sets) are well-documented but time-consuming to apply manually, especially when working with code generated by a web designer who may not be aware of them.
The AI workflow
Paste your email HTML into Claude or ChatGPT with a prompt like: "This HTML was designed for web use. Convert it to email-safe HTML: use table-based layout instead of flexbox or grid, inline all CSS styles, replace any CSS that does not work in Outlook's Word rendering engine, and ensure compatibility with Gmail, Apple Mail, and Outlook 2016 and above. Preserve the visual design as closely as possible."
This typically returns a working first draft in under a minute. The output will need review and testing (more on that below), but it replaces what would otherwise be an hour or more of manual conversion work. Tools that work well for this: Claude (particularly good at HTML code generation and understanding context), ChatGPT with the code interpreter enabled, Cursor (for teams who prefer an editor-integrated workflow). Stripo also has built-in AI assistance for email HTML conversion if you prefer a purpose-built email tool.
Step 2: AI to Minimize and Compress Email Code
Email file size affects deliverability. Many email clients impose size limits: Gmail clips emails that exceed approximately 102KB of HTML, showing a "Message clipped" notice and a "View entire message" link instead of rendering the full content. Recipients who see a clipped email are less likely to engage with it. Email code often grows unnecessarily large because:
- Legacy template code accumulates commented-out sections that were never removed
- Inline CSS is duplicated across multiple similar elements rather than consolidated
- Tracking code appended by the MAP adds redundant attributes to every link
- Images are embedded as base64 data URIs instead of hosted URLs
The AI workflow
Run your finished, tested email HTML through a compression prompt: "Minify this email HTML for sending. Remove all HTML comments, remove whitespace between tags where it will not affect rendering, consolidate duplicate inline CSS values where safe to do so without affecting layout, and flag any base64-encoded images that should be replaced with hosted URLs. Do not change any visible content, links, or tracking attributes."
This can reduce email file size by 20-40% for code-heavy templates, which directly reduces the risk of clipping in Gmail and improves load time on slower connections. A note on what not to compress: do not ask AI to minify your MAP's tracking attributes or link-wrapping code. Marketo's link tracking redirects, Pardot's tracking parameters, and similar MAP-injected code should be left untouched. Specify this in your prompt explicitly.
Step 3: Device-Specific Content Sections Instead of Responsive Design Alone
Standard responsive email design uses CSS media queries to hide, resize, or rearrange content at different viewport widths. This works well in clients that support media queries: Gmail, Apple Mail, most mobile clients. It does not work in Outlook, which ignores media queries. The better approach for campaigns where both desktop and mobile rendering matter equally is to include device-specific sections: content that displays only on desktop and content that displays only on mobile. These sections live in the same email but are toggled by conditional Outlook comments and CSS display rules.
Why this matters beyond responsive design: a section designed for a 600px desktop layout is rarely the ideal design for a 375px mobile layout. Buttons that are comfortably sized on desktop may be too small to tap on mobile. Multi-column layouts that read well on a large screen often need to be rebuilt as single-column stacks on small screens. Rather than compromising both experiences with a single adaptive layout, you can design two distinct content experiences within the same HTML.
The AI workflow
"Here is an email section designed for desktop. Create a mobile-only version of this same section optimized for a 375px viewport: single-column layout, minimum tap target size of 44px for any buttons, font size no smaller than 14px for body text, and simplified image usage. Then show me the combined code using a display:none toggle for the desktop version (hidden on mobile) and the mobile version (hidden on desktop), using both CSS media queries and MSO conditional comments."
AI handles the structural conversion reliably, including the correct conditional comment syntax that Outlook requires for column control. You can see a practical example of this approach at Hightouch's design-to-HTML guide, which documents using LLMs specifically for this use case and notes that creating separate desktop and mobile experiences is one of the most straightforward applications.
Step 4: Automated Alt Text for Images
Every image in a marketing email should have an alt attribute. This matters for:
- Accessibility: Screen reader users rely on alt text to understand image content
- Images-off rendering: Many email clients (especially corporate Outlook deployments) block images by default. When images are blocked, alt text is what the recipient sees instead
- Deliverability: Empty or missing alt attributes on all images is a minor but real spam signal
In practice, alt text is consistently the last thing anyone thinks about in the email production process, and it is often left blank or set to the filename. There are two approaches depending on your tooling. For text-based alt descriptions: if you can share an image or describe it, ask AI to generate alt text. Stripo has a native AI alt text generator built into its editor. For images you are working with directly in your HTML, prompt Claude or ChatGPT with: "Write descriptive alt text for each image in this email HTML. For decorative images that add no meaning, set alt to an empty string. For images that contain text, include that text in the alt attribute. For meaningful graphics or illustrations, write a one-sentence description." If your images are click-wrapped with tracked links (the image is inside an anchor tag), the alt text should match the link destination context. AI can infer this from the surrounding code if you include the full email HTML.
Step 5: Automated UTM Tagging for Links
Consistent UTM parameter (UTM stands for Urchin Tracking Module, a Google Analytics link tagging convention) tagging is essential for connecting email clicks to traffic data in Google Analytics (GA4) and your MAP reporting. Without consistent UTM tags, your campaign attribution is incomplete. The issue is that UTM tagging every link in an email manually is tedious, error-prone, and almost never happens consistently across a team. UTM parameters get missed, inconsistently named, or use different source/medium conventions depending on who built the email.
The AI workflow
"Add UTM parameters to all links in this email HTML. Use the following convention: utm_source=email, utm_medium=b2b-nurture, utm_campaign=[campaign name], utm_content=[descriptive content identifier based on the surrounding copy or CTA text]. Do not add UTM parameters to unsubscribe links, preference center links, or any link pointing to [your-domain.com]. Return only the modified HTML."
AI handles this consistently, including appending the UTM string with a question mark when there is no existing query string, appending with an ampersand when a query string already exists, and skipping operational links like unsubscribe and opt-out URLs that should not be tracked. This replaces a 10-15 minute manual process per email with a 30-second prompt, and removes the inconsistency risk entirely.
Step 6: Hover Effects, Button Interactions, and Engaging Formatting
Standard email HTML is flat: static text, static images, static buttons. But a subset of email clients (Gmail, Apple Mail, and most non-Outlook clients on both desktop and mobile) support CSS hover pseudo-class effects via style blocks in the email head. This means you can add button hover states, image swap effects on hover, and subtle interactive formatting that improves the perceived quality of the email. Outlook ignores these effects, but since they are implemented as progressive enhancement (the email looks fine without them, and better with them) there is no rendering risk. What is worth building with AI assistance:
- Button hover states: color change, shadow appearance, or underline effect on hover. The HTML/CSS pattern is straightforward, but email-safe hover syntax has specific quirks that AI handles reliably.
- Image swap on hover: show a secondary image (such as a product detail, a person smiling, or a highlighted feature) when the user hovers over a primary image. This creates engagement without any JavaScript: it is achieved with pure CSS using div overlays.
- Animated underlines or CTA text effects: subtle text link effects that signal interactivity without being distracting.
- Conditional background images: CSS background images in table cells, with solid-color Outlook fallbacks via conditional comments. Background images in email have notoriously patchy support. AI can generate the correct VML (Vector Markup Language) code for Outlook background images if that level of compatibility matters for your audience.
A sample prompt: "Add a hover state to all CTA buttons in this email: when hovered, change the background color from [color] to [slightly darker color] and add a 2px bottom border in [accent color]. Use email-safe CSS hover targeting in a style block. Include an Outlook fallback that shows the base button style."
Step 7: Advanced Features: Google Sender Profiles, Product Cards, and Annotations
Beyond the core email rendering experience, there are several less-commonly-implemented features worth knowing about. AI makes implementing most of them significantly faster because they require specific code structures that are well-documented but rarely memorized.
Gmail Sender Profile Images. Gmail now displays a sender profile image in supported configurations: a circular thumbnail next to the sender name in the inbox. This uses the Brand Indicators for Message Identification (BIMI) standard, which requires:
- A Domain-based Message Authentication, Reporting and Conformance (DMARC) record at enforcement level (either p=quarantine or p=reject)
- A Verified Mark Certificate (VMC) from a qualified issuer (for the verified checkmark)
- A BIMI DNS TXT record pointing to an SVG version of your brand logo hosted at a specific URL
The BIMI standard is separate from, and on top of, standard email authentication. A simplified version without the verified checkmark is achievable without the VMC for some clients. The DNS record format is straightforward but requires precise syntax. AI can generate the correct BIMI TXT record format given your brand logo URL and existing DMARC configuration: "Generate a BIMI DNS TXT record for the domain [yourdomain.com]. The SVG logo is hosted at [https://example.com/logo.svg]. My DMARC policy is already set to p=reject. I do not have a VMC. Show the correct BIMI record syntax and the subdomain at which to publish it." For more on BIMI implementation, the BIMI Group's official documentation is the authoritative reference.
Gmail Promotions Tab Annotations. If your emails send to consumer Gmail accounts or Google Workspace recipients who use the Promotions tab, Gmail supports structured JSON-LD (JavaScript Object Notation for Linked Data) annotations inside the email head. These annotations can display a deal badge with discount percentage and expiry date, a product image thumbnail visible in the Promotions tab before the email is opened, an event date card, or a subscription renewal notice. In B2B marketing, Promotions tab annotations are more relevant for product announcements, early access campaigns, and event invitations than for standard nurture emails. But for the right use case, they increase inbox visibility without any change to the email body. Google's Gmail developer documentation on annotations covers the full schema, but AI can generate the boilerplate for most use cases in seconds.
Google Product Cards. For B2B software companies running product-led campaigns, Google's product card schema for email allows structured product information (name, image, price, rating) to appear in a rich card format within Gmail. The implementation uses the same JSON-LD approach as Promotions tab annotations. While this feature is more commonly used in B2C e-commerce, B2B SaaS teams running free trial or pricing announcement campaigns can use it to display product information directly in the Gmail inbox view. The visual differentiation in a crowded inbox is meaningful.
AMP Email for Interactive B2B Use Cases. To revisit Accelerated Mobile Pages (AMP) Email briefly with a practical B2B lens, the clearest use cases where the registration effort pays off are event registration confirmation emails with a live attendee count or session selector, customer onboarding emails with a to-do checklist the recipient can check off without leaving the inbox, and renewal notification emails with a payment or confirmation action directly available. If your sending platform supports AMP and your audience is primarily Gmail, the AMP for Email developer guide walks through the full implementation. AI can generate valid AMP Email component code reliably, especially for simpler interactive components like accordions, carousels, and dynamic text, but AMP has strict validator requirements, so output from AI should always be run through the AMP Email Playground before deployment.
Part 3: Practical Notes on Tooling
The AI tools that work best for email HTML work are those with strong code generation and the ability to handle full document context, because email HTML files are often 200-500+ lines and the relationships between sections matter.
- Claude: handles large HTML documents well and tends to produce clean, well-commented output. Particularly useful for complex conversion tasks (web HTML to email HTML) because it reasons through structural changes rather than just substituting values.
- ChatGPT (GPT-4 and above): strong for iterative email code work, especially with the canvas feature enabled for version control. Slightly slower than Claude for large documents but the rollback capability is genuinely useful when iterating on complex layouts.
- Cursor: the best option if your email production workflow is code-editor-based. Cursor's agent mode can work across multiple files, which matters if you are maintaining a template library or building multiple variants of the same email.
- ActiveCampaign: worth a mention for teams on leaner budgets. ActiveCampaign's email builder is more flexible than Pardot's and its automation logic is surprisingly deep for its price point. If you are building AI-assisted email workflows on a smaller MAP, it handles the deployment side well.
- Stripo: a purpose-built email builder with native AI features including code-to-email conversion, alt text generation, and AI copy assistance. If you prefer a visual email editor with AI integrated rather than a general-purpose LLM, Stripo's AI tools cover most of the workflows above within their interface.
- Litmus and Email on Acid: these are testing tools rather than AI generation tools, but they are the necessary complement to any AI-generated email HTML. Litmus previews your email across 100+ clients simultaneously and flags rendering issues before send; Email on Acid adds an automated checklist for accessibility, broken links, and image blocking scenarios.
Before any template goes to production, run it through a rendering test. AI produces good first drafts, but email client behavior is too inconsistent to trust any code without client-level testing. Litmus's data on email client usage shows that Outlook still accounts for a significant share of B2B opens, and Outlook's rendering engine behaves differently from every other client, which means testing is not optional.
TL;DR Summary
Marketing automation platforms impose real constraints on what email HTML can do. Working around those constraints manually is slow. Here is the condensed workflow:
- Format fixing: use AI to convert web HTML to table-based, inline-styled, email-safe HTML for Outlook and cross-client compatibility
- Code compression: AI to remove comments, consolidate styles, and reduce file size to avoid Gmail clipping at the 102KB threshold
- Device-specific sections: rather than relying entirely on responsive CSS, use AI to build desktop-only and mobile-only content sections with proper conditional comment syntax
- Alt text generation: prompt AI to write descriptive, accessibility-compliant alt text for every image in your template
- UTM tagging: AI to consistently apply UTM parameters to all trackable links using your naming convention
- Hover effects and interactivity: CSS hover states, image swaps, and button effects are well within AI's code generation capability and add meaningful design quality for non-Outlook recipients
- Advanced features: BIMI sender profile images, Gmail Promotions annotations, and AMP Email components are all implementable with AI assistance, with appropriate validation and testing
Read the Full Series
- Part 1: MAP Foundations and Funnel-Stage Automation
- Part 2: The Campaign Playbook
- Part 3: The Five-Tier Maturity Model
- Part 4: Email Deliverability and Domain Reputation
- Part 5: Marketo vs Pardot vs HubSpot vs Eloqua
- Part 6: Using AI in Email Marketing (this article)
How Marzipan Can Help With Your Email Marketing
Email marketing is rarely one job. It is at least six: audience building, copywriting, design and production, scheduling and send management, performance monitoring, and connecting email activity back to leads and pipeline. Most B2B teams have one or two of those covered. Very few have all of them running well simultaneously.
At Marzipan, we work with B2B marketing teams as a fixed-fee, senior marketing partner. That means we can wholly own your email marketing function or slot into the parts that need the most support, without project fees or hourly billing. What that looks like in practice:
- Audience building and segmentation: defining, building, and maintaining the right contact segments across your MAP and customer relationship management (CRM) platform
- Email copywriting: message strategy, subject lines, body copy, and CTAs mapped to funnel stage and persona
- Email design and HTML production: templates built and tested for your MAP, cross-client verified, and mobile-optimized
- Schedule and send management: campaign planning, deployment, frequency capping, and suppression
- Performance management: deliverability monitoring, open and click analysis, and ongoing optimization
- Attribution and pipeline reporting: connecting email engagement to leads, opportunities, and revenue in your CRM
If you would like to talk through where email fits in your current program, get in touch with the Marzipan team, or explore our email marketing and marketing operations services.
Frequently Asked Questions
| Question | Answer |
|---|---|
| Can AI write email HTML from scratch? | Yes, with caveats. AI can generate valid, email-safe HTML from a brief or a design description, but output needs testing in Litmus or Email on Acid before deployment. Email clients are inconsistent enough that no generated code should go to production untested. |
| Does Pardot support AMP email? | No, not natively. Pardot strips unsupported MIME types and sends the HTML fallback. AMP email requires specific MAP support. Check your platform's documentation before investing in AMP development. |
| What is Munchkin code and why does it matter for email? | Munchkin is Marketo's JavaScript-based website tracking script. It does not function inside email clients because email clients block JavaScript. Marketo uses redirect-based link tracking in emails instead. Understanding this distinction matters when building email templates that need to work correctly in Marketo. |
| Is CSS hover supported in all email clients? | No. Outlook does not support CSS hover. Gmail, Apple Mail, and most mobile clients do. Implement hover effects as progressive enhancement: the email should look correct without them, and better with them. |
| What file size should I target for email HTML? | Keep the HTML file under 102KB to avoid Gmail's clipping behavior. Most well-structured emails land under 80KB without images embedded as data URIs. Images should always be hosted URLs, not base64-encoded inline data. |
| What is BIMI and do I need it? | Brand Indicators for Message Identification allows your brand logo to appear alongside your sender name in supporting inbox clients. It requires a DMARC enforcement policy and a hosted SVG logo. The verified checkmark version additionally requires a Verified Mark Certificate. It is a deliverability trust signal worth implementing if you are sending at scale. |
| What AI tool is best for email HTML work? | Claude and ChatGPT both handle email HTML conversion well. Claude tends to produce cleaner, better-commented output for complex conversion tasks. Cursor is the best option if your workflow is code-editor-based. Stripo is the best purpose-built email tool with native AI features. |
| What are UTM parameters? | UTM stands for Urchin Tracking Module, a Google Analytics link tagging standard. Adding UTM parameters to email links allows Google Analytics (GA4) and most MAP reporting tools to attribute website traffic and conversions back to specific email campaigns, content sections, and links. |

Written by
Paul Wright
Head of Operations & Automation
Paul has 17 years' life science marketing experience and was instrumental to the rapid growth and expansion of multiple Danaher operating companies. With a background in digital marketing and marketing operations, Paul has a reputation for building highly effective commercial marketing teams.
More articles by Paul


