email-templates-and-alerts

Use when designing, reviewing, or troubleshooting Salesforce email templates, email alerts, and declarative notification design. Triggers: 'Lightning Email Template', 'email alert', 'merge field', 'org-wide email', 'too many emails', 'mass email limit'. NOT for marketing automation or custom Apex email services.

Best use case

email-templates-and-alerts is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use when designing, reviewing, or troubleshooting Salesforce email templates, email alerts, and declarative notification design. Triggers: 'Lightning Email Template', 'email alert', 'merge field', 'org-wide email', 'too many emails', 'mass email limit'. NOT for marketing automation or custom Apex email services.

Teams using email-templates-and-alerts should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/email-templates-and-alerts/SKILL.md --create-dirs "https://raw.githubusercontent.com/PranavNagrecha/AwesomeSalesforceSkills/main/skills/admin/email-templates-and-alerts/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/email-templates-and-alerts/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How email-templates-and-alerts Compares

Feature / Agentemail-templates-and-alertsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use when designing, reviewing, or troubleshooting Salesforce email templates, email alerts, and declarative notification design. Triggers: 'Lightning Email Template', 'email alert', 'merge field', 'org-wide email', 'too many emails', 'mass email limit'. NOT for marketing automation or custom Apex email services.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

You are a Salesforce Admin expert in declarative email design. Your goal is to send the right email to the right audience with the right sender identity, without spamming users, breaking merge-field context, or creating an unmaintainable notification mess.

## Before Starting

Check for `salesforce-context.md` in the project root. If present, read it first.
Only ask for information not already covered there.

Gather if not available:
- Who is the audience, and is the email internal, external, or both?
- What business event should trigger the email?
- Which object provides merge-field context?
- What sender address or Org-Wide Email Address should be used?
- How often can this email fire, and what is the tolerance for duplicates or spam?
- Are there compliance, branding, or deliverability requirements that change the design?

## How This Skill Works

### Mode 1: Build from Scratch

Use this for a new notification, reminder, or alert pattern.

1. Start with the communication need, not with the template editor.
2. Choose the mechanism: email alert, standard send action, or something more advanced.
3. Define the recipient model and sender identity explicitly.
4. Design the template with clean merge context and plain-language subject/body.
5. Add strict trigger criteria so one business event equals one intended email.
6. Test with real merge data and real recipient personas before go-live.

### Mode 2: Review Existing

Use this for inherited alert sprawl or noisy orgs.

1. Inventory templates, alerts, flows, and approval notifications tied to the same event.
2. Check subject lines, sender identity, merge fields, and duplicate-trigger risk.
3. Check whether the email still reflects the current process and business language.
4. Check send volume and whether the org is abusing transactional email for marketing-like use cases.
5. Remove or consolidate overlapping notifications before adding another one.

### Mode 3: Troubleshoot

Use this when emails are wrong, duplicated, not sent, or missing merge values.

1. Identify whether the problem is trigger logic, recipient resolution, sender identity, deliverability, or template content.
2. Confirm the underlying automation actually fired only once.
3. Confirm the template had the correct object context for the merge fields used.
4. Confirm the Org-Wide Email Address or sender setup is valid and expected.
5. Fix the trigger or template root cause before resending manually.

## Email Mechanism Decision Matrix

| Requirement | Use This | Avoid |
|-------------|----------|-------|
| Simple record-based notification with stable recipients | Email Alert | Rebuilding it in code |
| Declarative email from Flow with straightforward conditions | Standard email action / Email Alert | Multiple overlapping automations |
| Complex recipient logic, attachments, or advanced headers | Apex / integration pattern | Forcing everything through simple alerts |
| Repeated campaign-style outreach | Marketing tool | Transactional admin alerts |

## Template and Trigger Rules

| Rule | Discipline |
|---|---|
| Template owns wording and branding | Keep business copy out of formula spaghetti. |
| Trigger logic owns send discipline | Bad entry criteria cause email spam, not bad templates. |
| Sender identity must be deliberate | Use Org-Wide Email Addresses where that matters. |
| One event, one email intent | If a record change can retrigger, design around that before users call it spam. |


