Skip to main content

Creating a Send Email Action on a Workflow Task

A Send Email action lets you send templated emails to members as part of an automated workflow. For email campaigns, you attach this action as the entry item on the first task of a workflow — when a member enters the task, the email fires automatically.

How it fits together: "Send Email" is an Action type in Gravity Rail. In a campaign workflow, you assign it as the entry action on your first task. When a routine triggers the workflow for each targeted member, the member enters the first task, which fires the Send Email action and delivers the email.

Prerequisites​

  • A workflow with at least one task (see Workflows)
  • An inbox configured in your workspace (see Email & Inboxes) — this determines the "from" address for the email
  • Your email content ready (subject line and body)

Steps​

1. Open your campaign workflow​

Navigate to Workflows and open the workflow you'll use for the campaign. If you don't have one yet, create a new workflow and add at least one task (this will be the task that sends the email).

2. Navigate to the Actions page​

Go to Actions in your workspace.

3. Create a new action​

Click New Action.

4. Configure the trigger​

Set the trigger to Task Entered and select the first task of your campaign workflow. This ensures the email fires when a member enters the task — which happens automatically when the routine starts the workflow for each member.

5. Select "Send Email" as the action type​

In the action type dropdown, select Send Email. The email configuration form will appear.

6. Select the inbox​

Choose the inbox that will send the email from the From dropdown. This determines the "from" address and reply-to behavior. Saving the action requires that you can send from the inbox; the member it runs for needs no inbox access. Replies to this email will be received by this inbox (and can trigger a reply-handling workflow — see the main tutorial).

If the Inbox does not exist yet, select Create Inbox from From. After you save the new Inbox, it is selected and your email draft stays intact. This option requires permission to create Inboxes.

Send To defaults to The Member this event is about (in a Journey step: The Member in this Journey), meaning the Member the action runs for. Choose Teammates you choose to pick one or more existing Members instead. You cannot type an email address.

Workflow defaults to No workflow. Selecting a Workflow creates a Chat for each recipient Member when the action runs. Replies to that Chat continue its Workflow, even if the Inbox has no default Workflow. With No workflow, the action sends a standalone email; a reply follows the Inbox's new-thread routing, including its default Workflow if configured. No workflow does not disable the Inbox's reply automation.

A selected Workflow sends its own opening message. If you also supply a custom Subject and Body, those are sent as a separate email. A Workflow-only action always goes to the selected recipient Members; an older typed address is ignored.

7. Enter the subject line​

In the Subject field, enter your email subject. You can use template variables for personalization:

{{member.first_name}}, your enrollment update is ready

8. Enter the email body​

The Body field shows a preview of your current message. Click it (or the Edit email button that appears on hover) to open the full Edit email body dialog.

The dialog's editor is a rich text editor by default — format your message with the toolbar: headings, bold/italic/underline/strikethrough, bulleted and numbered lists, blockquotes, a divider, left/center/right alignment, and links. Insert template variables either by typing {{ for autocomplete or from the Variables dropdown in the toolbar, the same {{member.first_name}} syntax used in the subject line.

Hello {{member.first_name}},

We're reaching out about your enrollment in the program.

If you have any questions, simply reply to this email and our team will assist you.

Need formatting the toolbar can't express? Click Raw HTML in the toolbar to edit the HTML source directly; click Edit to go back. If switching back would change your markup (TipTap simplifies some hand-written HTML), you'll be asked to confirm first — Cancel keeps your source exactly as typed.

Click Preview in the toolbar to see a full-width rendering of your current draft with sample values for template variables. The preview uses the outbound body assembly, including the footer and layout, but it cannot guarantee how each recipient's email client will display the message. External images are blocked in the preview. Click Edit to go back, or start formatting again — clicking a formatting control leaves preview and applies that action. Your draft is unchanged either way.

Click Done to apply your changes and close the dialog, or Cancel to discard them (you'll be asked to confirm if you've made unsaved edits).

