Outgoing Email Sending Actions
ThinkAutomation includes a range of messaging and communication actions that allow your Automations to send information to users, customers, or other systems. These actions enable you to automatically send emails, forward incoming messages, schedule future messages, request user validation, send calendar appointments, and post messages or files to external platforms such as Slack or Twitter. Each action supports %variable% replacements so that outgoing messages can be personalized, dynamically generated, or tailored based on the content of the incoming message and the logic of your Automation.
Send Email
The Send Email automation action can be used to automate the sending of outgoing email messages.
Emails can be sent immediately or you can Schedule Send on future dates. Email messages can be sent in plaintext, Markdown and/or HTML format. You can add attachments and you have the option of including the incoming attachments.
Enter the From & To addresses and Subject. The Reply To, CC & BCC are optional. The To, CC and BCC entries can contain multiple addresses separated with commas, semi-colons or line breaks.
If you want to send the email to the sender of the incoming message set the To address to the %Msg_From% built-in variable.
The To address should contain the recipient name and email address where possible. This will reduce the likelihood of the recipient mail server marking the email as spam. The format is: name \<email>. For example: Howard Williams \<howard.williams@somecompany.com>. You can use %variable% replacements for both parts. The %Msg_From% will already contain both name & email parts if the sender supplied them.
Adding an Unsubscribe link to your emails will also reduce likelihood of the email being marked as spam. You can create a Web Form message source with an unsubscribe form to process unsubscribes and then include the Web Form URL as a link in outgoing emails.
Sending To Multiple Recipients
The To address can contain multiple recipients separated by commas, semi-colons or line breaks. The receiver of the email will see all addresses in the 'To' address on the email they receive. If you want to send the same email to multiple recipients without each receiver seeing the other recipients you can use a For..Each loop, looping on Comma Separated Values In or Lines In. Inside the loop, use the Send Email action and assign the To address to the variable containing the individual email address. Each email will then be sent separately with a single 'To' address.
Attachments
You can attach files to outgoing messages. You can also include attachments from the incoming message.
To add attachments - click the ... button on the Attach box to add local files. You can also use %variable% replacements in the Attach box to include files created by other actions.
If any of the attachment files do not exist, the action will throw an error and the email will not be sent. If you need to force the email to be sent if attachment files do not exist add an On Error action with the Resume Next option, before the Send Email action.
Enable the Include Incoming Attachments option to automatically add any incoming attachments with the outgoing email. This will be in addition to any other attachments you add.
Enable the Include Incoming Inline Attachments option to attach incoming inline attachments. Inline attachments are images and other types of file that are included in the body of the incoming email. If this option is enabled then ThinkAutomation will add the inline attachments as regular attachments to the outgoing message.
Message
For the body of the email click the Message tab to enter the message text. Click the HTML tab to compose the HTML portion (you can use either or both). When the email is sent it will include both plaintext and HTML. If HTML is specified, but no plaintext, then ThinkAutomation will automatically create the plaintext portion of the email from the HTML. Both the Message and HTML can contain %variable% replacements.
Using Pre-Prepared HTML
If you have created a %variable% containing HTML (for example using the Wrap HTML action) you can use this on the Message tab. If the %variable% content of the Message tab is HTML (contains <html> and <body> tags) and the HTML tab content is blank, then ThinkAutomation assumes you want to send HTML content.
Markdown
You can use Markdown in the Message tab text. The Markdown will be converted to HTML when the email is sent. To use Markdown to HTML conversion - ensure that the HTML tab content is blank. You can disable the Markdown to HTML conversion by unchecking the Convert Markdown To HTML When Email Is Sent option. See: Markdown Notes.
External Content For HTML
For HTML content you also have the option of using an External File or URL For HTML. If an external file or URL is specified then this will be read and used for the HTML content. When using an External File or URL then you also have the option to Embed Images. If Embed Images is enabled then any external images used in the HTML will be downloaded and embedded. Not all email clients will display embedded images - so you should test this option before using.
If the Convert CSS To Inline Styles option is enabled then any stylesheets in the HTML will be converted to inline style attributes. This provides better email client compatibility.
Scheduling Messages
Email messages can be sent on future dates using Scheduled Send option.
For example, suppose you have an Automation that responds to a sales order email. The Automation sends the customer a 'thank you' email when the order is received. You could then use the Scheduled Email option to send a follow up email in 30 days time to see how the customer is getting on with their new product.
Any number of scheduled email responses can be setup. ThinkAutomation saves the email in the Message Store database along with the scheduled date and time that the message should be delivered.
Enable the Scheduled Send option and specify either Send After n Days or Minutes, or Send On A Specified Date/Time and enter the date/time to send the email.
Send Option
If you are not using the Scheduled Send option you can select one of the Send Options:
-
Add To Outbox Queue - the email is added to the outbox queue and will be sent by the ThinkAutomation Server as a separate process (with automatic retries for any temporary failures). The Automation will not wait for the email to be sent. Your Automation will execute faster with this option. This is the default option.
-
Send The Email Immediately - the email is sent immediately and the Automation will wait for the result. The result can be returned to a variable from the Assign Result To list. The result will be 'success', 'retry' or a fail reason. If your outgoing email server returns a temporary failure, then the result will be 'retry' and the email will be added to the outbox queue to be retried later.
-
Do Not Send The Email - the email is not sent. The mime text can be returned to a variable (see below).
Assign Mime Text To
You can also optionally assign the MIME text (EML) created for the outgoing email to a variable. This is useful if you want to save the mime text to a folder for an external mail server to pickup, or use a custom action or script to actually send the message. If the Do Not Send The Email send option is selected, then ThinkAutomation will not send the email itself - it will just assign the resulting mime text to the specified variable.
Send Via
By default outgoing emails are sent using the Email Sending options specified in the Server Settings. You can optionally specify email sending options on a per outgoing email basis. This is useful when you want to route specific outgoing emails via specific mail servers. For example, suppose you have two mail servers, one located in the USA and one in the UK. You could choose to send emails via the USA or UK server based on some condition.
Click the Send Via tab to specify the Send Via options.
Each of the Send Via options can use %fieldname% replacements. This allows you to conditionally set the Send Via options.
Send Signed
You can optionally digitally sign the outgoing email. A digital signature is a unique identifier that validates the authenticity of a person’s outgoing email messages and assures recipients they have come from that person, as opposed to a cybercriminal or unknown sender. Unlike a simple electronic signature, digital signatures cannot be replaced or altered, thus giving recipients peace of mind that the contents of the incoming message are safe before opening it.
Select the Send Signed tab and enable the Send Signed option. You must then select a certificate to use for the signing. Click the Select Certificate button. You can choose a certificate imported into the Windows Machine certificate store, or select a PFX file. Only certificates that have been obtained from an independent certificate authority and are valid for email signing should be used.
The Send Signed option is not available when using SendGrid to send outgoing messages.
Send Test Email
The Send Test Email button will send the current message immediately, regardless of the Schedule or Send Option. The email will be sent using any Send Via settings. Change the To address if you want to send a test message to yourself.
Remove Scheduled Outgoing Message
Removes any pending scheduled emails for a given recipient.
This action can be used to cancel the sending of any scheduled emails. This could be used for example on an 'Unsubscribe' Automation.
Specify the recipient email address in the Remove Scheduled Message To entry.
The From can be blank - or if completed, only messages from the given address will be deleted.
You can remove only messages matching a Subject - or leave blank for all.
The number of scheduled messages removed can be assigned to a variable. Select the variable from the Assign Number Remove To list.
Forward Original Message
Forwards the incoming message to new recipients.
Specify the From and To addresses. The Subject can be changed - if you wish to use the incoming subject set it to %Msg_Subject% (or 'FW: %Msg_Subject%').
You can add additional attachments and Drop Incoming Attachments.
Wait For User Response
Waits for a user response before proceeding with the remaining actions for the Automation.
This action can be used to provide a human validation response in the form of a unique web form that must be completed before the Automation continues. This can be used to gather additional information from a user. ThinkAutomation will pause execution of the Actions for the current message until a user completes the web form. It will move on to process the next message whilst waiting for the validation of a previous one. A single Automation can contain multiple Wait For User Response actions. The web form can optionally contain Survey Fields. If any survey fields are specified then the user must complete the form before validating the message. The results of the survey fields are passed back to the Automation and can be used in subsequent actions
For each Wait For User Response request ThinkAutomation creates a unique Validation URL. You must send an email or SMS containing the %Msg_ValidationUrl% variable replacement to someone. When the recipient receives this email they click the URL to validate the message. Once validated the remaining actions setup on the Automation are then executed for that specific message. Validation URLs are secured using a one-way hash, so a user could not validate the wrong message by manually changing the URL.
You can either use a separate Send Email or Send SMS Action to send you own message containing the %Msg_ValidationUrl% variable (send before the Wait For User Response action itself) or enable the Send Request Via Email option to include the email sending within the Wait For User Response action itself. You can customize the email content. The Body text must contain %Msg_ValidationUrl% somewhere.
The Send Request Via Studio & Client Users option will send the validation request to any users running the ThinkAutomation Studio or ThinkAutomation Desktop Connector. Studio and Desktop Connector users can complete the validation request from there. You can specify specific Usernames or leave this blank to send to any ThinkAutomation Studio or Desktop Connector users (connected to your ThinkAutomation Server instance).
Show Accept Buttons
If this option is enabled then the validation page will show Accept & Not Accept buttons below the validation page message. The user must click the Accept button to validate the message. If the Do Not Accept button is clicked then the message is rejected and the Timeout/Not Accepted Action performed. If this option is not enabled then the user only needs to click the Validation URL to validate the message (unless survey fields are used - see below). You should adjust the Validation Page Message accordingly.
Continue On Timeout
If this option is enabled then the Automation will continue if the validate request has not been completed before time timeout. The Assign Result To variable will be set to 'expired'.
Max Wait Time (Mins)
This is the maximum number of minutes that ThinkAutomation should wait for the validation. It defaults to 2880 (48 hours).
Assign Result To
Select the variable to receive the validation result. This will be 'true', 'false' or 'expired'. Within your Automation you can then perform conditional actions based on the result.
Survey Fields
In addition to displaying a message, ThinkAutomation can optionally show a form containing any number of input fields. If any fields are specified then the user must complete the form before validating the message. The results of the form are passed back to the Automation and can be used in subsequent actions. Click Add to add a new input field.
Enter a Name and Label Text. You can also optionally specify Help Text that will display in a smaller font below the input field.
The Field Type can be:
- Text
- Number (numeric only)
- Date
- Boolean (check box)
- HTML Editor (a full featured HTML editor - returns HTML)
- Email (only a valid email address allowed)
- URL (only a valid URL allowed)
- Telephone
- Password
- Decimal
- Currency
- Time
- Range
- Label (displays the label text only - does not return a value)
For text field types you can specify the Max Length. The Max Lines option allows you to define the maximum lines.
The Attributes tab allows you to specify a default value, change case & validation rules. Enable the Validate option. When the web user completes the form they will not be able to submit it until all of the fields pass validation.
If you want the user to select possible values from a list, select the Must Be In List option and then enter the Choices. For example to show a list box showing 'Yes', 'No' & 'Not Sure', set the Field Type to 'Text', enable the Validate option, select the Must Be In List option and add Choices of 'Yes', 'No' and 'Not Sure'. The default value of the select list will be set to the Default Value entry.
You can arrange the order of fields on the form using the Up & Down buttons.
Assigning A Survey Field Value To A ThinkAutomation Variable
You must then select a ThinkAutomation variable to assign the entered value to. Select the variable from the Assign Value To list. Once a message is validated and the Automation continues execution, you will be able to make use of input values in subsequent actions.
A simple example would be a single field that asks 'Add customer %Name% to CRM?' - with a Y/N choice. The value can be assigned to a Variable called '%AddCRM%'. After the Wait For User Response Action you can add a conditional Action: 'If %AddCRM% Is Equal To Y Then ....'
The Wait For Used Response web page uses the ThinkAutomation Web API hosted in Azure, so it will work without requiring any local setup.
Send Appointment
Creates an appointment in any iCalendar compatible Calendar Server, sends an iCalendar compatible appointment request as an email attachment or saves the appointment to a file which can be attached to an email on a subsequent action.
iCalendar is used and supported by a large number of products, including Google Calendar, Apple iCal, Lotus Notes, Yahoo Calendar, Microsoft Outlook and others.
The Send As drop down has three options:
- Send Directly To An iCalendar Server: This option allows you to post directly to an iCalendar Server using the CalDav protocol. You need to specify the URL of the server to post to. This URL will depend on the Calendar Server you are using.
For Google Calendars use: https://www.google.com/calendar/dav/{googlemailaddress}/events/ - and use your Google user name/password.
You may need to specify a User Name and Password and Authentication mode if the iCalendar Server requires a login first. Login to your iCalendar Server to obtain the iCal address.
-
Send To An Email Recipient: With this option you specify an email address. The appointment will be sent as an attachment with the .ics extension. Most Calendar applications will import this directly when the recipient opens the attachment.
-
Save To File: Saves the Appointment to a local file with an .ics extension. You can then use this as an attachment on other Send Email actions.
All remaining text fields can use %variable% replacements.
You must specify the Attendees as email addresses. Multiple addresses can be separated by commas.
The Categories, Location, Subject & Description fields are optional.
The Organizer must be specified as an email address.
The Start Date/Time and End Date/Time can use %variable% replacements if required. If a Start/End Date is given as a %variable% replacement then the variable contents must be able to be interpreted as a date.
Send Slack Message
Send a message and/or files to a Slack channel. Slack is a messaging and collaboration platform. See: https://slack.com for more information.
Before you can use this action you must first authorize ThinkAutomation to connect to Slack. Click the Connect button and enter your Slack username/password. You will then be asked if you want to allow ThinkAutomation to be able to post messages to Slack.
Once connected your team name & domain will be shown
You can post messages and/or upload files to any of your team channels that the authorized user has access to.
Posting A Message
Enter the Send Message text you want to post. Leave this blank if you only want to upload files.
Uploading Files
Expand the Select Files box and enter or select the file you want to upload. This can be a single file or a comma separated list. %variable% replacements can also be used if you want to upload files created from previous actions. You can also optionally Include Incoming Attachments. Enter the Mask for the attachment types to upload (eg: *.pdf).
If the Post The Message From The Authenticated User option is enabled then the post will be from the Slack user you connected with, otherwise the post will show as from a bot called ThinkAutomation.
Select the channel you want to post the message/files to from the Post To Channel drop down - this will list all the channels available to your team.
You can assign the result of the post to a variable. Select from the Assign Response To dropdown. If the post was successful the response will be 'Ok'. Otherwise it will contain an error message.
Send Tweet
Send a Tweet to Twitter or reply to an incoming Tweet.
Before you can use this action you must first authorize ThinkAutomation to connect to Twitter. Click the Connect button and enter your Twitter username/password. You will then be asked if you want to allow ThinkAutomation to be able to post Tweets to Twitter. Tweets will be sent on behalf of the this user.
Enter the Send Tweet test. This can contain %variable% replacements. Twitter limits Tweets to 280 characters. ThinkAutomation will truncate the message if required.
If the incoming Message Source type is Twitter you can reply to the current message. Enable the Reply To Incoming Tweet option. For example: You could create a Twitter Message Source to monitor your @mentions for your own Twitter account. Any Tweets with 'great/good service' etc you could automate a 'Thank you' reply.
ThinkAutomation uses the new Twitter Version 2 API. The Send Tweet text can be set to the Json body for more complex Tweets. See: POST /2/tweets | Docs | Twitter Developer Platform