> For the complete documentation index, see [llms.txt](https://docs.octoxlabs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.octoxlabs.com/action-center/general/send-mail.md).

# Send Mail

Sends one HTML email per workflow run to the recipients you list. The mail contains the assets collected by the previous nodes, for each inventory you selected on the node, in the columns you chose with **Edit Columns**. By default the assets are attached as a CSV file; you can attach XLSX instead or put them in the body.

### Before you begin

* The platform mail (SMTP) settings must be configured: the job sends through the platform mail connection and sender, not through settings of its own. See [SMTP](broken://pages/69757a9f2f3a10febbebdafa6fc90883001102fe).
* Asset types: device, user, application, vulnerability, certificate, service, source\_code, ai, domain, license and policy. You pick them in the inventory selector at the top of the node form. A new job defaults to `device`.
* Columns: the columns you set per inventory with **Edit Columns** on the canvas toolbar.
* No required columns.
* Job defaults: To, Cc, Subject, Body, **Send with attachment.** and **Attachment File Type** can be saved in [Action Center Settings](broken://pages/755d278168b34a2a36cc8fe8c7533f44c34683ff).

### Settings

| Setting               | Type      | Required | Default    | Description                                                                                                                                 |
| --------------------- | --------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| To                    | List      | No       | None       | Recipient addresses. The form does not mark it required, but the job reads it without a fallback when it runs, so set at least one address. |
| Cc                    | List      | No       | Empty list | Addresses to copy.                                                                                                                          |
| Subject               | Text      | No       | None       | Mail subject. If empty, the subject is `OctoXLabs <workflow title>`.                                                                        |
| Body                  | Long text | No       | None       | Mail body, sent as HTML. If empty, the body is the workflow title and description as headings.                                              |
| Send with attachment. | Checkbox  | No       | On         | On: attach the asset list as a file. Off: put the asset list in the mail body as tables.                                                    |
| Attachment File Type  | Choice    | No       | CSV        | Choices: CSV, XLSX. Used only when the attachment is on.                                                                                    |

### How it works

* Sends a single email through the platform mail connection, with the platform sender address as From. It does not send one mail per asset.
* **Attachment on, CSV:** the file is named after the workflow title (for example `my-workflow.csv`). For each inventory it has a line `<inventory> Count: <number>`, a header line with the columns, then one line per asset. List values are joined with `|`.
* **Attachment on, XLSX:** the file is named after the workflow title (`.xlsx`) with one sheet per inventory. Row 1 holds the count, row 2 the column headers, and the assets follow.
* **Attachment off:** the body gets your text (or the default header) followed by, per inventory, a heading with the count and an HTML table of the assets. List values are joined with commas. **Attachment File Type** is ignored.
* Empty values show as `null`. Only inventories that have columns set in the workflow are included.
* If the mail cannot be sent, the job fails and the run stops. The error appears under **Error Details** in **History**. The job passes the same assets it received to the next node.

### Example

| Setting                | Value                          |
| ---------------------- | ------------------------------ |
| To                     | `secops@example.com`           |
| Cc                     | `it-manager@example.com`       |
| Subject                | `Hosts without endpoint agent` |
| Body                   | `These hosts need attention.`  |
| Send with attachment.  | On                             |
| Attachment File Type   | XLSX                           |
| Inventories            | device                         |
| Columns (Edit Columns) | Hostname, IpAddresses          |

### What's next?

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>About Action Center</strong></td><td>Workflows, triggers, conditions and job nodes.</td><td><a href="broken://pages/9322454bfeab680217d5354297769cc715319217">Broken link</a></td></tr><tr><td><strong>Action Center Settings</strong></td><td>Save default values for this job.</td><td><a href="broken://pages/755d278168b34a2a36cc8fe8c7533f44c34683ff">Broken link</a></td></tr><tr><td><strong>Send Notification (Slack)</strong></td><td>Post an asset summary to Slack.</td><td><a href="broken://pages/54177332e840c988150b4d6db75198900ea29f82">Broken link</a></td></tr><tr><td><strong>Run Webhook</strong></td><td>Send the assets to a URL as JSON.</td><td><a href="broken://pages/73b175208b057c6895f4ed7aa0f86ce527c21ea2">Broken link</a></td></tr></tbody></table>

{% hint style="info" %}
Available starting from version 2.2.1.
{% endhint %}
