The Email Template Generator produces production-ready HTML email templates on demand. You provide the tone, email type, recipient and sender details, company name, and a set of key points to cover — and Gemini 2.5 Flash writes and styles a fully responsive template using inline CSS. The output is a clean HTML fragment (noDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/ai360/llms.txt
Use this file to discover all available pages before exploring further.
<html>, <head>, or <body> wrapper tags) you can drop straight into any email service provider or transactional mailer. Five predefined templates are also available to auto-populate all settings for common email scenarios like invoices, onboarding, and password resets.
Input parameters
The writing tone of the email. Common values:
formal, friendly, casual, neutral, urgent. Defaults to formal if omitted.The category or purpose of the email. Common values:
business, marketing, transactional, notification, onboarding, security. Defaults to business if omitted.Who the email is addressed to — a person’s name, role, or audience label (e.g.,
New User, Client, Team). Falls back to a client when not provided.The sender’s name or role as it should appear in the closing signature (e.g.,
Support Team, Alex from Acme). Falls back to a professional when not provided.The company or organization name used in the styled header and signature. Falls back to
an organization when not provided.An array of bullet-point instructions that Gemini weaves naturally into the email body. At least one key point or a
template value is required — the API returns a 400 if both are absent.A predefined template identifier that auto-fills
tone, type, and keyPoints with sensible defaults. Accepted values: invoice, login, account_creation, newsletter, password_reset. See Predefined templates below.Predefined templates
Selecting a predefined template automatically sets the tone, type, and a curated set of key points — useful for quickly generating polished emails for common transactional or lifecycle scenarios.| Template key | Label | Tone | Type | What it generates |
|---|---|---|---|---|
invoice | Invoice / Payment Reminder | formal | business | A billing email with invoice number, amount due, due date, payment link, and a polite reminder about payment terms. |
login | Login Verification / OTP | neutral | notification | A security email containing a 6-digit OTP or verification code, its validity window, a warning not to share it, and a support contact link. |
account_creation | Account Creation / Welcome Email | friendly | onboarding | A warm welcome confirming successful sign-up, with a login link or getting-started guide and an encouragement to explore the platform. |
newsletter | Newsletter / Update Email | casual | marketing | A newsletter-style update covering company news, product highlights, social media links, and a compliant unsubscribe footer. |
password_reset | Password Reset / Security Email | neutral | security | A security email with a reset link, link expiry time, a reassurance message for users who did not request the reset, and support contact details. |
When a
template value is provided, it supplies Gemini with a structured description of the email’s purpose in addition to (or in place of) custom keyPoints. You can still pass your own keyPoints alongside a template to extend or override the defaults.API integration
Using a predefined template with no custom key points
Response
POST /api/utilities/email-template-generator
true when Gemini successfully generated an HTML template.The generated email as a clean HTML fragment with inline CSS only. The string contains no
<html>, <head>, or <body> wrapper tags — just the styled email content section, ready to embed.Error responses
| Status | Condition | Response body |
|---|---|---|
400 | Both keyPoints and template are absent or empty | { "error": "Please provide key points or select a template." } |
500 | Gemini returned no output or an internal error occurred | { "error": "Internal server error", "message": "..." } |
All generated HTML uses inline CSS only — no external stylesheets, no
<style> blocks, no JavaScript. This ensures maximum compatibility across email clients, including Outlook, Gmail, Apple Mail, and mobile clients that strip <head> styles. The output is safe to inject directly into your email service provider’s HTML body field.In-app preview
The AI360 UI renders the generated HTML fragment live in a sandboxed<iframe> alongside an editable raw-HTML textarea. Use the Copy button to grab the markup or Download to save it as email-template.html for local editing or import into tools like Mailchimp, SendGrid, or Amazon SES.