Skip to main content

Email Component

The Email component sends an email automatically as part of a workflow. Use it to distribute reports, notify stakeholders, or share workflow output as an attachment — all without manual forwarding. For a short alert to a phone, the SMS component is the alternative.

The Subject and Body can contain values from the workflow, such as an order number or a customer name, using {{ }} placeholders. See Placeholders in Subject and Body below.


Set it up​

  1. Add an Email step after the steps whose result you want to send.
  2. Enter one or more addresses in To, and write the Subject.
  3. Under Attachments, choose whether to attach a file or data from an earlier step.
  4. Write the Body in the editor.
  5. Click Save.

The fields are described below.

FieldDescription
ToOne or more recipient email addresses (required)
Cc / BccCopy and blind-copy recipients (optional). Click CC or BCC next to To to show the field; click the close button on the field to remove it again.
SubjectThe email subject line (required). Can include placeholders.
AttachmentsWhether to attach something to the email — see Attachments
BodyThe message, written in the editor below the attachment options (required). Can include placeholders.

Click Save to apply your changes to the step.


Placeholders in Subject and Body​

Subject and Body can include values from the workflow with {{ }} placeholders. The previous step's output is available as body:

Order {{{ body.orderNumber }}} is on its way

Placeholders can also show text only when a condition is true ({{#if}}) and repeat content for every item in a list ({{#each}}), for example to build an HTML table of rows. Use three braces in the Subject and in a plain-text body, so a value like Smith & Sons isn't turned into Smith & Sons. In an HTML body, use two ({{ body.name }}) so special characters are shown as text.

Do calculations, filtering and formatting in a Transform step before the Email step, so the template only places finished values.


Writing the message​

The message is always sent as an HTML email. Use the two tabs above the editor to choose how you write it:

TabUse it to
Visual editorWrite and format the message the way it will look, using the toolbar
HTML EditorEdit the underlying HTML directly, for example to paste in a finished template

Both tabs edit the same message, so you can switch between them at any time.

The toolbar in the visual editor lets you:

  • choose a style: Heading, Subheading or Normal, and a font (default, serif or monospace)
  • make text bold, italic or underlined
  • change the text colour and the background colour
  • create numbered or bulleted lists and set the alignment
  • insert an image

Attachments​

Under Attachments, choose what to attach:

OptionWhat is attached
NoneNothing — the email is sent without an attachment
Generated filesA file produced by an earlier step, for example the spreadsheet from an Excel step
Raw outputThe output data of an earlier step, as JSON

After choosing Generated files or Raw output, pick the step in Source step for data. Only steps that run before the Email step are listed.

  • Generated files lists the earlier steps that can produce a file: Excel, Rest API, Data lake and Converter. If none of the earlier steps can, the list shows No steps before this one can produce a file.
  • Raw output lists every earlier step.
  • If there are no steps before the Email step at all, the attachment options are disabled.

Recipients​

Enter several addresses in To, Cc or Bcc by typing each one and pressing Enter. An entry that is not a valid email address is marked Invalid email, and invalid entries are removed when you save.

A recipient can also be a placeholder that holds an address from the workflow, such as {{{ body.email }}}, as long as the whole entry is a single placeholder.


Example​

Send a daily report as an Excel file to a distribution list:

  1. A Schedule trigger starts the workflow every morning.
  2. Earlier steps fetch the data, and an Excel step puts it in a spreadsheet.
  3. The Email step is set up like this:
    • To: the report recipients
    • Subject: Daily sales report
    • Attachments: Generated files, with the Excel step chosen in Source step for data
    • Body: Hi, the daily sales report is attached.

Each morning the recipients get the email with the spreadsheet attached. Other uses: notify a team when an M3 transaction completes, or alert stakeholders when a filter step produces zero results.


Tips and limits​

To, Subject and Body must all be filled in. If one is empty when you click Save, a warning asks you to fill it in or remove the Email step.

The Email component waits for all preceding components to complete before sending. Once sent, the execution log records the dispatch time and delivery status (success or error).


Further reading​

  • Email a Run Summary — send a summary of a workflow run, with a table of failures
  • Templating Reference — placeholders and helpers for Subject and Body
  • SMS — send a text message instead of or in addition to an email
  • Schedule Trigger — automate report delivery on a timed schedule
  • Excel — generate the spreadsheet to attach to the email