Email task

Email task is a system task to use SimWorkflow to send email on your behalf.

There are several tabs available where you can configure an Email task:

The configuration of the General, Input Parameters, and Routing tabs is similar to that of a user task. We discuss only the Configuration tab here.

Configuration tab

From the Configuration tab, setup the following fields:

Field

Required

Description

Email

Yes

A configuration for Email represented by a JSON Object.

Email field top-level fields

Field

Type

Required

Description

fromName

String

No

The display name. This will be what the recipients will see in the email.

subject

String

Yes

The email subject.

html

String

Yes

The email body.

Either or both of html and text must be defined.

text

toAddresses

JSON Array

Yes

The String array of 'To' email addresses.

ccAddresses

JSON Array

No

The String array of 'CC' email addresses.

bccAddresses

JSON Array

No

The String array of 'BCC' email addresses.

replyToAddresses

JSON Array

No

The String array of replay-to email addresses.

attachments

JSON Array

No

The String array of workflow task attachment IDs to add to email as attachments.

Here is an example Email to notify the workflow status:

{
  "fromName": "SimWorkflow Automation",
  "toAddresses": [
    "ben.smith@example.com"
  ],
  "ccAddresses": [],
  "bccAddresses": [],
  "replyToAddresses": [],
  "subject": "Workflow ${workflowDefinitionName} status",
  "html": "<p>:exclamation: Workflow <a href=\"https://www.simworkflow.com/workflows/${failureWorkflow['swf:workflowId']}\">${workflowDefinitionName}</a> failed due to <code>${failureWorkflow['swf:cause']}</code></p>",
  "text": ":exclamation: Workflow <https://www.simworkflow.com/workflows/${failureWorkflow['swf:workflowId']}|${workflowDefinitionName}> failed due to `${failureWorkflow['swf:cause']}`",
  "attachments": []
}