--- title: "Get-EmailTemplate" slug: "scripting-get-emailtemplate" tags: ["Enterprise Only"] updated: 2025-07-17T10:58:31Z published: 2025-07-17T10:58:31Z canonical: "help.agilityblue.com/scripting-get-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. # Get-EmailTemplate ## Summary Retrieves an existing email template. ```powershell Get-EmailTemplate    -Id ``` Returns an [email template](https://apidocs.agilityblue.com/#900140fd-ee83-4ae3-8382-27c8e652208e) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Id | Int32 | Yes | The email template id. | ## Examples ### Get an existing email template This example retrieves a specific email template and outputs it as JSON. ```powershell # Retrieve a specific email template by id $entity = Get-EmailTemplate -Id 1 Write-Output "Retrieved email template $($entity.EmailTemplateId) (Name: $($entity.Name))" # For debug purposes, convert the email template to output as JSON so we can see the available fields Write-Output "" Write-Output "JSON Results:" $jsonOutput = $entity | ConvertTo-Json -Depth 10 # Output the task Write-Output $jsonOutput ``` ```json Retrieved email template 1 (Name: Task Completed) JSON Results: {  "EmailTemplateId": 1,  "Name": "Task Completed",  "Description": "A simple message to indicate that a task has been completed.",  "Subject": null,  "Template": "

Greetings,

The Task Name task has just been completed by Completed By on Completed On. It was assigned by Assigned By on Assigned On.

Thank you,
Email Initiated By

",  "IsEnabled": true,  "CreatedByFullName": "Adam Chavez",  "CreatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "CreatedOn": "2018-12-27T13:12:06.8894343-06:00",  "CreatedBy": null,  "LastUpdatedByFullName": "Adam Chavez",  "LastUpdatedById": "25a34a2f-e3d8-4690-88f5-6b399cf88c4c",  "LastUpdatedOn": "2023-11-30T12:39:58.0417555+00:00",  "LastUpdatedBy": null,  "NumberOfAssociatedContacts": 1,  "AssociatedContacts": [] } ```