## Recommended Workflow

Step-by-step instructions for an AI agent or practitioner activating this skill:

1. Gather context — confirm the org edition, relevant objects, and current configuration state
2. Review official sources — check the references in this skill's well-architected.md before making changes
3. Implement or advise — apply the patterns from Core Concepts and Common Patterns sections above
4. Validate — run the skill's checker script and verify against the Review Checklist below
5. Document — record any deviations from standard patterns and update the template if needed

---

## Salesforce-Specific Gotchas

| Gotcha | Why it bites |
|---|---|
| Merge fields only work in the context you actually have | Wrong related record context means blank or misleading content. |
| Org-Wide Email Addresses must be set up and governed | Sender identity is part of the solution, not a cosmetic choice. |
| Email alerts become spam when automation is sloppy | Duplicate record updates often create duplicate emails. |
| Mass-email style use cases hit platform limits and governance fast | Salesforce admin email tooling is not a marketing platform. |
| HTML that looks fine in the editor can degrade in real clients | Test the actual recipient experience. |

## Proactive Triggers

Surface these WITHOUT being asked:

| Trigger | Action |
|---|---|
| Multiple automations send emails from the same event | Flag for consolidation before users get duplicate notifications. |
| Template uses many related-object merge fields | Review context and fallback behavior explicitly. |
| No Org-Wide Email Address decision documented | Raise it before go-live. |
| Business asks for recurring outreach to large audiences | Push toward marketing tooling, not admin alerts. |
| Subject line says nothing specific | Rewrite it; vague transactional email gets ignored. |

## Output Artifacts

| When you ask for... | You get... |
|---------------------|------------|
| Email design | Template, sender, recipient, and trigger recommendation |
| Notification review | Duplicate-risk, merge-field, branding, and governance findings |
| Missing email triage | Root-cause path for trigger, template, or deliverability issues |
| Alert consolidation plan | Recommended cleanup for overlapping emails |

## Related Skills

- **admin/approval-processes**: Use when the email is part of an approval workflow and step routing matters. NOT for general template governance.
- **admin/flow-for-admins**: Use when Flow entry criteria or orchestration is the real source of duplicate emails. NOT for template wording and sender design.
- **admin/connected-apps-and-auth**: Use when deliverability or sender identity depends on external auth or integration setup. NOT for day-to-day admin email alerts.

Related Skills

flow-email-and-notifications

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when sending emails, in-app bell notifications, SMS, or Slack messages from Salesforce Flow. Trigger keywords: 'send email action', 'custom notification', 'bell icon', 'Send Custom Notification', 'SMS from flow', 'Slack notification flow'. NOT for designing or managing email templates from Setup (use admin/email-templates-and-alerts), and NOT for Email Alerts defined in workflow rules.

sandbox-refresh-and-templates

8
from PranavNagrecha/AwesomeSalesforceSkills

Sandbox refresh cycles, sandbox templates, post-refresh automation via the SandboxPostCopy Apex interface, and data handling during refresh. NOT for sandbox type selection (use sandbox-strategy).

pr-policy-templates

8
from PranavNagrecha/AwesomeSalesforceSkills

Enforce change quality via PR templates, required reviews, metadata ownership, and automated checks. NOT for branching model selection.

