---
title: "Email"
description: "Optimize email notifications with our handler, using customizable templates and seamless workflow integration. (Gitana 4.0)"
product: "Gitana"
version: "4.0"
url: "/documentation/gitana/4.0/engine/workflow/workflow-handlers/email"
---

# Email

Type: `email`

This handler sends an email to a recipient. It fires the [sendEmail](/documentation/gitana/4.0/engine/behaviors/actions/send-email.md) action and accepts a standard configuration object for that action type.

The `config` for this handler can be as simple as:

```
{
    "templateKey": "abc"
}
```

Where `abc` is the `key` of an Email Template content node in your [repository](/documentation/gitana/4.0/reference/types/repository.md). This will work just as shown above for workflows that are launched with the runtime globals for `repositoryId` and `branchId` specified. Otherwise, you will have to provide them, something like this:

```
{
    "templateRepositoryId": "<GUID>",
    "templateBranchId": "master",
    "templateKey": "abc"
}
```

The configuration for the email handler is identical to that used in configuring an email action. Please check out the [documentation on Cloud CMS actions](/documentation/gitana/4.0/engine/behaviors/actions.md) for more information on configuration options.

## Email Template Examples

See the Workflow documentation main page for a complete description of workflow variables that are available to email templates.

- Pull in workflow task document properties

If your workflow has content nodes attached to it, you can reference those from the workflow task's `documents` array, like this:

```
Hello {{workflowTask.assignee.name}},

The following documents are available to be worked on:

<ul>
{{#each workflowTask.documents}}
    <li>{{title}}</li>
{{/each}}
</ul>
```

- Reference a single document's properties

You may wish to address a single known document's properties without iteration:

```
Hello {{workflowTask.assignee.name}},

A document was assigned for you to work on:
{{workflowTask.documents.[0].name}}
```
