# Communication

<!-- Generated by tools/catalogue/generate.py from flow.service.workflow 5.0.0-beta.39. Don't edit by hand. -->

# Communication

The Communication category has 4 tasks. Each entry shows the task's latest revision, the one the palette adds. See [Reading an entry](https://www.useboomerang.io/docs/flow/main/catalogue/overview#reading-an-entry).

## Send Email with Postmark Template

Send an email from a template using a template ID and variables.

- **Slug:** `send-email-with-postmark-template`
- **Type:** `template`
- **Revision:** 2
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| API Token | `token` | Secured | Yes |  |  |
| To | `to` | Text | Yes |  | Supports up to 50 recipients. Comma delimited. |
| From | `from` | Text | Yes |  | Email address or with name information |
| Template Id | `templateId` | Text | No |  |  |
| Template Alias | `templateAlias` | Text | No |  |  |
| Template Variables | `templateModel` | Text Editor - JavaScript/JSON | No |  |  |
| Tag | `tag` | Text | No |  |  |
| Message Stream | `messageStream` | Text | No | `outbound` | Message Stream ID that's used for sending |

**Results**

| Name | Description |
| --- | --- |
| `To` | Recipient email address |
| `SubmittedAt` | Timestamp |
| `MessageID` | ID of message |
| `ErrorCode` | See Postmark API Error Codes |
| `Message` | Response message |

## Send Email with Sendgrid

Using your Sendgrid API Key, send a basic email.

- **Slug:** `send-email-with-sendgrid`
- **Type:** `template`
- **Revision:** 3
- **Image:** Default task image.

> [!WARNING]
> Revisions 1 and 2 do nothing and end `succeeded`: the command they call is no longer in the task image. Later revisions work. Upgrade a node pinned to revision 1 or 2 in the editor. See [Some older task revisions do nothing](https://www.useboomerang.io/docs/flow/main/introduction/known-issues#some-older-task-revisions-do-nothing).

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| API Key | `apiKey` | Secured | Yes |  |  |
| To | `to` | Text | Yes |  |  |
| From | `from` | Text | Yes |  |  |
| CC | `cc` | Text | No |  |  |
| BCC | `bcc` | Text | No |  |  |
| Reply to | `replyTo` | Text | No |  |  |
| Subject | `subject` | Text | No |  |  |
| Content Type | `contentType` | Select | Yes |  |  |
| Body Content | `bodyContent` | Text Editor | No |  |  |
| Attachments | `attachments` | Text Area | No |  | List of files to be used for attachment |

No results.

### Example

Email the person who decided an approval with its outcome. This is the `email` task in [Use an approval's results](https://www.useboomerang.io/docs/flow/main/tutorials/manual-approval-output).

| Field | Value |
| --- | --- |
| **Task name** | `email` |
| **API Key** | `$(params.sendgrid-api-key)`, a workflow parameter of type **Password** |
| **To** | `$(tasks.approval.results.approvalUserEmail)` |
| **From** | Your SendGrid verified sender, such as `releases@example.com` |
| **Subject** | `Approval $(tasks.approval.results.approvalStatus) by $(tasks.approval.results.approvalUserName)` |
| **Content Type** | `Text` |
| **Body Content** | The text below |

**Body Content**

```text
The approval ended with these results:

- status: $(tasks.approval.results.approvalStatus)
- by: $(tasks.approval.results.approvalUserName)
- comments: $(tasks.approval.results.approvalComments)
```

The task succeeds once SendGrid accepts the message, and returns no results. **To**, **CC** and **BCC** take several addresses separated by commas, with no spaces: the task doesn't trim them. **Attachments** takes one absolute path per line.

### Common problems

| Symptom | Cause | Fix |
| --- | --- | --- |
| The task succeeds, but no email is sent | The node is on revision 1 or 2, which do nothing. | Select the node's yellow warning icon, then **Update task**, and save a new version. See [Some older task revisions do nothing](https://www.useboomerang.io/docs/flow/main/introduction/known-issues#some-older-task-revisions-do-nothing). |
| The task fails with `Email with Sendgrid was NOT sent. StatusCode: 401` or `StatusCode: 403` | SendGrid refused the request. 401 means the API key is wrong. 403 usually means **From** isn't a verified sender, or the key can't send mail. | Check the key your parameter holds, and verify the sender in SendGrid. |
| The task fails with `StatusCode: 400` | SendGrid couldn't accept the message, often because **Body Content** is blank or an address isn't valid. | Fill in **Body Content**, and check each address. |
| The email arrives without its attachment | A path in **Attachments** doesn't exist, or is relative. The task logs it and sends the email anyway. | Give absolute paths, such as `/workspace/report.pdf`, with **Shared workspace for each run** on. |

## Send Email with Sendgrid Template

Using your Sendgrid API Key, send a Dynamic Template email using a template ID and dynamic data.

- **Slug:** `send-email-with-sendgrid-template`
- **Type:** `template`
- **Revision:** 3
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| API Key | `apiKey` | Secured | Yes |  |  |
| To | `to` | Text | Yes |  |  |
| From | `from` | Text | Yes |  |  |
| CC | `cc` | Text | No |  |  |
| BCC | `bcc` | Text | No |  |  |
| Reply to | `replyTo` | Text | No |  |  |
| Subject | `subject` | Text | No |  |  |
| Template Id | `templateId` | Text | Yes |  |  |
| Dynamic Template Data | `dynamicTemplateData` | Text Editor - JavaScript/JSON | No |  |  |
| Attachments | `attachments` | Text Area | No |  | List of files to be used for attachment |

No results.

## Send Twilio SMS

Sends a text message using Twilio SMS

- **Slug:** `send-twilio-sms`
- **Type:** `template`
- **Revision:** 2
- **Image:** Default task image.

**Parameters**

| Label | Name | Type | Required | Default | Helper text |
| --- | --- | --- | --- | --- | --- |
| Account Sid | `accountSid` | Text | Yes |  | Located on your Twilio project dashboard |
| Auth Token | `token` | Secured | Yes |  | Located on your Twilio project dashboard |
| From | `from` | Text | Yes |  | Must include + and a country code, e.g., +1 |
| To | `to` | Text | No |  | Must include + and a country code, e.g., +1 |
| Message | `message` | Text Area | Yes |  |  |

No results.
