Output · Send and serve

Email

Sends an email through a saved mail connection, with the table in the body or attached as a CSV. It can use a report as the email body.

Also known as: Notify, send report

How it works

Pick an SMTP credential saved in the vault, add the To addresses and optional Cc, and write the Subject and the Body. Both take tokens that are replaced when the mail is sent: {{date}} and {{rows}} (the row count), and in the body {{table}}, which prints the incoming table up to the number of Inline rows (100 by default). Attach as file also attaches the input as a file; a table is written to CSV first. The second input, body, takes an HTML file from Write Report and uses it as the email body instead of the template. Wire either input or both; the node needs a credential and at least one recipient.

Inputs and outputs

Inputs

  • data — Any
  • body — Any

Outputs

None — this node starts a workflow.

Settings

The Attributes panel of Email, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  to: string[]
  cc?: string[]
  subject: string
  bodyTemplate: string
  tableRowLimit: number
  credentialName: string
  attachAsFile?: boolean
}

subject and bodyTemplate take template tokens replaced when it sends: {{date}}, {{rows}} (the row count) and, in the body, {{table}} (the incoming table, up to tableRowLimit rows), e.g. "Pipeline complete — {{rows}} rows." then {{table}} on its own line; attachAsFile also attaches the `data` input as a file (a table is written to CSV first); credentialName must be one of the SMTP credentials listed above, or omitted

Example

A daily exceptions mail. Wire the exceptions table into the first input, Subject "Exceptions {{date}}: {{rows}} rows", Body "Rows needing attention:" followed by {{table}} on its own line, Inline rows 50, and Attach as file so the full list comes along as CSV. For a formatted monthly report, wire Write Report's HTML output into the body input instead.