Set-EmailTemplate

Prev Next

Summary

Updates an existing email template.

Set-EmailTemplate
    -Entry

Returns an email template object.

Parameters

Parameter

Type

Required?

Notes

Entry

Email Template Object

Yes

The email template object to update for an existing entry.

Examples

Update an existing email template

# 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:

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": "<p>Your task has been completed!</p>",
  "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": []
}