PranavNagrecha/AwesomeSalesforceSkills / skills/admin/classic-email-template-migration
classic-email-template-migration
VerifiedMigrating Classic email templates (Text, HTML with Letterhead, Custom HTML, Visualforce email) to Lightning Email Templates (LET) and the Email Template Builder. Covers merge-field translation, Letterhead-to-Enhanced-Letterhead conversion, Visualforce email retention strategy, folder reorganization, sender-context (OrgWideEmailAddress) preservation, and downstream Email Alert / Process Builder / Flow rewiring. NOT for transactional Apex email sending (use apex/apex-outbound-email-patterns) or marketing email broadcasts (use Marketing Cloud / Account Engagement).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 20.7 KB |
| references/examples.md | markdown | 7.3 KB |
| references/gotchas.md | markdown | 7.2 KB |
| references/llm-anti-patterns.md | markdown | 7.0 KB |
| references/well-architected.md | markdown | 6.8 KB |
| scripts/check_classic_email_template_migration.py | script | 4.8 KB |
| templates/classic-email-template-migration-template.md | markdown | 2.9 KB |
templates/classic-email-template-migration-template.md
View on GitHub# Classic Email Template Migration — Work Template
Use this template when planning and executing the migration of Classic email templates to Lightning Email Templates.
---
## Scope
**Skill:** `classic-email-template-migration`
**Template count by type:**
```sql
SELECT TemplateType, COUNT(Id) cnt FROM EmailTemplate WHERE UiType='Aloha' GROUP BY TemplateType
```
| TemplateType | Count |
|---|---|
| text | |
| html | |
| custom | |
| visualforce | |
---
## Per-Template Decision Matrix
| Template Name | Type | Decision | Lightning Equivalent | OWA Sender |
|---|---|---|---|---|
| | text | Migrate | Lightning text template | |
| | html | Migrate | Lightning + Enhanced Letterhead | |
| | custom | Migrate | Lightning HTML | |
| | visualforce | Retain VF | n/a | |
Decision values: `Migrate`, `Retain VF`, `Retire (no replacement)`.
---
## Brand / Letterhead Plan
| Enhanced Letterhead Name | Used By Templates | Header Image URL | Footer Image URL |
|---|---|---|---|
| Corporate | (list) | | |
| Transactional / No-reply | (list) | | |
---
## Merge Field Audit
For each template body, find non-translatable patterns:
```bash
# Pseudocode — adapt to your retrieval mechanism
for template in classic_templates:
if '{!IF(' in body or '{!CASE(' in body:
flag('Conditional logic — pre-compute on a record formula field')
if '{!$Setup.' in body:
flag('Custom Setting merge — surface via record field instead')
if '{!System.' in body:
flag('System merge — no Lightning equivalent')
```
| Template | Pattern Found | Mitigation |
|---|---|---|
| | | |
---
## Migration Map
| Old (Classic) ID | Old DeveloperName | New (Lightning) ID | New DeveloperName | Status |
|---|---|---|---|---|
| | | | | |
Persist this in a `Email_Template_Migration_Map__c` custom object for ongoing audit.
---
## Downstream Consumer Audit
| Consumer Type | Count Referencing Old Templates | Update Mechanism | Verified |
|---|---|---|---|
| Email Alerts (`WorkflowAlert.TemplateId`) | | Metadata API bulk | [ ] |
| Flows (`Send Email` action) | | Flow XML edit | [ ] |
| Process Builder | | Migrate to Flow first | [ ] |
| Apex `setTemplateId()` | | Code change | [ ] |
| Approval Process emails | | Approval XML edit | [ ] |
| External marketing tools | | External integration update | [ ] |
---
## Sign-Off Checklist
- [ ] All Classic templates have decision: Migrated / Retained VF / Retired
- [ ] Enhanced Letterhead(s) tested in Outlook + Gmail + Apple Mail
- [ ] Merge field translation completed; non-translatable patterns mitigated
- [ ] Folder structure replicated with sharing
- [ ] Email Alerts updated via Metadata API; verification SOQL returns zero references to old IDs
- [ ] OrgWideEmailAddress sender pairings re-set on each downstream consumer
- [ ] Test send completed for each Email Alert
- [ ] Classic templates set to `IsActive=false` (not deleted) post-verification
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |