Message Node

Overview

The Message node sends a custom email or text message (SMS) as part of your workflow. This feature is ideal for sending confirmations or notifications that can be styled using Nunjucks Nunjucks is a templating language that's powered by JavaScript. It's a way of extending HTML to add logic, loops, and various other capabilities.. These messages send using traditional email or Twilio. Twilio lets you configure your workflow to automatically send text messages. When your workflow completes, your recipient receives an email or SMS based on your selection.

Here are some real-world examples of Message node automation:

  • Confirm receipt of a submission.

  • Submission approval or denial.

  • Notification of missing information.

You can also use the Message node to reference any persistent data from an earlier point in the workflow. That way, you can use the node as an alternative to a message-sending service like SendGrid. Here are two ways to configure this scenario:

1. Creating a workflow submission using a Plug-In component. Then, you can reference that submission using a Message node.
2. Retrieving existing submission data from a schema module. Then, you can use that data to create a workflow submission and reference it with a Message node.

For this method to work, data must be persistent from one screen to the next in your workflow.

The Message node is never the first node in your workflow. It has an input port and an output port used to connect other nodes. But, you can have several Message nodes in a single workflow.

You'll find the Message node in the list of nodes to the left of the Workflow Builder.

Similar Workflow Nodes

There are various ways to send messages with a workflow. Let's take a look how these different messaging nodes differ.

  • Message node: Sends an email or text message to a recipient.

  • Error node: Reroutes a task in the Automated swimlane when an error occurs.

  • Signal node: Displays a message to the end-user at a specified point in the process.

What You'll Learn

After completing this article, you’ll know how to use the Message node to send custom email or text (SMS) messages. You'll also learn how to configure the Message node's most commonly used settings.

Settings Menu Description

Let's explore the node's Settings Menu. This menu displays as a blue menu bar, either above or below the node, when you select the node itself. The Message node has the following settings:

Setting

Description

Edit

Takes you to the Edit Message Event window, where you can configure related settings.

Delete

Removes the node from the workflow.

Edit Message Event Window Description

Click the Edit button to display the Edit Message Event window.

The following settings are available in the Edit Message Event window:

General

Setting

Description

Label

The name of your node. By default, the Label displays as message-1. The label you enter here is optional and displays below the node on the workflow canvas.

Define your labels by associating them with the role of the node.

Send Via

Displays two methods to send outgoing messages.

  • Email: Sends email messages from your workflow.
  • Twilio: Sends text messages from your workflow.

X (Close)

Closes the Edit Message window, returning your focus to the pool.

Send Via

Here, you'll see a drop-down showing available services you can use to send your message. By default, the only option you see in the Send Via field is Email. No other setup is needed to use this option.

You can only add up to 50 email addresses per workflow message node. This includes the combined total of addresses used in the To, Cc, and Bcc fields. You can organize the recipients in any way as long as it’s not more than 50 total.

To use the Twilio option to send an SMS, you need additional setup. You can do this under Services Administration in your environment. Once you add a Twilio service, it displays in the Send Via drop-down.

To learn how to integrate Twilio SMS, view our Twilio SMS Integration Template article.

Once you select the service you want to use, customization fields display In these fields, you can either hardcode your own text or retrieve data from a previous screen in the workflow. Use the {{data.fieldName}} notation to retrieve information.

To carry this data from one screen to another, you must select Store Data in Database for these fields. The Store Data in Database setting affects how data persists through your application. You can also use the Pass Non-persisted Express Data to Automated Tasks setting at the workflow level.

The Cc, Bcc, From Name, Reply To, and Subject settings only apply when sending an Email. The Media URL and Log this Message only apply when sending a message with Twilio.

Setting

Description

To

What to enter in the To field depends on the Send via selection you made.

Send via Email: Enter an email address for your message. For example, you can enter {{data.to}}. This is the default email address your administrator has for your specific company email. You can also manually enter an email address, like name@domain.com.

Send via Twilio: Enter a phone number for your message. This field accepts the standard American telephone number of ten digits, such as (555) 555-1234.

These options do not reflect whether your service authorization is correct or not. If you select a service with invalid authorization, a 500 error occurs when running your workflow.

Cc

Enter the email address of your secondary recipient or the address to copy on your email.

