Create Email Template
sf_create_email_templateCreate reusable HTML or text email templates with merge field support for Salesforce workflow alerts, approval processes, or manual sending. Organize by folder path for easy management.
Instructions
Creates an HTML or text email template that can be used in Workflow Email Alerts, Approval Processes, or sent manually. Templates support merge fields like {!Account.Name} for personalization. Specify a folder path (e.g., 'unfiled$public/MyTemplate') or 'MyFolder/MyTemplate'. Use relatedEntityType to enable object-specific merge fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | Plain text body of the email | |
| name | Yes | Template developer name (no spaces) | |
| type | No | Template type | html |
| label | Yes | Display label | |
| replyTo | No | Reply-to email address | |
| subject | Yes | Email subject line (can include merge fields like {!Account.Name}) | |
| encoding | No | Character encoding | UTF-8 |
| fullName | Yes | Full name including folder: 'FolderName/TemplateName' or 'unfiled$public/TemplateName' | |
| available | No | Make template available for use | |
| htmlValue | No | HTML body of the email (for html type templates) | |
| senderName | No | Sender display name | |
| description | No | Description | |
| relatedEntityType | No | Related object API name, e.g. 'Opportunity', 'Contact' |