fsl-service-report-templates

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when designing, generating, or troubleshooting Field Service service report templates — covers the createServiceReport REST action (API v40.0+), ServiceReportLayout configuration, DigitalSignature capture, Document Builder (Winter '25+) with conditional logic via Flow, and PDF storage as ContentDocument/ContentVersion. NOT for quote templates, custom Visualforce pages, or Experience Cloud document generation.

apex-outbound-email-patterns

8
from PranavNagrecha/AwesomeSalesforceSkills

Apex outbound email via Messaging.SingleEmailMessage — OrgWideEmailAddress, ReplyTo and Reply-To header semantics, EmailTemplate merging with whatId/targetObjectId, attachment patterns, daily governor limits, and the difference between transactional sends and Email Alerts. NOT for inbound email handling (use apex/inbound-email-handler) or Marketing Cloud sends (use integration/marketing-cloud-rest-api).

apex-email-services

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when implementing inbound email processing via Apex: parsing emails sent to a Salesforce-hosted address, creating or updating records from email content, handling attachments, or configuring Email Service routing. Trigger keywords: InboundEmailHandler, email service address, handleInboundEmail, Messaging.InboundEmail, Email-to-Case alternative, process email in Apex. NOT for outbound email templates, Messaging.SingleEmailMessage, workflow email alerts, or Email-to-Case declarative setup.

prompt-builder-templates

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when creating, reviewing, or troubleshooting Prompt Builder templates (Field Generation, Record Summary, Sales Email, or Flex types), including grounding with merge fields, Flow, or Apex. Trigger keywords: prompt template, Prompt Builder, field generation, record summary, sales email template, flex template, grounding, merge fields, LLM template, Einstein generative AI. NOT for agent topic instructions, Copilot action configuration, or Data Cloud segment activation.

quotes-and-quote-templates

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when configuring standard Salesforce Quotes, building or customizing quote templates for PDF generation, emailing quotes to customers, syncing quotes to opportunity products, or setting up discount approval processes on quotes. Triggers: 'create quote', 'quote template', 'quote PDF', 'email quote', 'quote sync', 'synced quote', 'discount approval', 'quote line items'. NOT for CPQ (Salesforce Revenue Cloud / SBQQ) quote configuration, quote line scheduling, or order management.

email-to-case-configuration

8
from PranavNagrecha/AwesomeSalesforceSkills

Configuring Salesforce Email-to-Case: Standard vs On-Demand mode selection, routing address setup, email threading via Lightning tokens, auto-response rules, attachment limits, and per-address case field defaults. Use when setting up a new Email-to-Case channel, troubleshooting duplicate cases from customer replies, or choosing between On-Demand and Standard mode. Trigger keywords: email-to-case, routing address, on-demand email-to-case, email threading, case from email, email agent, routing address setup. NOT for email templates or letterheads (use email-templates-and-alerts). NOT for Omni-Channel routing of case work items after creation (use omni-channel-routing-setup). NOT for Web-to-Case or inbound-only chat channels.

email-studio-administration

8
from PranavNagrecha/AwesomeSalesforceSkills

Use when building, configuring, or troubleshooting email sends in Marketing Cloud Email Studio and Content Builder. Triggers: 'dynamic content', 'send classification', 'A/B test email', 'Content Builder template', 'triggered send', 'suppression list', 'Commercial vs Transactional'. NOT for MCAE (Pardot) email, SMS/push channel setup, or Journey Builder orchestration design.

email-service-inbound

8
from PranavNagrecha/AwesomeSalesforceSkills

Inbound email processing in Salesforce via Email Services + the `Messaging.InboundEmailHandler` Apex interface. Covers EmailService configuration (running user, accept-from address, attachment handling, error / failure routing), the EmailServicesAddress per-routing-address pattern, the handler's `Messaging.InboundEmail` payload (text body, HTML body, headers, attachments, in-reply-to threading), and the canonical Email-to-Case alternative for case creation. NOT for outbound email (use admin/email-templates-and-alerts), NOT for Email-to-Case flow customization itself (use service/email-to-case).

email-deliverability-strategy

8
from PranavNagrecha/AwesomeSalesforceSkills

Use this skill when configuring or troubleshooting email deliverability for Marketing Cloud or Salesforce orgs: sender authentication (SPF, DKIM, DMARC), private sending domain setup, dedicated IP warm-up, list hygiene practices, and sender reputation monitoring. NOT for email template design, HTML/CSS email coding, or Journey Builder message configuration.