Type: email
This handler sends an email to a recipient. It fires the sendEmail 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. 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 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}}