Bcc

Enter the email address to blind copy on your email.

From Name

Enter your sender's name here. This is a required field.

Reply To

Enter your sender's email address. If you want your end-user to be able to reply to your message, enter a valid email address. If not, consider using a no-reply@domain.com address.

You can customize the default From email as part of your environment's setup.

Subject

Enter a subject line for your message. This is a required field.

Media URL

Sends media in the form of video, audio, ecard, or image with the outgoing message. All media URLs must be accessible to Twilio (publicly-hosted) for the message to send.

Template

Lets you set a template for the outgoing message. This template uses plain text, HTML, or Nunjucks templating language.

Generate and Send Refer String

When this toggle is ON, you see the Refer String TTL (Time to Live) and Refer String Redirect Target settings.

If your end-user is communicating over SMS or email, there's a chance they're not logged into Unqork. When you switch this toggle ON, you can send a link to your end-user. Using this link, your end-user can access Unqork.

By default, the Generate and Send Refer String toggle is set to OFF.

Refer String TTL

Sets the length of time that your message link remains serviceable.

By default, the Refer String TTL is 10 minutes.

Refer String Redirect Target

A Refer String needs an encoded destination page. The Refer String Redirect Target is part of that string. When that string loads, the end-user redirects to the destination page.

Log This Message

When set to ON, your message stores in a log for up to 13 months.

By default, the Log this Message toggle is set to OFF.

Adding a Message Node

In this example, set up a simple workflow with a Start, Task, and Message, and End node to send an email. This Task node calls a General Information module. Using this module, your end-user can submit their data. Then, the Message node sends a confirmation receipt email. This use case assumes that you set up your module and have a new workflow ready and waiting.

Here's how your completed workflow looks:

A static image displaying a completed workflow using a Message node.

What You Need

To set up this use case, you need:

Configure the Start Node

1. Select your Start  node.
2. Click Edit.
3. In the Label field, enter Start.
4. Click X (Close).

Configure the Task Node

Add a Task node to connect to your General Information module. Using this module, you can collect basic information from your end-user.

1. Drag and drop a Task  node in the pool, positioning your node in the Authenticated swimlane.
2. Click Edit.
3. In the Label field, enter General Information.
4. From the Module drop-down, select Enablement Lab: Message Use Case - General Info.

A static image displaying the Workflow builder, the Screentask node is selected, the Edit User Task menu is open with the Label and Module fields highlighted.

5. Click X (Close).
6. Connect the output port (right) of the Start node to the input port (left) of the Task node.

Configure the Message Node

Next, add a Message node. Use this Message node to send a confirmation email to your end-user acknowledging receipt of their basic information.

1. Drag and drop a Message  node in the Authenticated swimlane.

Position the node at the point where you need the message. In this use case, that's after the submission of an end-user's basic information. So, position your Message node after the Task node.

2. Click Edit.
3. From the Send via drop-down, select Email.
4. In the To field, enter {{data.email}}.

{{data.email}} references the value your end-user enters in the Email field of the General Information module.

A static image displaying the Edit Message Event page of the Message node, the Send Via and To fields are highlighted.

5. In the From Name field, enter Unqork, or a custom sender name.
6. In the Reply To field, enter no-reply@unqork.com or a custom sender address.
7. In the Subject field, enter Your Application.
8. In the Template field, enter the following:

Hi {{data.firstName}},

Thank you for submitting your application. We'll be in touch soon.

{{data.firstName}} references the value your end-user enters in the First Name field of the General Information module.

A static image displaying the Edit Message Event window of the Message node, the From Name, Reply To, Subjuct, and Template fields are highlighted and filled out.

9. Click X (Close).
10. Connect the output port (right) of the Task node to the input port (left) of the Message node.

Configure the End Node

1. Drag and drop an End  node in the pool, placing the node in the Authenticated swimlane.
2. Click Edit.
3. In the Label field, enter End.
4. Click X (Close).
5. Connect the output port (right) of the Message node to the input port (left) of the End node.
6. Click Save....
7. Click Save.

Now you're ready to test your workflow. Click Preview and complete the required fields in the General Information module. To send the test email to yourself, enter your own email address. After clicking Next, you see the "Thank you! This submission is complete." message. Check your email account for the email.

Resources