--- title: "Add-TaskEmailMessage" slug: "scripting-add-taskemailmessage" updated: 2025-07-17T10:40:05Z published: 2025-07-17T10:40:05Z canonical: "help.agilityblue.com/scripting-add-taskemailmessage" --- > ## 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-TaskEmailMessage ## Summary Creates a new task email message. ```powershell Add-TaskEmailMessage    -Entry ``` Returns a [task email message](https://apidocs.agilityblue.com/#d3e28476-73d5-4476-a790-ddc43b61e991) object. ## Parameters | Parameter | Type | Required? | Notes | | --- | --- | --- | --- | | Entry | [Task Email Message](https://apidocs.agilityblue.com/#d3e28476-73d5-4476-a790-ddc43b61e991) Object | Yes | | ## Examples > [!NOTE] > Note > > Creating and sending emails from Agility Blue requires that you first create an email message, associate recipient contacts to the email, link the email to an existing task, and then issue a command to send the email. See the [task emails concepts article](/v1/docs/scripting-tutorials-concepts-task-emails) for a more detailed guide of this process. ### Create a new task email message ```powershell $taskEmailMessage = @{  TaskId = 29877 # put your task id in here  EmailMessageId = 124 # put your email message id here } # Create the link Add-TaskEmailMessage -Entry $taskEmailMessage | Out-Null ```