--- title: "Set-EmailTemplate" slug: "scripting-set-emailtemplate" updated: 2025-07-17T11:22:21Z published: 2025-07-17T11:22:21Z canonical: "help.agilityblue.com/scripting-set-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. # Set-EmailTemplate ## Summary Updates an existing email template. ```powershell Set-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 update for an existing entry. | ## Examples ### Update an existing email template ```powershell # Retrieve an email template $emailTemplate = Get-EmailTemplate -Id 9 # Change the subject $emailTemplate.Subject = "Your Agility Blue task has been complated!" # Save changes $emailTemplate = Set-EmailTemplate -Entry $emailTemplate # Output some information to help indicate that the template was updated Write-Output "Email template $($emailTemplate.EmailTemplateId) ($($emailTemplate.Name)) was updated" # For debug purposes, convert the email template to output as JSON so we can see the available fields $jsonOutput = $emailTemplate | ConvertTo-Json -Depth 10 Write-Output "" Write-Output "JSON Results:" # Output the JSON results Write-Output $jsonOutput ``` Execution results: ```json Email template 9 (Task Completed) was updated JSON Results: { "EmailTemplateId": 9, "Name": "Task Completed", "Description": null, "Subject": "Your Agility Blue task has been complated!", "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:17:57.4261534+00:00", "LastUpdatedBy": null, "NumberOfAssociatedContacts": 0, "AssociatedContacts": [] } ```