Insert an image from the toolbar's Image button — upload a new file, pick one already in your workspace, or paste an external URL. A workspace image is embedded in the email by default, so it shows up for every recipient even offline; you can switch it to a link instead, but only once the file is public and shareable (change that from the file's own Share dialog on the Files page — the image dialog links there for you). Embedded images are capped at 2 MB each and 6 MB total per email, and an email may reference at most 20 workspace images in total — embedded or linked; the live preview checks these limits, along with sharing and file format, before you send. It can't catch everything, though — a failure reading the file's bytes or a delivery error only shows up after you send, in the email record. One preview caveat: images hosted on external sites are not loaded in the preview at all, so check those in a test send. Give each image alt text in the dialog so screen-reader users get a description; select an inserted image to set its width, alignment (left or centered), edit its source, or remove it. To show a Site's own logo, choose it under Sites in Insert Variable; Template Filters says what happens when the Site has no logo.

9. Choose other recipients (optional)​

To send the email to other Members instead of the Member the event is about, choose Teammates you choose in Send To and pick up to 20 Members. Each Member receives a separate email, so recipients do not see one another's addresses. Each email goes to the address on that Member's record, and a Member who has disabled email notifications is skipped. A recipient also needs access to the Chat that triggered the action, or the send is refused. Email addresses that are not Members of the workspace are not accepted, and older rules that used typed addresses were reduced to the ones that matched exactly one active Member.

If the inbox you chose is archived, the action fails every time with "The sending inbox is archived" and does not retry. Change the action to send from an active inbox. Archiving cannot be undone.

If delivery succeeds for one recipient and a later recipient fails, Gravity Rail records a partial-delivery error. Review the individual email records before retrying; retrying the entire action could send duplicates to recipients who already received it.

10. Save the action​

Click Save to create the action. The action is now linked to your workflow task and will fire whenever a member enters that task.

Template Variables​

You can personalize both the subject and body with template variables using {{variable}} syntax. Commonly used variables for email campaigns:

VariableExample Value
{{member.first_name}}"Jane"
{{member.middle_name}}"Q"
{{member.last_name}}"Smith"
{{member.name}}"Jane Q Smith"
{{member.email}}"jane@example.com"
{{member.phone}}"+1 555 123-4567"
{{member.date_of_birth}}"1980-06-15"
{{member.age}}45
{{member.form_data.SLUG.FIELD}}Custom Data Type values
{{assistant.name}}"Support Bot"
{{task.name}}"Customer Onboarding"

If a Member has no middle name, {{member.middle_name}} renders an empty string ("").

Your practice's phone number​

In a Journey, write {{phone_number.display}} where the email should show your phone number, for example "Call us at {{phone_number.display}}." It prints the number of the Journey's phone number: the one chosen as the number to send from on the Journey's text and call actions. Choose it on at least one of those actions that is switched on, and wherever one of them chooses a phone number, choose the same one; an action that leaves the choice to a default number does not count. The number prints the way a person reads it: "(555) 123-4567" for a number with your workspace country's calling code, the international form otherwise. You link the number once, under Phone Numbers; you never type it into the message.

The email is not sent, and the action's Runs list shows why, when there is no number to print:

  • the phone number has no number linked yet, was archived, or no longer exists;
  • no switched-on text or call action in the Journey chooses a phone number;
  • they choose more than one.

The Journey editor's Test panel shows the number blank; the email that is sent prints it. An email that does not use {{phone_number.display}} is not affected. Outside a Journey, {{phone_number.display}} prints a number only for a Chat that arrived on a phone number, and nothing anywhere else, so use it in Journey actions. For any other phone number, use a Workspace Field.

For conditional content, use Jinja2-style blocks:

{% if member.form_data.profile.company %}
Company: {{member.form_data.profile.company}}
{% endif %}

For the full list of available variables, see Template Variables.

Email Formatting Tips​

  • Use the preview before saving — it applies sample values and shows the assembled body with the footer and layout. Email clients can render it differently, and external images are blocked; send a test email when you need to check the delivered message.
  • Keep it single-column — the editor doesn't support multi-column layouts, which is a feature, not a limitation: complex layouts break in many email clients anyway.
  • A plain-text version goes out automatically — Gravity Rail generates the plain-text fallback for you from the formatted body, so recipients who view email in text-only mode still get readable content.
  • Images are embedded by default — a workspace image inserted via the toolbar's Image button is attached to the email itself, so it renders even for a recipient reading offline. Linking to the file instead requires making it public and shareable first; an external URL inserts an externally hosted image — no upload needed, but recipients' mail clients must be able to fetch it from that host.