--- title: "Add-EmailTemplate" slug: "scripting-add-emailtemplate" updated: 2025-07-17T11:22:52Z published: 2025-07-17T11:22:52Z canonical: "help.agilityblue.com/scripting-add-emailtemplate" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.agilityblue.com/llms.txt > Use this file to discover all available pages before exploring further. # Add-EmailTemplate ## Summary Creates a new email template. ```powershell Add-EmailTemplate -Entry ``` Returns an [email template](https://apidocs.agilityblue.com/#900140fd-ee83-4ae3-8382-27c8e652208e) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | [Email Template](https://apidocs.agilityblue.com/#900140fd-ee83-4ae3-8382-27c8e652208e) Object | Yes | The email template object to create as a new entry. | ## Examples ### Create a new email template ```powershell # Create a email template object with required fields $entry = @{ Name = "Task Completed" Template = "
Your task has been completed!
" } $createdEntry = Add-EmailTemplate -Entry $entry # Output some information to help indicate that the template was created Write-Output "Email template $($createdEntry.EmailTemplateId) ($($createdEntry.Name)) was created" # For debug purposes, convert the data to output as JSON so we can see all the fields Write-Output "" Write-Output "JSON Results:" $jsonOutput = $createdEntry | ConvertTo-Json -Depth 10 # Output the data Write-Output $jsonOutput ``` Execution results: ```json Email template 9 (Task Completed) was created JSON Results: { "EmailTemplateId": 9, "Name": "Task Completed", "Description": null, "Subject": null, "Template": "Your task has been completed!
", "IsEnabled": true, "CreatedByFullName": "Max Miller", "CreatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a", "CreatedOn": "2025-07-17T11:04:47.0728462+00:00", "CreatedBy": null, "LastUpdatedByFullName": "Max Miller", "LastUpdatedById": "510e109b-6ff5-4442-9670-cd5e3cd82a7a", "LastUpdatedOn": "2025-07-17T11:04:47.0728462+00:00", "LastUpdatedBy": null, "NumberOfAssociatedContacts": 0, "AssociatedContacts": [] } ```