Help

ThinkAutomation

Welcome To ThinkAutomation

ThinkAutomation is a business process automation solution designed to automate on-premises and cloud based business processes that are triggered from incoming messages. Incoming messages can be messages received by email, SMS, database records, web forms, Teams messages, documents and other messages sources.

When an incoming message is received ThinkAutomation can execute one or more Automations. You design Automations using an easy to use drag-and-drop interface to run simple or complex tasks. Automations can perform many Actions, including updating company databases and CRM systems, sending outgoing emails, Teams & SMS messages, document processing, integration and much more.

ThinkAutomation also saves each incoming message in the Message Store. The Message Store contains a copy of each incoming message processed. You can view the Message Store using the ThinkAutomation Studio.

The ThinkAutomation Studio is used to setup your Message Sources and design your Automations. Multiple Message Sources and Automations can be grouped into a Solution. Any number of Solutions can be created. Solutions can contain any number of Message Sources and Automations. Once you have configured your Message Sources and Automations the ThinkAutomation Studio can be closed. Messages are processed in the background by the ThinkAutomation Services.

Visit: www.ThinkAutomation.com for more information.

Editions

ThinkAutomation is available in the following editions:

  1. Standard Edition
  2. Professional Edition: Includes all features of the Standard Edition, plus the Custom Action Designer and the Execute Script Action.
  3. Developer Edition: Includes all features of the Professional Edition but with a limit of 200 processed messages per day. The Developer Edition is a free edition aimed at developers & ISV's who want to create ThinkAutomation Solutions for their own customers.
  4. Evaluation Edition: Includes all features of the Professional Edition. The Evaluation Edition is free and will operate for 30 days. You can register an existing Evaluation Edition with a purchased serial number and retain all your configuration settings.

Professional Services

Parker Software provides professional services to assist with configuring your Automations, creating Custom Actions and for product training. Please see: www.ThinkAutomation.com/Automation-Consultation/ for more information.

Product Support

All ThinkAutomation subscriptions include access to support resources, free product updates and access to the Custom Action Library for the life of your subscription.

Support is available during office hours via email at support@parkersoftware.com. We offer extended support with 24 hour/7 day coverage at additional cost. Please contact us for details.

Installation

ThinkAutomation requires Windows 10 or Windows Server (2016 or higher) with 1GB of free disk space and 8GB or higher recommended ram. It can run on on premise or cloud hosted Virtual Machines.

Run the ThinkAutomation.exe setup to install. Once installed, use the ThinkAutomation Studio to complete the setup.

Message Store Type

ThinkAutomation can use Microsoft SQL Server, MongoDB, MySQL or SQLite for its Message Store database. You should decide on the database type prior to installing. Ensure the database is running prior to installing (unless you want to use SQLite).

Message Store Database Types

Type Details
SQL Server Use Microsoft SQL Server 2008 or higher. Any edition (including Express) can be used.
MongoDB Use a local or remote MongoDB instance. MongoDB will provide high performance but requires more memory. Should not be used on machines with 8GB or less ram.
MySQL Use MySQL version 7 or higher (or Maria DB).
SQLite Use the built-in SQLite database. Requires no database to be installed but provides the lowest performance. This option is useful for developing and testing Automations but should not be used in production where performance is important.

Architecture

ThinkAutomation consists of three Windows services along with the ThinkAutomation Studio.

Service Details
Main Server Service Maintains the message process queue, message store database & metadata and serves data to ThinkAutomation Studio users.
Message Reader Service Reads messages from the configured Message Sources.
Message Processor Service Executes Automations.

Each ThinkAutomation Service can run on the same computer, or separate computers in a distributed configuration.

ThinkAutomation Studio

The ThinkAutomation Studio is used to configure your Message Sources and Automations. It can also be used to view the Message Store of processed messages and to configure Custom Actions. The ThinkAutomation Studio can be run on the same computer running the ThinkAutomation Server or on any remote computer that can connect to it.

The ThinkAutomation Studio connects to the ThinkAutomation Server via a secure websocket connection. It does not need to be left running for messages to be processed.

When you run the ThinkAutomation Studio for the first time you will be asked to register your license (or start an Evaluation), setup your System Administrator login password and configure the Message Store database.

A default user with username 'Admin' will be created with your specified password. Use the 'Admin' user to login. You can create additional users if required using the Server Settings.

The Standard Edition of ThinkAutomation allows 2 Studio users to be connected at any one time. The Professional Edition allows up to 10 - with the option of adding more users if required.

Note: The ThinkAutomation Studio connects to the ThinkAutomation Server using a secure WebSocket connection on port 9110. This port will need to be open on your firewall if you want to use the Studio remotely.

Message Sources

A Message Source defines how ThinkAutomation will receive messages to process. You can create any number of Message Sources to read messages from various sources. Each Message Source is connected to an Automation. When a message is received the message content is passed to the assigned Automation for processing. Individual Message Sources can be enabled/disabled or paused.

To create a Message Source click the New Message Source button on the ThinkAutomation Studio ribbon. A Solution must have at least one Message Source.

Message Source Types

ThinkAutomation can receive messages from the following Message Source Types:

Source Details
Email - Office 365 Synchronize an Office 365 or online Outlook account email folder.
Email - Exchange Synchronize a Microsoft Exchange account email folder.
Email - Gmail Read email items from a Gmail account.
Email - IMAP Read emails from any IMAP enabled email account.
Email - POP3 Read emails from any POP3 enabled email account.
Email - SendGrid Receive new emails received via SendGrid.
Web Forms Create a web form to embed in your website and receive submissions for processing.
Teams Respond to @mentions from Microsoft Teams channels.
Database Monitor a SQL database for new or updated records.
MongoDB Monitor a MongoDB collection for new documents.
File Pickup Monitor a local folder for new or updated files.
HTTP Get Monitor a web resource for changes.
Azure Queue Monitor an Azure Queue.
Twilio Receive incoming SMS messages from Twilio.
API A HTTP API for receiving messages from custom sources.
Web Forms - Custom Post any of your existing web forms to ThinkAutomation for processing.
Web Requests Execute an Automation whenever the Web API URL is requested.
Static Scheduled Execute an Automation with a default message at preset times.

Email - Office 365 or Outlook

Reads emails from an Office 365 or an online Outlook mailbox folder. Click the Sign In button to sign in to an Office 365 or Outlook account.

Select the Folder to synchronize.

Enable the Delete Processed Messages option to remove emails from the Office 365 folder once they have been downloaded by ThinkAutomation (optional). You can also select the Move To Folder option to move downloaded items to a different folder (optional).

Access Shared Mailbox

You can optionally read messages from a shared mailbox. Enter the shared mailbox username in the Access Shared Mailbox entry. Click the Get Folders button to read the folders for the shared mailbox. If the Shared Mailbox entry is blank then folders will be displayed for the signed-in user.

Re-Sign In

Depending on your security configuration you may need to re-sign in periodically. In these cases ThinkAutomation will pause the Message Source and send a notification to the ThinkAutomation Studio informing you to sign in again. Open the Message Source using the ThinkAutomation Studio and click the Sign In button again.


Email - Exchange

Reads emails using Microsoft Exchange Server Web Services (EWS). This works with any on-premises or hosted Exchange Server. Enter your Exchange User Name and Password and the URL and click Connect. If you do not know your Exchange Url, enter the User Name & Password and click Discover. This will attempt to find the URL from the user credentials.

Select the Folder to synchronize. Enable the Delete Processed Messages option to remove emails from the Office 365 folder once they have been downloaded by ThinkAutomation (optional). You can also select the Move To Folder option to move downloaded items to a different folder (optional).


Email - Gmail

Reads emails from any Gmail mailbox. Click the Sign In button to sign in to Gmail. Select the Folder to download messages from. Select the Move Processed Messages To Folder option if you want to move downloaded items to a different Gmail folder (optional).


Email - IMAP

Reads emails from a mail server using the IMAP protocol. Enter the IMAP Server address, port, user name & password. Click the Connect button to connect and then select the Folder to read messages from. You can select to Move or Delete processed messages (optional).


Email - POP3

Reads emails from a mail server using the POP3 protocol. Enter the POP3 Server address, port, user name & password. Click the Test Connection button to verify the connection. You should only use POP3 if IMAP is not available.

POP3 is an older and slower protocol than IMAP and does not provide an option to only download new messages since the last download. To ensure fast access you should enable the Delete Processed Messages option so that messages are removed from the POP3 account once they have been processed by ThinkAutomation.


Email - SendGrid

The SendGrid message source type receives email messages sent to any of your SendGrid domains.

SendGrid is a cloud based message delivery platform. When used with ThinkAutomation it enables ThinkAutomation to receive email messages sent to any recipients for any of your SendGrid email domains. SendGrid is a worldwide platform and the cost is based on usage. See: https://www.sendgrid.com

You need to create a SendGrid Account if you want to be able to process SendGrid received email messages using ThinkAutomation.

You then need to login to your SendGrid account and setup the Inbound Parse feature. See: https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/

Set the Inbound Parse Webhook URL in your SendGrid account to the SendGrid Inbound Parse URL shown in the ThinkAutomation Message Source. As emails are received by SendGrid they will then be forwarded to ThinkAutomation for processing. This does not affect your regular SendGrid email flow - it simply sends a copy to ThinkAutomation as emails are received.


Web Forms

The Web Form message source type enables you to create a publicly accessible web form with multiple input fields. The web form has a unique secure URL hosted on Azure as part of the ThinkAutomation Web API. You can embed the web form inside your own website or send a link to the form in outgoing emails. When a web user completes the form, the results are sent to your ThinkAutomation Server for immediate processing. The Web Form can optionally display the Automation return value after the form is submitted.

Form Text

Enter the form Title and Header. This is the text that is displayed above the form itself. You can use Markdown if required. The Markdown will be converted to HTML when the form is rendered. The Title & Header are optional. You can also adjust the text for the Submit Button.

Confirmation Message

Enter the Confirmation Message. This is the text that is displayed after the form is submitted. Enable the Wait For & Include Automation Results In The Confirmation Message option if you want the Automation Return Value included in the confirmation message. If this option is enabled then the form response will wait for the Automation to complete. You should then configure your Automation to return the text or html you want displayed in the form confirmation. The max wait time is 30 seconds, so if your Automation may be long running then the Wait For option may not be applicable.

Form Fields

You can now create any number of Form Fields. Click Add to add a 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, Email, Password, Number, Date, Time or Boolean. 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. When the web user completes the form they will not be able to submit it until all of the fields pass validation.

You can arrange the order of fields on the form using the Up & Down buttons.

Scheme

The web form uses Bootstrap 4 for its responsive layout. Select the Bordered option to show the form inside a bordered card. Use the Scheme list to select a color scheme for the card. You can also change the Background & Foreground colors. The Foreground color can only be changed if not using a bordered card. Specify a Header Image URL to display an image above the title.

You can also specify a Custom Style Sheet Link URL. You can use this to override the default Bootstrap styles. If a custom style sheet is used then the Background/Foreground colors are ignored.

Click the Preview button to display a local preview of how the form will look.

Redirect

You can optionally specify a Redirect URL. This is a URL the web user will be redirected to on completion of the form. If a redirect URL is specified then the Confirmation Message will not be displayed to the user.

WhosOn Live Chat

WhosOn is Parker Software's live chat and visitor tracking solution. See: https://www.whoson.com. If you are a WhosOn user you can add the WhosOn page tag to your form so that visitors to the form show in real time in your WhosOn Client. You can optionally Show Chat Button on your form. Your WhosOn Server & Domain details are specified in the ThinkAutomation Server Settings.

Captcha

You can add a Google reCAPTCHA box to your forms to ensure human only responses. Go to reCAPTCHA (google.com). Use the Admin Console to create a reCAPTCHA. Set the type to reCAPTCHA v2. In the domain enter api.thinkautomation.com. Select the reCAPTCHA keys section and enter your Site Key and Secret Key.

Public Form URL

This entry shows the unique public URL for the web form. You can link to this from your website, send it in outgoing emails or embed it into your web site pages using an iframe tag. Whenever a web visitor completes the form the Automation assigned to the Message Source will be executed with the form contents.

How it Works

When you save the Message Source the ThinkAutomation Server uploads the form details to the ThinkAutomation Web API server. The form can then be used immediately. Any changes you make will be updated.

When a web user completes the form the ThinkAutomation Web API sends the results to your ThinkAutomation Server. The message body will be Json containing the form fields. For example:

{
    "fname": "Alice",
    "lname": "Bamber"
}

You can then use Extract Field actions to extract the data from the message and perform any other Automation actions. If your ThinkAutomation Server is not active when a web form is submitted it will be queued by the ThinkAutomation Web API for up to 48 hours.

Additional Headers

The following headers will be added to the ThinkAutomation message headers:

Header Details
RemoteHost The IP address of the web user submitting the form.
User-Agent The browser user-agent of the web user submitting the form.
Origin The origin header of the web user submitting the form.

You can access these values in your Automations. For example, you could use the GeoIP Lookup action to lookup the country for the user's IP address, or use the Get Browser Info action to get the browser name.

Security

The web form URL is unique to your ThinkAutomation instance and Message Source and has a secure hash. The web form is hosted on Microsoft Azure and is delivered via https only - meaning all form submissions are encrypted. The ThinkAutomation Web API sends completed forms to your ThinkAutomation Server over a secure websocket connection. The Web API server does not keep copies of submitted forms. If your ThinkAutomation Server is not active then any form data is stored in a queue for up to 48 hours and sent when your ThinkAutomation Server becomes active. This storage queue is encrypted.

Embedding The Form In Your Website

You can add the form to any of your web pages using an iframe tag. For example:

<iframe src="https://api.thinkautomation.com/form?taid=5f7b421a6e1f408c384863256fbe68b36edf4097704f7743eSiEZ0XtRpq8GeF5WEZGhDpzbhNH007%2f" style="width:300px; height: 570px; border: none;" scrolling="no"></iframe>

Once the form is embedded any changes you make to Message Source Web Form properties will be updated on the form on your site. If you delete the Message Source from your ThinkAutomation settings you will need to remove the embedded link from your site.

Note: You can also post any of your existing web forms to ThinkAutomation for processing. See: Web Forms- Custom.


Microsoft Teams

The Teams message source type receives outgoing webhook requests from Microsoft Teams. Users of Teams can use @mentions to trigger a request. Your Automation return value is then sent back as a response.

To Setup In Microsoft Teams

  • In Microsoft Teams select the appropriate team and choose Manage team from the (•••) drop-down menu.
  • Choose the Apps tab from the navigation bar.
  • Select Create an outgoing webhook.
  • Specify the Name - users can then enter @{name} to send to ThinkAutomation.
  • Paste the Microsoft Teams Outgoing Webhook Callback URL into the Callback URL entry.
  • Paste the Security Token shown after the Teams webhook is created into the Security Token entry in ThinkAutomation.

See: Add custom bots to Microsoft Teams with outgoing webhooks - Teams | Microsoft Docs for more information.

When you create a new Teams message source, ThinkAutomation will automatically add Extract Field actions to the Automation to extract the message text.

Use the Return action type to send back the text you want to respond with. The response text can contain HTML or Markdown.

An Example: You could create a teams outgoing webhook with the name "GetAccount". Whenever a Teams user types '@GetAccount Test Customer' - your Automation will execute. The 'text' Extracted field will be set to 'GetAccount Test Customer'. You could then lookup customer details from a database or perform other actions and return a response - which will be displayed in the Teams conversation.

The Microsoft Teams message source type uses the ThinkAutomation Web API to forward messages from Teams to your ThinkAutomation Server. The ThinkAutomation Web API sends messages to your ThinkAutomation Server over a secure websocket connection. The Web API server does not keep copies of forwarded messages.

The Automation you execute on receiving a message should not be long running. Teams will wait for 5 seconds for a response.


Database

The Database message source type monitors a database for new or updated records. Rows returned from a database query will be passed to an Automation for processing. Select the Database Type (Microsoft SQL Server, MySQL, SQLite, Oracle, PostgreSQL, DB2, Firebird or OLDBC/OLEDB). Enter the Connection String or click the ... button to build and test the connection.

Enter the SQL Statement to execute against the database for new records. For example:

SELECT * FROM Person WHERE PersonId > @Id

The SQL Statement can contain Parameters. You should then complete the Parameters table to provide each parameter type and value.

The query should include at least 1 column that provides a unique value. Enter this column name in the Unique Id Column box.

ThinkAutomation automatically caches the Unique Id Column value each time it requests data from the database. You can use this cached value as a Parameter value by setting a parameter value to %LastDatabaseId%.

In the above example the Unique Column Name is PersonId. We set the @Id parameter value to %LastDatabaseId%. This means that each time ThinkAutomation requests data from the database it only requests records with a higher PersonId since the last request (making the query much faster).

Test & Create Automation

You should test your query before saving the Message Source. Click the Test button. When you use the Test option on a new Message Source, ThinkAutomation will ask if you want to create a new Automation to process the records. It will then create a new Automation and create Extracted Fields on the Automation that match the columns returned by the query.

Creating The ThinkAutomation Message

Each new record returned from the database will be passed to the Automation for processing. You can choose to pass all columns to the Automation or a single column. Set the Assign All Columns To Message Body to send all columns returned by the query.

The database record will be passed to the Automation in the following format:

{
  "PersonId": 1,
  "PersonType": "EM",
  "NameStyle": false,
  "Title": "",
  "FirstName": "Ken",
  "MiddleName": "J",
  "LastName": "Sánchez",
  "Suffix": "",
  "EmailPromotion": 0,
  "AdditionalContactInfo": "",
  "ModifiedDate": "2009-01-07"
}

If you used the Test option then Extracted Fields will have been created automatically to extract each column value.

You can optionally set the message Subject, From Address and Date. The Subject will default to '%TableName% (%LastDatabaseId%)' - where %TableName% will be the table name extracted from the SQL statement used for the query. You can change this and include text and column values for the current row. To use column values, use %ColumnName% replacements. For example:

Record Id %LastDatabaseId% For %FirstName% %LastName% would set the subject to 'Record Id 1 For Ken Sánchez'.

The Message Date will default to the current date & time. You can optionally set it to a column value. For example, %ModifiedDate%.


MongoDB

The MongoDB message source type monitors a MongoDB database collection for new or updated documents. Each document found will then be passed to an Automation for processing.

Enter the MongoDB Connection String, Database Name and Collection Name. Enter the Query json and optionally the Projection and Sort json. Click the Test button to test the connection and query.

ThinkAutomation automatically caches the Document _id value between requests. This can be used in the Query json. For example:

{ "_id": { "$gt": "%LastDatabaseId%" } }

This Query will retrieve all documents where the _id value is greater than then last requested _id.

Each document returned from the query will be passed to the Automation for processing in its Json format. You can then create Extracted Fields on your Automation to extract each value that you need in your Automation. Extracted Fields have an Extract Json option for easy extraction of Json data.


File Pickup

The File Pickup message source type will monitor a local folder on the ThinkAutomation computer. Each new or updated file found in the folder will be passed to the Automation for processing. The Subject of the message will be set to the file path.

Select the From Folder and File Name or Mask.

Add File Contents

Enable the Add File Contents option if you want ThinkAutomation to add the file contents to the message passed to ThinkAutomation for processing. Text based files will be passed as the Message Body. Any other files will be passed as an Attachment.

Add File Contents - Email Messages

Files with extensions .eml and .msg (Outlook Messages) will be added as regular email messages (with Body, Subject, From, To, Headers etc set.).

No File Contents

If Add File Contents is not enabled then only the file details will be passed to the Automation. The file details are passed as Json in the Message Body, in the following format:

{
  "Path": "D:\\Setup Files\\ThinkAutomation.exe",
  "Name": "ThinkAutomation.exe",
  "Extension": "exe",
  "Size": 167815264,
  "Created": "2020-11-20 14:58:02",
  "Modified": "2020-11-20 14:58:05",
  "Description": "ThinkAutomation Installer",
  "CompanyName": "Parker Software",
  "Version": "5.0.261.2",
  "Product": "ThinkAutomation"
}

The Subject will be set to the file path.

In an Automation you can then access the file path using %Msg.Subject% and extract other file information using Extract Field actions.

Enable the Delete Files After Pickup option if you want ThinkAutomation to delete files once they have been processed.

CSV & Excel Files

When using the File Pickup message source type, CSV & Excel files can be treated differently. Instead of the complete file, ThinkAutomation can select any new Rows added to the CSV or Excel file and send these as single messages to the Automation for processing.

For Example, consider the following CSV file:

Product Name Quantity Value
Item 1 Item 1 description 100 1.20
Item 2 Item 2 description 200 1.30

When ThinkAutomation reads this CSV file (or Excel file) it will create 2 messages in the following format:

Message 1:

{
  "xName": "items.csv",
  "xRow": 1,
  "Product": "Item 1",
  "Name": "Item 1 description",
  "Quantity": 100,
  "Value": 1.20
}

Message 2:

{
  "xName": "items.csv",
  "xRow": 2,
  "Product": "Item 2",
  "Name": "Item 2 description",
  "Quantity": 200,
  "Value": 1.30
}

The subject of the message will be: [filename] Row x

The message body will be set to each column on a line of its own in the format 'header row text: column value'.

Enable the For CSV & Excel Files Create Single Messages For Each New Row option to enable single row message processing. For Excel files you can also optionally specify the Worksheet name to use and the Headers Row number containing header values.

For CSV files, if the CSV file has now header row, enable the CSV Has No Header Row option.

By default all columns in the CSV or Excel file will be passed to the Automation. If you only need certain column values enable the Read Values From Specific Cells option and then specify a list of Column Headers or Column Numbers.

Creating Extracted Fields For CSV & Excel Files

When using single row processing ThinkAutomation can create the Extract Field actions for you. Click the Create Extracted Fields button. ThinkAutomation will then read the CSV or Excel file specified in the File Name entry and create an Extract Field action for each column.

Resetting The Last Row Pointer

Each time ThinkAutomation reads the CSV or Excel file for new rows, it stores the last row number in its database, so only newly added rows since the last scan are processed. During testing you may need to reset this to allow a new full scan. Click the Reset Last Rows button.


Monitor Web Resource

The HTTP Get message source type reads the response from any web URL. If the response content has changed the content will be passed to an Automation for processing.

Specify the Get URL

If the web page requires a login specify the credentials in the Authentication section.

If the URL returns HTML the HTML content can be converted to PlainText or XML. The converted text will then become the message body of the message passed to the Automation. Json responses will be passed unchanged.

Any other content-types will be passed as an Attachment.

If the HTTP Get fails you have the option to:

  1. No Action.
  2. Set the Message content passed to the Automation to the HTTP status (eg: 404 File Not Found).
  3. Pause the Message Source

Each time the HTTP content is read ThinkAutomation will compare the response to the last received response. Only if the response has changed does it add a new message for processing.

Note: Many websites prevent automated tools from reading web content, so this Message Source type may not work in all cases. Its primary use is for monitoring HTTP API's or web resources that allow automated access.


Monitor Azure Queue

The Azure Queue message source type monitors a Microsoft Azure queue for new messages.

Enter your Azure Queue Account Name & Access Key.

Enter the Queue Name.

Click the Verify button to verify that ThinkAutomation can read from the queue.

ThinkAutomation will read each message from the queue and use the message contents as the message body. You can then parse the contents and perform Automation actions. The Message will be removed from the queue once read.


Twilio

The Twilio message source type receives SMS text messages sent from any mobile phone to any of your Twilio phone numbers.

Twilio is a cloud communications platform. It enables developers to programmatically make phone calls and to send & receive text messages using its web service API's. When used with ThinkAutomation, it enables ThinkAutomation to receive SMS messages. Twilio is a worldwide platform and the cost is based on usage. See: https://www.twilio.com

You need to create a Twilio Account if you want to be able to process received SMS text messages using ThinkAutomation. In Twilio, create a Twilio Phone Number to receive messages. In the Twilio Phone Number Properties set the Messaging - A Message Comes In - Webhook URL to the Set Your Twilio Messaging 'A Message Comes In' Webhook URL To shown in the ThinkAutomation Message Source properties.

Once assigned, any SMS messages sent to your Twilio number will be sent to ThinkAutomation for processing. You can create different ThinkAutomation Message Sources and assign each Webhook URL to each of your Twilio Phone numbers, or you can use a single ThinkAutomation Message Source and assign the same URL to all of your Twilio Phone Numbers and then parse the 'To' number out of the received message.

When a SMS message is received ThinkAutomation will create a new message that can be processed by your Automations. The message will be in the following format:

{ 
  "from": "+447799123456",
  "fromCountry": "GB",
  "fromCity": "",
  "fromState": "",
  "fromZip": "",
  "to": "+447779678901",
  "toCountry": "GB",
  "toCity": "",
  "toState": "",
  "toZip": "",
  "smsStatus": "received",
  "body": "Test SMS Message Received",
  "numMedia": "0",
  "numSegments": "1",
  "messageSid": "SMe0000000000000000000000000000000",
  "accountSid": "AC00000000000000000000000000000000",
  "apiVersion": "2010-04-01"
}

You can then parse this message and perform Automation Actions, such as sending an outgoing SMS replies or recording the message details in a database.

When you create a Twilio Message Source using the New Message Source Wizard an Automation will be automatically created with Extracted Field Actions setup to extract the above data.

You can reply to the incoming SMS using the Twilio Send SMS Message action and setting the To value to the %from% extracted field value. The %body% extracted field value will contain the incoming message text.


API

Local API

Messages can be posted to ThinkAutomation via a local HTTP API. Each Message Source has a unique local API URL. You can view/copy the local URL on the Message Source properties page.

See: Using The Local API

Web API

Messages can also be posted to ThinkAutomation via the Web API. The Web API provides a secure web public endpoint allowing messages to be posted to ThinkAutomation from your own or 3rd party solutions from any location. Each Message Source has a unique Web API URL. You can view/copy the URL on the Message Source properties page.

For the Web API you have the option of specifying Allowed Origins. Specify a comma separated list of allowed URL's that can post to the Web API endpoint. If this entry is blank then the endpoint can be posted to from anywhere. Full URL's should be specified, eg: https://www.mysite.com - without any path or page name.

See: Using The Web API


Web Forms - Custom

The ThinkAutomation Web API can accept HTTP POST requests from your own web forms. Simply set the form action to the Web API URL. For example:

<html>
  <body>
   <form action="https://api.thinkautomation.com/addmessage?taid=5f7b421a6e1f408c38488397179ab14c6e1f405c7cbf955cd9%2fwxO9qltjQwt0pU7d4GRErBl5njQP%2f" method="post">
     <label for="fname">First name:</label>
     <input type="text" id="fname" name="fname"><br><br>
     <label for="lname">Last name:</label>
     <input type="text" id="lname" name="lname"><br><br>
     <input type="submit" value="Submit">
   </form>
  </body>
</html>

You can add a &redirect={url} parameter to the API URL query string if you want the server to respond with a 303 Redirect once the message has been accepted.

When the form is posted to ThinkAutomation a new message will be sent to your Automation in Json format. For example:

{
    "fname": "Alice",
    "lname": "Bamber"
}

The RemoteHost, User-Agent & Origin headers will also be added to the ThinkAutomation message headers. You can access these values in your Automation.

You can then use Extract Field actions to extract the data from the message and perform any other Automation actions. If your ThinkAutomation Server is not active when a web form is submitted it will be queued by the ThinkAutomation API for up to 48 hours.

Note: Ensure the Allowed Origins entry on the Message Source API properties contains the URL for the site containing the forms you will be posting to ThinkAutomation.


Web Requests

The ThinkAutomation Web API also accept HTTP GET requests. You can specify the message content as part of the URL. Whenever the URL is requested a new ThinkAutomation message will be created.

The body, subject, from & to addresses can be specified on the query string:

https://api.thinkautomation.com/addmessage?taid=5f7b421a6e1f408c38488397179ab14c6e1f405c7cbf955cd9%2fwxO9qltjQwt0pU7d4GRErBl5njQP%2f
&from=alice%40test.com
&subject=unsubscribe
&body=testmessage

The body, subject, from and to query string parameters are optional.

You can add a &redirect={url} parameter to the API URL query string if you want the server to respond with a 303 Redirect once the message has been accepted.

Passing Field/Value Pairs

You can also pass specific parameters using x-parametername=value. In this case the message passed to ThinkAutomation will be in Json format with each parameter value (excluding the 'x-').

For example:

https://api.thinkautomation.com/addmessage?taid=5f7b421a6e1f408c38488397179ab14c6e1f405c7cbf955cd9%2fwxO9qltjQwt0pU7d4GRErBl5njQP%2f
&from=alice%40test.com
&subject=unsubscribe
&x-name=Alice+Bamber
&x-email=alice%40test.com

The message body which would be sent to ThinkAutomation as:

{
    "name": "Alice Bamber",
    "email": "alice@test.com"
}

If you do not want to use field=value pairs you can pass the raw body text using the &body= query string parameter. The ThinkAutomation message body will be set to the contents of the body parameter with no conversion.

The RemoteHost, User-Agent & Origin headers will also be added to the ThinkAutomation message headers. You can access these values in your Automation.

You can then use Extract Field actions to extract the data from the message and perform any other Automation actions. If your ThinkAutomation Server is not active when a web request is made it will be queued by the ThinkAutomation API for up to 48 hours.

See: Using The Web API


Static Scheduled

This message source type is useful if you simply want to run an Automation at a preset schedule without a specific incoming message. It enables you to execute an Automation based on the Schedule (for example, every 10 minutes). It uses a static default message (that can be blank).

At the scheduled time a new message is added to the process queue. The Automation assigned to the Message Source will be executed.


Message Source Schedules

Message Sources can be assigned a Schedule. This defines how often the Message Source should be checked for new messages. Schedules can be every x minutes or at specific times. You can also select the days of the week that the Message Source should be active. Select the Schedule tab on the Message Source properties page to edit the schedule. A default schedule will be created for new Message Sources if required.

Web Form, File Pickup, SendGrid, Twilio, Teams and API message source types do not need a schedule. Any new messages for these Message Source types will be processed immediately.

Automations

An Automation is executed for each incoming message from the configured Message Source. Automations can contain any number of Actions. Automations themselves can Call other Automations and the returned value from the called Automation can be assigned to a variable in the parent.

Field Replacements

All Actions that have parameters allow you to use %field% replacements.

This means you can specify a ThinkAutomation extracted field name, variable or constant as the parameter (or part of) that will be replaced at execution time with the value of the variable. Field names must be enclosed with % symbols.

For example, outgoing emails can contain values extracted from the incoming message by simply inserting %fieldname% (where 'fieldname' is the name of your field) into the email text (or any other fields).

Another example: The Process Attachments action allows you save attachments from the incoming message to folders on your system. If you had created a field called OrderNumber you could save the attachment as C:\Orders\order%OrderNumber%.pdf. If %OrderNumber% contained '1234' then the file would be saved as C:\Orders\order1234.pdf.

Built-In Fields

In addition to extracted fields and variables that you create in your Automation, you can also use any of the following built-in fields:

Field Name Details
%Msg_Body% The incoming message body in plain text format. If the incoming message is HTML only then the plain text body will be created from the HTML with all tags removed.
%Msg_Html% The incoming message html body.
%Msg_Mime% The full mime text of the incoming message.
%Msg_Json% Json text representing the incoming message.
%Msg_Text% The mime text without headers.
%Msg_Subject% The incoming message subject.
%Msg_Digest% The first 750 characters of the message body with blank lines & whitespace trimmed.
%Msg_To% The 'to' address. Email addresses without names.
%Msg_ToWithNames% The 'to' address including names (if available).
%Msg_From% The 'from' address.
%Msg_FromEmail% The 'from' address email address without the name portion.
%Msg_FromName% The 'from' address name portion only (if available).
%Msg_FromIP% The IP address of the sender (extracted from the Received header).
%Msg_CC%, %Msg_CCWithNames% The 'cc' address.
%Msg_BCC%, %Msg_BCCWithNames% The 'bcc' address.
%Msg_ReplyTo% The 'reply to' address.
%Msg_References% The 'references' header.
%Msg_Return-Path% The 'return-path' header.
%Msg_Sender% The 'sender' header.
%Msg_Date% The date of the message.
%Msg_DateSent% The date the message was originally sent.
%Msg_Size% The total size of the message including attachments.
%Msg_Headers% The full headers section of the mime text.
%Msg_Attachments% Attachment file names (separated with CrLf).
%Msg_AttachmentCount% The number of attachments.
%Msg_AttachmentInlineCount% The number of inline attachments.
%Msg_AttachmentsSavedTo% A string containing the file system location of each saved attachment (if Attachment saving action has been used).
%Msg_AttachmentListWithSizes% A string containing each attachment & size separated by commas eg: 'document1.pdf (2mb), document2.pdf (500kb)'
%Msg_CharSet% The character set of the incoming message.
%Msg_MessageId% The unique message identifier.
%Msg_WordIndex% Unique keywords extracted from the message body (space separated excluding common words).
%Msg_WordIndexSorted% Unique keywords sorted by word count (highest first).
%Msg_WordIndexWithCount% Unique keywords with word count.
%Msg_WordIndexWithCountSorted% Unique keywords with word count sorted (highest first).
%Msg_ValidationUrl% A link to the user response web page for the current message. Used by the Wait For User Response action.
%Msg_WebCallbackUrl% A link to a custom webhook callback for the current message. Used by the Wait For Webhook action.

Solution Constants

You can also create Solution Constants. These are solution-wide constants that can be used as %field% replacements on any Automation within a Solution. To create Solution Constants click the Edit Solution button on the ThinkAutomation Studio Explorer ribbon. Select the Constants tab.

You can then specify any number of Constant Name and Constant Value pairs.

For example: If you create a solution constant with name 'VatNumber' and value 'GB12345678' then if you can specify %VatNumber% on any Action property on any Automation within the Solution, the value 'GB12345678' will be replaced when messages are processed.

System Constants

A number of system constants can also be used:

Field Name Details
%Date% The current date.
%DateYesterday% Yesterdays date.
%Time% The current local time.
%Hour% The current local time hour number.
%Minute% The current local time minute number.
%Year% The current year.
%DateTime% The current local date & time.
%DateTimeUtc% The current utc date & time.
%SQLDate% The current date in yyyy-mm-dd format
%SQLDateYesterday% Yesterdays date in yyyy-mm-dd format.
%SQLDateTime% The current local date & time in yyyy-mm-dd hh:mm:ss format.
%SQLDateTimeUtc% The current utc date & time in yyyy-mm-dd hh:mm:ss format.
%Timer% The number of elapsed milliseconds since midnight.
%DayOfWeek% The current day of the week name.
%WeekdayNumber% The current day of the week number (1=Sunday, 2=Monday etc.).
%MonthNumber% The current month number.
%MonthName% The current month name.
%LastErrorNumber% This will contain a numeric error number returned from an Action that has failed for some reason.
%LastErrorText% This will contain a description of the last error.
%FreeDiscSpace% The current system drive free space in bytes.
%Root% The solution root folder. Corresponds to: ProgramData\Parker Software\ThinkAutomation.NET\%SolutionName%\
%AutomationLog% The current Automation execution log for the message.
%MessageSourceName% The name of the Message Source for the current message.
%AutomationName% The name of the Automation executing for the current message.
%AutomationId% The id of the Automation executing for the current message.
%SolutionName% The name of the Solution for the current message.
%SolutionId% The id of the Solution for the current message.
%SolutionEmail% The email address assigned to the Solution.
%SolutionContact% The contact name assigned to the Solution.
%CR% A carriage return.
%LF% A line feed character.
%CRLF% A carriage return and line feed.
%TAB% A tab character.

You can also create your own constants for each Solution. See the Solution Constants tab on the Solution Properties page. These Constants can be used on any Automation within the Solution.

The Root Folder

The %Root% system constant will contain a folder path to:

\ProgramData\Parker Software\ThinkAutomation.NET\%SolutionName%\

For example, if your solution name is 'Orders' and your system drive is 'C:\' then %Root% will contain:

C:\Program Data\Parker Software\ThinkAutomation.NET\Orders\

The %Root% field replacement is useful for any Actions that need to save files locally. ThinkAutomation ensures that the folder exists and the ThinkAutomation Message Processor service will always have access to it.

For example: If using the Create Document action to create a PDF document you can set the Save To property of this action to %Root%.

InLine Functions

The field replacement %func% can be used to execute a number of inline functions. The function will be executed and the returned value replaced. InLine functions can be used inside any action entry as with fields/variables.

The format of inline functions is: %func%:FunctionName(Value[,parameter][,parameter])

The value & parameters can be any fixed text or a %field% replacement.

For example, in the text:

Dear %func%:ToProperCase(%fullname%),

If %fullname% was set to 'alice bob' - when replaced the text would be:

Dear Alice Bob,

The following functions can be used:

Function Details
Upper(value) Converts the value to uppercase.
Lower(value) Converts the value to lowercase.
ToProperCase(value) Capitalizes each word in value.
Right(value,count) Returns the rightmost count characters in value.
Left(value,count) Returns the leftmost count characters in value.
IndexOf(value,searchtext) Returns the character position where searchtext occurs in the value.
Clean(value) Returns the cleaned version of value. All whitespace, control characters, blank lines are removed.
PlainText(value) Returns the plaintext version of value. If value contains HTML then all HTML tags are removed.
Html(value) Returns the value as is - without any HTML encoding. Useful when embedding %fields% in HTML email content where the %field% content is already html.
Trim(value) Returns the trimmed version of value.
Truncate(value,count) Returns value truncated to a maximum length of count.
SubString(value,start [,number]) Returns the substring of value starting as position specified in start (zero based). If number is specified then the number of characters from the start position is returned, otherwise the characters from start until the end of the value are returned.
Replace(value,find,replacewith) Returns the value with the find parameter replaced with the replacewith parameter.
PadLeft(value,characters) Returns the value padded with spaces to the left if required to reach the total number of characters.
PadRight(value,characters) Returns the value padded with spaces to the right if required to reach the total number of characters.
Format(value, formatstring) Returns the formatted value using the formatstring. Formatstring can be any .NET format string.
Length(value) Returns the number of characters contain in the value.
EmailAddress(value) Returns the first email address found in value.
Url(value) Returns the first URL found in value.
Base64Encode(value) Returns the base64 encoded version of value.
Base64Decode(value) Returns the text value of the base64 encoded value.
URLEncode(value) Returns the URL encoded version of value.
URLDecode(value) Returns the text value of the URL encoded value.
DateAdd(value,interval,number) Returns a date with number of days, months, seconds or years added. The interval should be s=seconds,n=minutes,h=hours,d=day,yyyy=years.
DateDiff(interval,date1,date2) Returns a numeric value for the interval between date1 and date2. The interval should be s=seconds,n=minutes,h=hours,d=days,ww=weeks,yyyy=years.
Day(value) Returns the day number if value is a date.
Month(value) Returns the month number if value is a date.
MonthName(value) Returns the month name if value is a date.
Year(value) Returns the year number if value is a date.
HyperLink(value,linktext) Returns a HTML ref. The first URL or email address found in value will be used for the link URL. The linktext parameter will be used for the hyperlink text if specified.
PlainTextToHTML(value) Returns HTML from plaintext. Converts all line-feed characters to
, encodes special characters and encloses any URLS or email addresses in tags.

Format Examples:

Order Date: %func%:Format(%Msg_Date%,U) :

replaced the text would be:

Order Date: 09 November 2020 09:00:00 :

If a parameter includes a comma you need to enclose it in quotes. Eg:

Order Date: %func%:Format(%Msg_Date%,"hh:mm tt, ddd-MM-MMM yyyy gg") :

Would be:

09:00 AM, Mon-11-Nov 2020 A.D.

Automation Actions

An Automation can contain any number of Actions. Each of the actions are optional. You can run one or more of the actions depending on your requirements. You can add multiple instances of each action type - so for example, you can send multiple Outgoing emails by adding multiple Send Email actions.

To add an Action double-click an action in the Toolbox, or press ENTER on the selected action. You can also drag and drop an action to the Actions List. You can also add an action by typing the action name and selecting from the list. Press the TAB key to select the first action in the list based on the letters you have typed.

When you add an action the corresponding property page for the action type will be displayed. To edit an existing action double-click it or press ENTER. When editing an action property page, each action property that accepts text data can include %field% replacements. Drag a %field% from the variables list on to the property or type the %field% name. These %field% holders will be replaced with the Extracted Field, Variable, Built-In Field or Constant value when the Automation executes. See: Field Replacements.

When a Message is processed the actions will be executed in the order they appear in the Actions list. You can re-order actions using Move Up/Move Down buttons.

You can create If [else] End If or Select Case blocks to conditionally execute blocks of Actions and you can assign a Condition to each action.

ThinkAutomation includes a default set of built-in actions (shown below). You can also add additional Custom Actions from our on-line library or create your own using the Custom Action Designer

Tip: When designing your Automation you should disable the Message Source. This will prevent messages being retrieved until you have completed and tested your Automation. You can still send test messages to process using the Send Message option when the Message Source is disabled.

Available Built-In Actions

ThinkAutomation includes a collection of built-in Actions for common tasks. You can also download more Actions from the on-line library and you can create your own custom actions using the Custom Action Designer.

Not all actions may be listed here. Parker Software regularly adds additional Action types.

Common

Data

Outgoing

Documents

  • Create Document : Create a formatted document which can include %field% replacements.
  • Convert Document : Convert a document or incoming attachment from and to various formats.
  • Convert Document To Text : Converts documents from various formats to plain text.
  • Convert PDF Document : Convert a PDF document or attachment to various formats.
  • Sign PDF Document : Add a digital signature to a PDF document.
  • Save As PDF : Save the incoming message or any html file or URL as a PDF document.
  • Word Merge : Performs a mail merge on a Word document or Attachments and saves the merged document as a new file.
  • Print : Print the incoming message and/or attachments.
  • Run A Report : Creates a report using a pre-defined report template and exports it to various formats.

Office 365

General

Network

  • DNS Lookup : Performs a DNS Lookup and assigns the returned data to a variable.
  • Ping : Pings any host and returns the results to a variable.
  • Execute Secure Shell Command : Execute SSH commands against any host.

CRM

Web

  • HTTP Get : Reads any web page and assigns the returned HTML or plain text to a Variable.
  • HTTP Post : Post data to any web page using a HTTP POST.
  • Download File : Download a file via HTTP.
  • OAuth SignIn: Obtain a authorization token from an OAuth end point.
  • Cloud Storage: Download or Upload files to various cloud storage providers.
  • Read JSON Document : Parses a JSON document from any URL and assigns element values variables.
  • Wait For Webhook: Waits for a 3rd party webhook call.
  • Call A Soap Web Service : Executes a SOAP or .NET Web Service and returns the results to variables.
  • FTP Upload : Uploads files or attachments to an FTP or SFTP server.
  • FTP Download : Download files from an FTP or SFTP server.
  • Get Browser Info : Extract browser name, version and operating system info from a User Agent.

Location

  • Translate : Translate text from one language to another and assign the result to a variable.
  • Detect Language : Detects the language of any text and assigns the language code to a variable.
  • Speak Text : Returns a URL of a WAV or MP3 file containing spoken text in the desired language.
  • GeoIP Lookup : Performs a GeoIP lookup for any IP address, domain/email.

Twilio

Sentiment

Azure

System

Custom Actions

ThinkAutomation also includes Custom Actions. These are additional actions that can be downloaded from our on-line library. You can add actions from the on-line library for use on any of your Automations.

On-line Library

To explore the online library, click the Custom Actions tab on the ThinkAutomation Studio ribbon and then click Explore Online Library button.

You can then view custom actions in the online library. Use the Search box to search for specific terms. Select a custom action that you wish to use and then click Install. This will download the custom action from the online library and add it to your local library. The custom action can then be used on any of your Automations in the same way as the built-in actions.

Create Your Own

ThinkAutomation Professional Edition includes the ability to create your own Custom Actions. Custom Actions include a UI builder for configuring the Action settings and a C# or VB.NET editor for editing the execution code. Once a Custom Action has been created it appears in the available actions list and can be used like any other action on any Automations. You can also share your custom action with the ThinkAutomation community.

Extracting Fields

For each Automation you can create any number of Extract Field actions. An Extracted Field is a distinct piece of data that ThinkAutomation will extract from the incoming message and assign it a 'Field Name'. You can use these extracted field values on other action properties using %Field% replacements.

To create an Extracted Field drag the Extract Field action to your Automation.

Testing Automations

During Automation development you can test your Automation without enabling the Message Source. Click the Send Message button on the Automation actions list toolbar. Enter the message text and click Send.

The test message will be processed immediately. The Results and Automation Log will be displayed along with any errors and Comment action values.

Use the Comment & Return actions to provide feedback. Comments will be shown in the Send Message view. Comments can include %field% replacement, so if you need to see the value of a variable - simply add a Comment action containing the %fieldname%.

The Automation %Return% value will also be displayed if you have added any Return actions.

Undoing Saved Changes

The ThinkAutomation server automatically keeps a record of all changes made to Automations. You can revert to the previous version by clicking the Revert button on the Automation actions list toolbar. You can continue to do this until the Automation is reverted back to the first version.

Automation Flow

Logical operations allow you to control the flow of actions, call other Automations and conditionally execute actions (or blocks of actions).

Call Automation

The Call action enables you to call another Automation with a value and assign the result to a variable. Select the Automation to call - this must be within the same Solution or an Automation saved to the Library. From the With Message Body Set To list - select the variable to pass to the called Automation. The called Automation will receive this value as its incoming message body value (%Msg_Body%). You can also optionally add Attachments.

Wait For Completion

Automations can return a value using the Return action. Enable the Wait For Completion option and select the variable to receive the returned value from the Assign Return Value To list. The current Automation will wait until the called Automation has completed.

If Wait For Completion is not enabled, then a new message for the selected Automation will be added to the process queue. The current Automation will continue without waiting for the new message to be processed.

Note: Called Automations can also Call other Automations. An Automation cannot call itself. You should ensure that called Automations do not in turn Call the parent - as this would result in a loop.

Return

Ends execution of the Automation and returns a value. If this is the parent Automation for the incoming message then the returned value will be saved in the Message Store - otherwise the value will be passed back to the calling Automation.

Automations do not have to return a value. If all actions complete for an Automation then it will return automatically with a blank return value.

The return value can be fixed text or %field% replacements or a combination. For example, the return value can be set to: 'New Order: %OrderNumber% For Customer %CustomerName%'.

Returned values are stored against the processed message in the ThinkAutomation Message Store. You can view the Message Store to see returned values for each message. The Return value will also be displayed if you use the Send Message option in the Studio to manually send a message to an Automation.

Showing Return Values On Web Form Message Sources

If you use the Web Form message source then the Return value can also be displayed to the web user after the form is submitted. Enable the Wait For & Include Automation Results In The Confirmation Message option on the Message Source Web Form properties.

If the Return value contains HTML (eg: 'Your order number is: \<strong>%OrderNumber%\</strong>') it will be formatted when shown to the user. If the Return value is Markdown then the markdown will be converted to HTML (eg: 'Your order number is: **%OrderNumber%**').

If.. Then.. Else.. End If

Conditionally executes a group of actions based on a Condition.

When you drag an If Action onto the actions list the Condition Builder will be displayed.

Here you create a Condition that will be tested. The condition must be true to start the If block otherwise processing moves to the next Else or End If statements.

In the If column you select a message property or one of your Extracted Fields or Variables.

In the Is column you select one of the following:

  • Equal To
  • Not Equal To
  • Less Than
  • Greater Than
  • Less Than Or Equal To
  • Greater Than Or Equal To
  • Is Blank
  • Is Not Blank
  • Contains
  • Does Not Contain
  • Starts With
  • Ends With
  • Length Equal
  • Length Less Than
  • Length Greater Than
  • Is A Valid Email Address
  • Is Not A Valid Email Address
  • Current Hour Greater Than
  • Current Hour Less Than
  • Current Minute Greater Than
  • Current Minute Less Than
  • Weekday Number Equal To

In the Value column you can type a value to compare against or select one of your variables.

Click the Add button to add another line. The new line can be assigned as an AND or OR clause.

Each If statement must have a matching End If.

If blocks can be nested inside other If Blocks.

You can also assign a Condition to individual actions using the Condition tab of the Action properties page.

Select Case.. Case.. End Select

Creates a Select Case block to conditionally execute a group of actions in the matching Case block.

When you drag a Select Case action onto the Actions list you will be asked for a Value. Enter a value or a %field% replacement.

A Select Case block will then be created.

Click a Case action to define the condition for each Case statement.

The Is can be:

  • Equal To
  • Not Equal To
  • Less Than
  • Greater Than
  • Less Then Or Equal To
  • Greater Than Or Equal To
  • Contains
  • Does Not Contain
  • Else

Enter a Value or %field% replacement to compare against the Select Case Value

If the Select Case Value matches the Value of the Case statement then the Actions in the Case block will be executed. Drag any number of actions inside the Case block to execute. Execution will then move to the End Select action.

You can drag additional Case actions to the Select Case block.

The Case Else block will be executed if no matched Case actions are found.

Each Select Case block must have at least 1 Case action and end with an End Select.

Select Case blocks can be nested - so the Case actions can include further Select Case blocks.

For Each Loop.. Next Loop

Allows you to create a loop based on the following:

  • Message Recipients
  • Message Attachments
  • Message Keywords
  • Message Headers
  • Extracted Fields
  • Lines contained in any variable.
  • Comma Separated Values contained in any variable.
  • Email addresses, URL's and Tokens contained in any variable.
  • Data Reader Rows (See: Open Database Reader)
  • Variable Value

Inside the loop you can assign the values of the current loop item and current iteration count to variables. You can then use these values in actions within the loop.

For example, when looping on Recipients you can assign the Email Address & Name of the current recipient in the loop to variables by selecting from the Assign To drop downs.

When looping on Lines the Lines In value will be split into lines (based on carriage returns and/or line feeds). Each non-blank line will then assigned to the loop value.

When looping on Tokens the Tokens In value will be split into words and tokens.

When looping on Keywords the incoming message body will be split into unique words (excluding common words).

When looping on a Variable Value - this assumes the variable is numeric. The loop executes n times - where n is the variable value.

You then place actions to execute inside the For Each - Next Loop block.

You can exit a loop using the Exit Loop action. This can be placed in an If block if you need to exit a loop based on a condition.

Label.. Go To Label

You can create multiple Label actions within an Automation. Each Label is given a name. You can use the Go To Label action to move processing to the label specified.

Comment

Automations can contain any number of Comment actions. By default comments do nothing. You can space out Actions in your Actions list by adding blank comments.

If the Show In Log option is enabled then the comment value will be added to the Automation Log. The Comment text can contain %Field% replacements.

If the Show Notification Popup In ThinkAutomation Studio option is enabled then the comment will appear in the ThinkAutomation Studio for any active Studio users as a popup notification when the Automation executes.

On Error

The On Error action enables you to control what should happen if an error occurs on any action following the On Error action. You can add any number of On Error actions to an Automation.

Each On Error action can be set to:

  • Resume Next - just report the error in the log and continue.
  • Retry - retry the errored action. You specify the Retry Count and Pause interval. If the action still fails after the retries you have the option of sending an error report email and pausing the Message Source.
  • Go To Label - move execution to the specified label and optionally send an error report email.
  • Execute Automation - transfer execution to another Automation.

If no On Error action is used on an Automation then by default ThinkAutomation will stop execution when an error occurs and pause the Message Source. This enables you to investigate the error before more messages are processed. You must then re-enable the Message Source to continue processing.

Viewing The Message Store

You can use the ThinkAutomation Studio to view the Message Store. Messages are added to the Message Store as they are received by the Message Sources. Click the Message Store tab on the ThinkAutomation Studio ribbon.

Messages are viewed by Solution - to change the currently selected Solution - click the Solution drop down menu on the Ribbon.

All Automations within the Solution will be shown. Select an Automation to view processed messages.

Messages are shown in pages of 1000 messages per page. Use the Page < and > selectors to move pages or press PgUp/PgDn buttons.

You can search for text using the search bar. Messages will be searched by Subject, From/To address and Automation Return value. You can also filter messages by clicking the filter icon in the message column headers.

Double click a message to expand the details. Click the Open button to view the full message body, attachments, headers and the Automation Log for the message.

Reprocessing Messages

Individual messages can be reprocessed. Select a message (or range of messages) and click the Reprocess button. The selected messages will be added back to the process queue and processed again by the Automation.

Deleting Messages

You can remove individual messages from the Message Store or you can remove all messages for the selected Automation.

Viewing Outgoing Messages

If you use the Send Email action to send scheduled emails on future dates then these scheduled messages are held in the Outbox until they are sent. The Outbox can be viewed by clicking the Outbox button on the Message Store view. You can remove items from the Outbox to prevent them from being sent.

Viewing Sent Items

Any outgoing emails sent using the Send Email action will be shown in the Sent Items view. You can disable outgoing emails being stored using the Automation - Properties - Save Outgoing Emails To Sent Items option.

Viewing The Logs

ThinkAutomation maintains logs for Message Source readers & Automation executions. Click the Logs tab on the ThinkAutomation Studio ribbon.

Log entries will be added in real time. You can filter log lines by clicking the Filter icon in the column headers. For Automation Log lines - double clicking a log line will open the Automation actions list with the relevant Action selected.

Automation Logs for individual messages can be viewed by viewing the Message Store and opening a message detail.

Action Types

Common

Extract Field

Find and extract data from the incoming message body or a variable and assign the extracted data to a field name.

When creating your first Extract Field action it is a good idea to paste a copy of the message body you are extracting data from into the Helper Message box. ThinkAutomation will then highlight the data it will extract for each field as you specify the extraction properties. The Helper text will be saved with the Automation - so you only need to paste it once. For Database message source types the Helper Message text will be auto populated when you use the Test query option.

Enter a Name for the field.

Extract Field From

Select the Field or Variable that you want to extract data from. This defaults to %Msg_Body% - which means extract data from the body of the incoming message.

Finding Data

Find & Extract

In the Find & Extract section you specify how ThinkAutomation will find the data from the Extract From value.

Start From Last Extract Point

Normally ThinkAutomation moves the 'extraction point' as it moves through the Extract From value extracting data for each Extract Field action. Disable this option if you want ThinkAutomation to start from the beginning of the data when it looks for this field. Once a field is extracted the extraction point will be set to the end of the extracted data for the next Extract Field action. The next field extraction starts from this point unless you disable this option.

Case Sensitive

By default ThinkAutomation ignores case when it looks for fields. So 'order number' and 'Order Number' with both match when searching for 'Order number'. Enable this option if you want to perform a case sensitive search.

Is Repeating Block

This option sets the field as a repeating block. If set ThinkAutomation will enter a loop and repeat the extraction of this field until it finds the next field to extract (or the end of the message). You can Call another Automation with the results of each block loop to perform further actions/extraction.

Look For

Enter the text that ThinkAutomation should look for when searching the data for this field. This should be the text that is the same for each message and uniquely identifies the field.

Then Look For

Enter an additional text string that ThinkAutomation looks for AFTER it has found the above text. This is optional, but is useful when data is formatted in the message using an unknown number of tabs or spaces. Consider the following line:

Customer code             :  ABC

We would search for 'Customer code' and then ':' because we don't know how many spaces are between 'Customer code' and ':'. The field extraction would then start after the ':'.

In both the Look For and Then Look For entries you can make use of Regular Expressions to assist with searching.

Find Next None-Whitespace

You can set the Look For or Then Look For to a single dot '.' - a single dot means find the next none-whitespace character.

This can be useful when searching for data. For example, suppose the text contains:

Your serial number is:

1234-5678

If we wanted to extract the Serial Number we would be to look for 'Your serial number is:' and then look for '.' - which would effectively look for any none whitespace after 'Your serial number is:'.

Find Blank Line

You can set the Look For or Then Look For to '\<BlankLine>' or you can include it, eg: 'Customer: \<BlankLine>'. The \<BlankLine> marker searches for a single blank line. A 'blank line' is LF + LF or CRLF + CRLF. To find multiple blank lines use '\<BlankLine>\<BlankLine>'

Extract From Json

If the Extract From contains Json data then you can easily find and extract a specific Json path. Enter or select the Path. If Json sample data has been pasted into the Helper Message then the paths list will be populated automatically.

If the selected Path is an array then you can extract a single array value or all values. Enable the Extract All Array Values To CSV to extract all array values to a CSV string. For example, consider the following Json:

{ "cars":[ "Ford", "BMW", "Fiat" ] }

Setting the path to cars[0] would extract "Ford". If the Extract All Array Values To CSV is enabled then the extracted value would be "Ford,BMW,Fiat".

Extracting Data

Click the Extract Data tab to define how ThinkAutomation will extract data for this field once it has found it.

There are a number of options you can use to extract data (all options start the extraction after the Look For, and optionally Then Look For text):

Until End Of Line

Extract all data up to the end of the line (or the end of the data if there are no more lines).

Until End Of Message

Extract all data up to the end of the data.

Until Any Of These Characters

Extract data until any of the following characters are found. You can then specify a list of characters to search for. If any one of the characters are found then extracting will stop.

Until These Characters

Extract data until specific words or characters are found. You can then specify characters, words or phases to search for. Extraction will stop when the words are found. Regular expressions permitted. You can use the \<BlankLine> marker to search up to the next blank line.

Until These Many Characters

You can manually specify a number of characters to extract.

Until End Tag

Select this option if you are extracting HTML or XML tags. If the Look For value is a tag, for example: \<mytag> then ThinkAutomation will extract up to the end tag \</mytag>. This option will be automatically selected on new fields if you enter a tag in the Look For entry.

Use The Look For Expression

Select this option to extract the field INCLUDING the Look For expression. This is useful when you want to find AND extract using a regular expression. The data would be extracted starting from the Look For value. For example, if the 'Look For is set to the regular expression: [a-zA-Z0-9._-]+@[a-zA-Z0-9_-]+\.[a-zA-Z.]+ (which is the regular expression for an email address) and the Use The Look For Expression option is enabled.. then the first Email address will be found AND extracted. If the Use The Look For Expression is not enabled then the first email address will be found and extraction will start AFTER the end of the email address.

Note: The Extract 'Until' options do not apply if you are using the Extract From Json option.

Clean And Trim Blanks

Enable this option if you want the extracted data to be cleaned and trimmed. This will remove any leading or trailing spaces, tabs or carriage return/line feed/control characters from the field data.

Remove First/Last

You can also select to remove a number of characters from the beginning and end of the extracted data.

Additional Attributes

Select the Attributes tab to define optional additional attributes for the field.

Default Value

Enter a value that will be assigned to the field if no data is found or the extracted value is blank.

Case

This option allows you to change the case of extracted value or to apply Word Capitalization.

Validate

In this section you can define validation rules for the extracted field and you can define what action ThinkAutomation should take if the extracted data is invalid.

Select the Validate option to enable validation for this field. Select Cannot Be Blank Or Zero option if the field must be a value (or be non-zero in the case of numeric fields). For numeric fields you can also select a valid Numeric Range. The Must Be In List option allows you to define a list of valid values. In the Choices entry specify the list of valid values for the field. Separate each value with a | (pipe) character. For example, if the field must be Y or N - specify 'Y|N'

If Data Is Invalid

Here you specify what ThinkAutomation should do if the extracted field data is invalid. There are two options:

  1. Set Field To Default Value - select this option if you want ThinkAutomation to replace the extracted data with the field's default value (or blank if no default it specified).

  2. Throw Error - select this option if you want ThinkAutomation to cancel execution of the Automation for the current message.

Mapping To Database Columns

If you are going to use the Update A Database action in your Automation, then you can map extracted fields to tables & columns in the database you want to update. ThinkAutomation then builds the database update commands automatically.

Note: You can also use the Update A Database Using Custom SQL action type which allows finer control over database updates.

Select the Database Update tab to map the extracted field to a table & column in your database that you want ThinkAutomation to update.

Enter the Update Table Name that the field will be updated on. This table must already exist in your database. Multiple fields can use different table names if required - but the tables must be part of the same database.

Enter the Update Column Name in the table that the ThinkAutomation field will be mapped to.

Field Type

Select the Column data type in your database for the selected Column Name.

Max Field Length

You can optionally specify the maximum allowed field length for the database field. ThinkAutomation will truncate the field before updating the database if the extracted data is greater than the maximum length. Use this option to avoid database errors that will be raised when field data is inserted into your database that is greater than the defined length. This option applies to Text field types only. Set to zero if you do not want ThinkAutomation to truncate the field.

Key Field

Enable this option if this field is a Key Field. Key fields allow you to control how your database is updated. If you create one or more key fields, ThinkAutomation will first check if a record exists in your database using the key field values. If a record already exists then the existing record will be UPDATED otherwise a new record will be INSERTED.

Repeating Blocks

Often messages contain repeating sections. Most of the time you need to run a process or update a database for each individual block of the repeating section. ThinkAutomation allows you to do this by defining a field as a Repeating Block. When a field is defined as a repeating block, ThinkAutomation will enter a loop and extract each block of the repeating section in turn. Another Automation can then be called with the value of each block.

For example:

Suppose you receive the following message:

Name     : Howard Williams
Company  : PSL
Order Ref: 1234

Product  : WHO1
Qty      : 1

Product  : WHO2
Qty      : 2

The Product and Qty fields can repeat any number of times depending on what the customer has ordered.

We can define the Product & Qty fields as a single field and set them as a repeating block. The repeating block can then be passed to another Automation for processing on it's own.

We would define the extraction of the above fields as follows:

  1. Name = Extract Field From %Msg_Body% Look For "Name" Then ":"
  2. Company = Extract Field From %Msg_Body% Look For "Company" Then ":"
  3. Order = Extract Field From %Msg_Body% Look For "Order Ref" Then ":"
  4. Block = Extract Field Repeating Block From %MsgBody% Look For "*" Call Process Order Lines

The Name, Company and Order fields we extract by looking for the Name:, Company: and Order Ref: field headers and extract until the end of the line.

For the Block field we set the Look For to '*' - which means start from the next character after the last extract point:

We set the Extract Data option to Until These Characters - and set this to '\<BlankLine>' which means 'the next blank line'.

You then enable the Is Repeating Block option on this field. ThinkAutomation will then repeat the field extraction until it either finds the next field in the extracted fields list or the end of the message.

We then create another Automation. In this case - called 'Process Order Lines'. This Automation will receive each block of the repeating section as a new message. The 'Process Order Lines' Automation can then extract the Product and Qty fields and perform further processing.

When you enable the Is Repeating Block option the Call tab becomes visible on the Extract Field properties.

On the Call tab of the repeating block field we select the Automation to call. The Body Text should be set to the value that you want this Automation to receive for each block. The Body Text should contain the %ExtractedValue% replacement field - this will be replaced with the current block text on each call. You can add additional field replacements if you also want to pass previously extracted fields. For example:

Name     : %Name%
Company  : %Company%
Order Ref: %Order%
%ExtractedValue%

For each block the 'Process Order Lines' Automation would be called with messages set to:

Name     : Howard Williams
Company  : PSL
Order Ref: 1234
Product  : WHO1
Qty      : 1

and then..

Name     : Howard Williams
Company  : PSL
Order Ref: 1234
Product  : WHO2
Qty      : 2

Set Variable

Creates or sets a variable.

In addition to Extracted Fields you can also make use of Variables in your ThinkAutomation Actions.

A Variable is simply a place holder for a specific value.

Many other Actions can return values which can be assigned to Variables. In these cases you should create the Variable first by simply dragging into the Actions list and giving it a name before using it other Actions.

Each Variable must be given a Variable Name.

You can optionally assign it a Value. The Value can be a fixed value or the value of another variable, extracted field or combination (using %field% replacements).

Operations

The Operation option allows you to perform an optional additional operation on the Value before it's assigned to the Variable. The following operations are available:

Category Details
No Operation Just Assign
Convert HTML To Plain Text
Convert HTML To XML
Convert HTML CSS To Inline Style Attributes
Convert Markdown To HTML (see: Markdown Notes)
Convert Plain Text To HTML
Convert To Lower Case
Convert To Upper Case
Convert To Word Capitalized
Date Add Days To
Date Subtract Days From
Extract Alias From Email Address (eg: 'test' from 'test@mydomain.com')
Extract All Email Addresses
Extract All URLs
Extract Concepts
Extract Directory Name Only From Path & Filename (eg: 'C:\Documents\' from 'C:\Documents\mydocument.pdf')
Extract Domain From Email Address (eg: 'mydomain' from 'test@mydomain.com')
Extract Filename Only From Path & Filename (eg: 'mydocument.pdf' from 'C:\Documents\mydocument.pdf')
Extract File Extension From Filename (eg 'pdf' from 'mydocument.pdf')
Extract Filename Without Extension (eg 'mydocument' from 'mydocument.pdf')
Extract First Email Address Only
Extract First Line
Extract First Sentence
Extract First URL
Extract First Word
Extract Keywords
Extract Normalize Words
Extract Summarize
Mask Mask Credit Card Numbers (replaces any credit card numbers with ***)
Mask Mask Profanities (replaces any profanity words with ***)
Numeric Add To
Numeric Decrement
Numeric Get Length
Numeric Get Word Count
Numeric Increment
Numeric Subtract From
String Add Space Character To End
Create Global Unique Identifier (Guid - In hex or decimal format)
Create ObjectId (MongoDB style unique string)
String Normalize Line Endings (Cr+Lf)
String Normalize Line Endings (LF Only)
String Prepend
String Remove Invalid Filename Characters
String Sort Lines Ascending
String Sort Lines Descending
Transform Base 64 Decode
Transform Base 64 Encode
Transform Compress
Transform Create MD5 Hash (Hex Encoded)
Transform Create MD5 Hash (URL Encoded)
Transform Decompress
Transform Decrypt
Transform Encrypt
Transform Quoted Printable Decode
Transform Quoted Printable Encode
Transform SHA256 Hash (Base64 Encoded)
Transform SHA256 Hash (Url Encoded)
Transform SHA512 Hash (Base64 Encoded)
Transform SHA512 Hash (Url Encoded)
Transform URL Decode
Transform URL Encode
Trim All Whitespace
Trim Blanks
Trim First And Last Characters

If the Append To Existing Value option is enabled then the Value will be appended to the existing value for the Variable. Care should be taken using this if the Persist Value option is enabled and the variable value is not cleared at some point - within the Automation, to avoid ending up with very large strings.

Persisted Variables

If the Persist Value option is enabled then the Variable value will be saved by the ThinkAutomation Server between messages processed. For example: If an Automation sets a persisted variable called 'var1' to 'abc' on message 1, when the Automation next executes for message 2 then variable 'var1' will be automatically set to 'abc' before the Automation starts processing. Persisted variables are stored in the Message Store database - so will be persisted even when the ThinkAutomation Server is restarted.

Persisted Variables are shared within the Solution. This means that if you have persisted variable 'var1', then any Automations that use this variable name will receive the same persisted value if the Persist Value option is enabled for each instance.


Execute Script

Executes custom C# or Visual Basic .NET code.

You can create a custom script to execute custom logic. Scripts can be written in C# or Visual Basic .NET. Select the Language to use before you edit your script code. Each Script Action must be given a Script Name.

When ThinkAutomation executes a Script action it calls the execute method. This is the entry point. Inside your script you can add any number of additional methods. The returned value from the execute method will be assigned to the Assign Return Value To variable.

Scripts are compiled by ThinkAutomation when they are executed for the first time. Once compiled, scripts will execute as fast as built-in actions. Scripts will be recompiled if they are changed.

Accessing Automation Variables

Scripts can access and update existing Extracted Fields or Variables. To access a value use:

message.GetValue("name");

Where 'name' is an existing Variable or Extracted field name.

You can drag and drop a variable onto the script editor - it will be converted to the above code.

You can also access any of the built-in fields, solution constants & system constants:

message.GetValue("%Msg_ToWithNames%"); // the enclosing % signs are optional.

To set an existing Variable or Extracted Field use:

message.SetValue("name","value");

Where 'name' is an existing Variable or Extracted Field name. The 'value' can be any string value.

Accessing Message Properties

The message object contains read-only properties for the currently executing message. For example: message.Subject can be used to access the Subject directly. Main properties:

Property Name Details
MessageId The id of the incoming message.
MimeText The full mime text of the incoming message.
Subject The message subject.
BodyPlainText The plain text body. If the incoming message is html without a plain text body then this property will return the plain text version of the html (with all tags removed).
BodyHTML The html body.
Dated The message date.
From The from address.
ReplyTo The reply-to address.
ToAddress The to address.
CC, BCC The cc / bcc address.
Size The message size.
AutomationName The name of the Automation currently executing.
SolutionName The name of the Solution containing the Automation.
SolutionEmail The email address assigned to the Solution.
TempPath The path to the temporary files folder for the Solution.
Accessing Attachments

The message.Attachments property contains a list of currentMessageAttachment objects for the current message.

currentMessageAttachment Attachment;
foreach (var Attachment in message.Attachments)
{
    string name = Attachment.Name;
    int size = Attachment.Size;
    string path = Attachment.Location; 
}

The Location property of the Attachment object contains the path to the temporary location of the attachment file during Automation execution.

You can also access related items (embedded attachments in email messages) using message.RelatedItems.

Accessing Headers

The message.MessageHeaders property contains a list of currentMessageHeader objects for the current message.

currentMessageHeader Header;
foreach (var Header in message.MessageHeaders)
{
    string hname = Header.Name;
    string hvalue = Header.Value; 
}
Adding To The Automation Log

You can add an entry to the Automation Log using:

message.AddToLog("script message");
Handling Exceptions

To add an error to the Automation Log use:

message.AddErrorToLog("A script error occurred");

Inside any methods you create in your script you should always use Try .. Catch blocks to catch any Exceptions and then use the message.AddErrorToLog method to pass details of the error back to the Automation. This will then show any script errors in your Automation log. For example:

static int ordervalue(currentMessage message)
{
    try
    {
        int qty = Convert.ToInt32(message.GetValue("qty"));
        decimal price = Convert.ToDecimal(message.GetValue("price"));
        return qty * price;
    }
    catch (Exception e)
    {
        // Pass the error back to the automation log
        message.AddErrorToLog("Script Error:" & e.Message);
        return 0;
    }
}
.NET References

Scripts can reference other .NET assembles. Use the References tab to add additional references. Any .NET referenced assembly must be located in the ThinkAutomation program files folder or be in the global .NET path.

Http Helper Class

If you need to make http requests inside your execution code, you can optionally use the helpersHttp class which simplifies the process. See: Using The Http Helper Class for more information.

Validating A Script

Click the Check button to validate that the script compiles successfully.

Note: If you want to re-use a script on multiple Automations, you can create a Custom Action.


Update A Database

Updates a database with fields extracted from the incoming message.

The tables and column names used in the SQL commands are specified on the Database Update tab on each individual Extract Field Action. ThinkAutomation will then create the necessary SQL commands automatically.

Select a Database Type to connect to from the list. You must specify a Connection String that ThinkAutomation will use to open the database. Click the ... button to build the connection string. Click the Test button to verify that ThinkAutomation can connect to the database.

The UPDATE and SELECT commands will only be created if you have defined one or more of your Extracted Fields as Key Fields. ThinkAutomation will then first check if a record exists with the key field values by issuing a SELECT * FROM ... command. It will then execute the UPDATE command if a record is found or the INSERT command otherwise.

You can have only have one Update A Database Action in your Actions List. If you want to update multiple tables within the same database you can specify the different table names against each Extracted Field in the Update Table Name entry - ThinkAutomation will then create separate SQL commands for each separate table being updated.

If you need to update multiple separate databases within the same Automation then you can use the Update A Database Using Custom SQL Action. You can have any number of Update A Database Using Custom SQL Actions within your Automation.


Process Attachments

Saves attachments to specific folders on your file system.

Specify the File Mask for the extensions you want to save. For example: *.pdf to save all files with the extension .pdf. Use *.* to save all attachments. You can create multiple Save Attachment Actions in the same Automation if you need to process different file types differently.

In the Save To Folder select the folder on your file system to save the attachments to. This can contain %field% replacements.

For example: To save all attachments to sub folders based on the senders email address use 'C:\Attachments\%Msg_From%\'.

The directory will be created if it does not exist.

Renaming Attachments

In the Rename Saved Files To entry you can optionally specify a new name for the file. You can use %fieldname% replacements in the Rename to - for example: order%OrderNumber%.csv would rename the attachment order1234.csv if the %OrderNumber% field contained '1234'.

You can use the special field replacement %filename% to use the original file name as part of the renamed file. For example, suppose the incoming attachment was called "orderdata.csv" and the %OrderNumber% field was set to '1234' - renaming to: %filename%No%OrderNumber%.csv would rename the file 'orderdata_No_1234.csv'.

If your rename string doesn't contain a file extension then the original extension will be used. For example: If the attachment is called 'attachment.csv' and you rename it to %OrderNumber% - then the attachment will be renamed '1234.csv' (assuming the %OrderNumber% field has a value of '1234').

You can assign the saved path and file name to a ThinkAutomation variable. Select the variable to assign using the Assign Saved Path To list. Multiple saved attachments will be separated by commas.

Overwrite Existing Files

Check this box if ThinkAutomation should overwrite existing files.

Append Key To Filename To Make Files Unique

If this option is selected then ThinkAutomation will append a date and time stamp to the file name (including renamed files) to ensure that the file name is unique. The time stamp is in the format yyyymmddhhmmss_x

For example: order123420120307122033_1.csv

Would be save for file order1234.csv on 7th March 2012 and 12:20:33. The _1 indicates that this is the first attempt at saving using this file name. If a file already existed with the same time stamp (for example, if ThinkAutomation was processing multiple emails very quickly) the counter would be increased until a unique file was found.

Include Inline Attachments

For HTML emails you can also save inline attachments - these would usually be images embedded in the HTML that don't appear as regular attachments.

Further Attachment Processing

Other actions (such as Convert Document, Convert PDF Document, FTP Upload, Azure Blob etc.) allow specific processing of Attachments.


Data

Lookup From A Database

Reads records from an external database and assigns column results to multiple ThinkAutomation variables.

Select a Database Type to connect to from the list. You must specify a Connection String that ThinkAutomation will use to open the database. Click the ... button to build the connection string. Click the Test button to verify that ThinkAutomation can connect to the database.

Enter the SQL Statement to use to query records from the database. The SQL Statement can contain Parameters. Eg:

SELECT * FROM Person WHERE Id = @Id

For any Parameters you must complete the Parameters list. Specify the Name, Type & Value for each parameter used. Parameter values can be set to %field% replacements. Click the Test button to verify the query.

Assign Individual Columns To ThinkAutomation Variables

In the Column Assignments grid you can map database columns returned from the query to ThinkAutomation variables.

In the SQL Field Name/Number column specify a database field name or position number from the SELECT statement.

In the Assign Result To column select a ThinkAutomation Variable that you want the database field value assigned to.

Assign All Columns To A Single Variable In JSON Format

You can also assign all columns returned by the query as JSON text to a single ThinkAutomation variable. Select a variable from the Assign Row Json To list (optional).

Each column returned by the query will be a JSON value. For example:

{
  "PersonId": 1,
  "PersonType": "EM",
  "NameStyle": false,
  "Title": "",
  "FirstName": "Ken",
  "MiddleName": "J",
  "LastName": "Sánchez",
  "Suffix": "",
  "EmailPromotion": 0,
  "AdditionalContactInfo": "",
  "ModifiedDate": "2009-01-07"
}

You can then perform other actions on this value - or pass it to another Automation using the Call Automation action.

If the database query returns multiple rows, then the first row returned will be used. If no rows are returned then assign-to variables will not be assigned.


Open Database Reader

Opens a connection to a database for use with For.. Each Actions

The Open Database Reader Action opens a connection to a database using a SQL query. The connection remains open during Automation execution. You can then create a For..Each loop to read each record returned by the query.

Enter the Reader Name. This is a unique name for the data reader. A single Automation can open multiple data readers - each having a unique name.

Select a Database Type to connect to from the list. You must specify a Connection String that ThinkAutomation will use to open the database. Click the ... button to build the connection string. Click the Test button to verify that ThinkAutomation can connect to the database.

Enter the SQL Statement to use to query records from the database. The SQL Statement can contain Parameters. Eg:

SELECT * FROM Person WHERE PersonType = @Type

For any Parameters you must complete the Parameters list. Specify the Name, Type & Value for each parameter used. Parameter values can be set to %field% replacements. Click the Test button to verify the query.

Now create a For..Each Action. Specify the For Each option as Data Reader Row In and select the Reader Name.

You can then select a variable from the Assign Data Row Json To selector to be assigned the current row Json. The current row Json will be set for each record returned from the query. For example:

{
  "PersonId": 1,
  "PersonType": "EM",
  "NameStyle": false,
  "Title": "",
  "FirstName": "Ken",
  "MiddleName": "J",
  "LastName": "Sánchez",
  "Suffix": "",
  "EmailPromotion": 0,
  "AdditionalContactInfo": "",
  "ModifiedDate": "2009-01-07"
}

You can then perform other actions on this value - or pass it to another Automation using the Call Automation action.

The For..Each loop will continue until all records from the query have been read.


Execute A Database Command

Executes a SQL Command or Stored Procedure with optional parameters and returns multiple return values.

This Action allows you to execute a SQL Statement or Stored Procedure. You can pass any number of parameters and assign output parameters to variables.

Select a Database Type to connect to from the list. You must specify a Connection String that ThinkAutomation will use to open the database. Click the ... button to build the connection string. Click the Test button to verify that ThinkAutomation can connect to the database.

Select the Command Type. This will be a SQL Statement or Stored Procedure.

Specify the Command SQL statement or Stored Procedure Name depending on the command type. You can substitute parameters using @parametername in the SQL Command statement.

You can pass multiple parameters to your command.

For each parameter in the SQL Statement you must specify the Name, Type, Direction & Size. These must match your stored procedure parameters.

For Output Parameters you can specify the variable to Assign Result To.

For Input Parameters you set the Value - this can be fixed or a %field% replacement.


Update A Database Using Custom SQL

Insert or Update a row in a database using custom SQL.

This Action allows you to insert or update a row in a database based on the results of a select statement.

Select a Database Type to connect to from the list. You must specify a Connection String that ThinkAutomation will use to open the database. Click the ... button to build the connection string. Click the Test button to verify that ThinkAutomation can connect to the database.

The Insert tab is used to enter any valid SQL statement. You can also optionally enter statements in the Update and Select tabs.

If a select statement is entered in the Select tab, then the SQL entered in the Update tab is executed if the select returns one or more rows. If no rows are returned then the SQL entered in the Insert tab is executed.

The select, insert & update statements can contain parameters (using @parametername).

You must specify the Name, Type & Value of each parameter used. Parameter values can be assigned to %field% replacements.

For the Insert & Update statements you can assign the rows affected to a variable.


Update MongoDB

Insert or Update documents in a MongoDB collection.

Specify the MongoDB Connection String, Database Name & Collection Name.

Enable the Upsert option if you want an existing document returned from the Query to be updated. If no document is returned from the Query then a new document will be inserted. If Upsert is enabled you must specify the Query Json.

Specify the Document Json.

If you want to store a full copy of the incoming message you can use the built-in field %Msg_Json%. If the incoming message body is already Json (for example, if using the Database message source) then you can set the Document Json to %Msg_Body%.

You can use the Create Json action to create a Json document to insert/update.


Lookup From A Mongo Database

Read a document from a MongoDB Collection and assign the Json to a variable.

Enter the MongoDB Connection String, Database Name and Collection Name. Enter the Query json and optionally the Projection and Sort json. Click the Test button to test the connection and query.

You can use %field% replacements in the query. For example:

{ "_id": { "$eq": "%OrderNumber%" } }

Select the variable to assign the returned document(s) to from the Assign To list.

You can then use Extract Field Actions (with the extract Json path option) to extract individual fields from the document.


Update Excel File

Updates a Microsoft Excel Spreadsheet file with fields extracted from the incoming message.

Enter or select the Excel File Name to update.

ThinkAutomation will create the file if it does not already exist. Field names will be written to the first line of the file. Excel does not need to be installed on the ThinkAutomation computer for this Action to work.

The spreadsheet will be in the following format:

ExtractedField1 ExtractedField2 ExtractedField3
Value Value Value

If the spreadsheet is blank the header line will be created with each extracted field name.

The data line will be added to the existing data lines with each extracted field.

Update Specific Cells

By default ThinkAutomation adds a row to the Excel Spreadsheet, with a column for each extracted field. You can change this and update specific cells. Enable the Update Specific Cells option. You can then specify specific cell ids (eg: A1, B4, E23 etc) and the value to assign each one.

Note: If the file is located on a network drive the ThinkAutomation Service may not have permission to write to it. You must run the service under a different user.

Note: Do not save the file to your desktop. The ThinkAutomation Services runs under the SYSTEM account, which may not have access to your desktop. Instead, save the file to a regular folder on your C:\ drive or use the %Root% built-in field.


Update CSV File

Create or update a CSV file with fields extracted from the incoming message.

Enter or select the CSV File Name to update. This is optional. If no file name is specified then the created CSV data will be assigned to the variable selected from the Assign To list.

ThinkAutomation will create the file if it does not already exist. Field names will be written to the first line of the file.

Select the file Format of the CSV file. This can be ASCII, Unicode or UTF-8 (default).

Select the Field Delimiter. This is normally a comma, but can be any character. You can select select a | (pipe) character or TAB from the drop down.

Select the Line Terminator. This can be CRLF (Carriage Return/Line Feed), LF (Line Feed Only). CRLF is the default.

Select Don't Add Field Header Line When Creating if you want the CSV file to contain data lines only. By default, when the CSV file is first created the first line will contain the field headers.

Select Use Custom Field List if you want to define your own fields/variables to include in the CSV file. If not selected then just the extracted fields will be used. If you choose to use a custom field list then you can then select the field name/variable or constant to include in each column. You can also specify the field header names.

Optionally select a variable from the Assign CSV Data To list to receive the CSV data.

Note: If the CSV file is located on a network drive the ThinkAutomation Service may not have permission to write to it. You must run the service under a different user.

Note: Do not save the CSV file to your desktop. The ThinkAutomation Services runs under the SYSTEM account, which may not have access to your desktop. Instead, save the CSV file to a regular folder on your C:\ drive or use the %Root% built-in field.


Counter

Updates a counter value for any name/value pair.

This action can be used to update a counter value that is stored by the ThinkAutomation Server. After updating the counter the new counter value can be returned to a variable.

Enter the Counter Name & Value. The Value can contain %field% replacements.

Note: Counters are shared within a Solution. So if a counter on two Automations within the same solution update the same name/value pair then the same counter will be used.

Period

Counters can be maintained per Day, Day Of Week, Month, Year or Static. If a period is selected then a new counter is created for each period. A Static counter has no period.

Operation

You can Increment, Decrement, Get or Set a counter. If Set is selected then you can specify a value.

When a message is processed, ThinkAutomation will lookup the unique name/value pair. A new counter will be created if the name/value pair does not exist.

Any arbitrary data can be counted. For example:

  • Messages by day of week (leave Value blank and set the Period to day of week).
  • Messages by email address per month (set the Value to %Msg_From% and the Period to month).
  • Messages by any Extracted Field or Variable values (payment types, currencies etc) by day, week day, month, year or total.
  • Orders by Company Name per year (set the Value to a field/variable holding a company name and the Period to year).
  • Emails sent by email address per month (set the Value to the variable containing the receiver address and the Period to month).

The counted Value has a maximum size of 250 characters. Values larger than this will be truncated before being counted.

Select a variable to receive the updated counter value from the Assign Counter Value To list.

Viewing Counters

Counters can be viewed using the ThinkAutomation Studio. Open the Solution properties page and click the View Counters button. You can clear a counter using the Clear button.


Outgoing

Send Email

Sends new outgoing email messages.

You can send multiple outgoing emails to different recipients. Emails can be sent immediately or you can Schedule Send on future dates. Email messages can be sent in text and/or HTML format. You can add attachments to outgoing emails and you have the option of including the incoming attachments with outgoing emails.

Enter the From & To addresses and Subject. The Reply To, CC & BCC are optional.

If you want to send the email to the sender of the incoming message set the To address to the %Msg_From% built-in field.

TIP: 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 %field% replacements for both parts.

TIP: 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.

Attachments

You can attach files to outgoing messages. You can also include all the attachments from the incoming message.

You can add attachments - click the ... button on the Attach box to add local files. You can also use %field% replacements in the Attach box to include files created by other actions.

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 %field% replacements.

External Content For HTML

For HTML 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.

Markdown

You can use Markdown on the plaintext message. The Markdown will be converted to HTML when the email is sent. To use Markdown to HTML conversion - ensure that the HTML text is blank or left as the default. See: Markdown Notes

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 records 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.

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 store the EML or use a custom action or script to actually send the message. If the Dont Send option is enabled, then ThinkAutomation will not send the email - it will just assign the resulting mime text to the specified variable (the Dont Send option cannot be used for Scheduled Messages).


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 public URL that must be accessed. ThinkAutomation will pause execution of the Actions for the current message until a user accesses the URL. 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. This action can optionally show a web 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

For each Wait For User Response request ThinkAutomation creates a unique Validation URL. You must send an email or SMS containing the %Msg_ValidationUrl% field 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 separate Send Email Action to send you own message containing the %Msg_ValidationUrl% field (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 customize the email. The Body text must contain %Msg_ValidationUrl% somewhere.

The Send Request Via Studio Users option will send the validation request to any users running the ThinkAutomation Studio. Studio users can complete the validation request from there. You can specify specific Usernames or leave this blank to send to any ThinkAutomation Studio 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 input 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.

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' or 'false'.

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 Field to add a new input field.

Enter a Name and Label Text. The Field Type can be Text, Number, Date, Time or Boolean. For text field types you can specify the Max Length. The Multi-Line option allows you to define the maximum lines. The Password Entry option allows you to mask the input.

The Input Mask can be used to supply a regular expression to use as an input mask to format and limit what can be entered.

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 'Do you want to delete this customer?' - with a Y/N choice. The value can be assigned to a Variable called 'Delete'. After the Wait For User Response Action you can add a conditional Action: 'If %Delete% Is Equal To Y Then ....'

Note: The Validation 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 or sends an iCalendar compatible appointment request as an email attachment.

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:

  1. 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.

  1. 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.

  2. 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 %field% 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 %field% replacements if required. If a Start/End Date is given as a %field% replacement then the field 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. %field% 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.


Documents

Create Document

Create a document using the built-in Word Processor and save the document in various formats.

Enter the Document Name and click the Edit Document button to start the Word Processor.

You can now edit the document. The document can be formatted, contain tables, images, headers/footers etc.

Inserting Variables

On the document editor ribbon - click the Insert button to add any of your Extracted Fields or Variables (or type %variable% directly in the document). These will be replaced when the Automation executes.

Click Save in the document editor to save the document template with your Action.

Save As

From the Save As Format list select the type of file to save when the Automation Executes. The document can be saved as:

  • PDF
  • DOCX (Microsoft Word)
  • TXT (Text File)
  • RTF (Rich Text File)
  • HTML
  • MHT
  • EPub

When the Automation executes the document template will be used to create a file in the above format. All %fields% in the document will be replaced.

If PDF format is selected then you can specify a Password. The recipient of the PDF file will need the password to open it.

If HTML format is selected then the following options are available:

  • Use Inline Styles - select this option to use Inline CSS instead of a style section. This option should be used if you will use the HTML on outgoing emails.
  • Embed Images - select this option to specify whether images should be embedded into the HTML or stored externally. Embedded images in the HTML document are stored in base64 encoding. This option should be used if you will use the HTML on outgoing emails.

Specify the Save To folder - click the ... button to select a local file or use %Root% to save it in the default ThinkAutomation location.

Enter a File Name to save the document as (the extension will be added automatically based on the Save As Format if it is not specified).

If Ensure Unique File Name is enabled then ThinkAutomation will add a timestamp to the filename to ensure it is unique.

If Delete File After Message Is Processed is enabled then ThinkAutomation will remove the file when the Automation completes for the current message. This is useful if you wish to use the document in the Automation (for example, to send the document as an attachment with the Send Email action, or to use the html file as the body of an outgoing email), but do not need to keep a local copy afterwards.

You can assign the saved path & filename to a variable by selecting the variable from the Assign Saved File Path To list. You can then use this variable in the Attachments entry on Send Email actions or in any other way.

Default Document Template

When creating a new document, ThinkAutomation will look for the Microsoft Word document DefaultDocument.docx in the ThinkAutomation program files folder. If this file exists it will be loaded and all the styles available in the document can then be used in the new document.


Convert Document

Converts a Microsoft Word, Excel, PDF, Richtext, Text, Markdown Text, CSV or HTML, file to various formats.

The document to convert can be a local file (or a file saved from a previous action) or incoming Attachments.

Select a Document To Convert - this can be any local file or a %field% replacement. You can specify multiple documents if required, separated by commas.

Enable the Include Incoming Attachments option to convert attached documents matching the Matching Mask. Enter *.* to convert all supported attachments.

Select the Convert To type. You can convert to the following formats:

  • PDF
  • DOCX (Microsoft Word)
  • XPS
  • HTML
  • TXT
  • CSV
  • Images (PNG, GIF, BMP, JPEG, TIFF)

When converting PDF to image files, each page in the PDF document will be converted to a separate image file. The page number will be added to the filename, eg: document_1.tiff, document_2.tiff.

In the Rename Converted Files To entry you can optionally specify a new name for the converted file. You can use %fieldname% replacements - for example: order%OrderNumber%.pdf would rename the attachment order1234.pdf if the %OrderNumber% field contained '1234'.

You can use the special field replacement %filename% to use the original file name as part of the renamed file. For example, suppose the document to convert was called "orderdata.docx" and the %OrderNumber% field was set to '1234' - renaming to: %filename%No%OrderNumber%.pdf would rename the file 'orderdata_No_1234.pdf'.

If your rename string doesn't contain a file extension then the Convert To type extension will be used.

In the Save To Path entry, enter or select the local folder to save the converted document to.

You can assign the saved path & filename to a variable by selecting the variable from the Assign Filename(s) To list. You can then use this variable in the Attachments entry on Send Email actions or in any other way.

If Delete File After Message Is Processed is enabled then ThinkAutomation will remove the file when the Automation completes for the current message. This is useful if you wish to use the document in the Automation (for example, to send the document as an attachment with the Send Email action), but do not need to keep a local copy afterwards.

Note: Markdown text files ('.md') will be converted to HTML first before being converted to the Convert To file type.


Convert Document To Text

Converts Microsoft Word, PDF, RichText and HTML documents to plain text and assigns the text to a variable.

Select a Document To Convert - this can be any local file or a %field% replacement. You can specify multiple documents if required, separated by commas.

Enable the Include Incoming Attachments option to convert attached documents matching the Matching Mask. Enter *.* to convert all supported attachments.

Select the variable to receive the plain text from the Assign Converted Text To list.

The document(s) will be converted to plain text - some positioning will be retained (such as blank lines and indentation) however the plain text will contain no formatting, only raw text. If multiple files are converted within the same action then the extracted text from each file will be appended to the returned text.

PDF Form Data

Enable the PDF Return Form Data option to return only form data from PDF files. If enabled then form data only will be extracted in the following format:

{form field Name}: {value}
{form field name}: {value}
...

You can then use the text in other actions - or use Extract Field actions to extract data from the text.


Convert PDF Document

Converts PDF files or attachments to various image formats or text.

Select a Document To Convert - this can be any local PDF file or a %field% replacement. You can specify multiple documents if required, separated by commas.

Enable the Include Incoming Attachments option to convert attached documents matching the Matching Mask. Enter *.* to convert all PDF attachments.

From the Convert To list, select the type of file to convert the PDF document(s) to.

You can specify a Page Range to convert. Leave this entry blank to convert all pages in the document. Or specify a single page, a range (eg: 1-10) or a comma separated list of pages (eg: 1,3,5).

For Image conversion you can specify the Resolution. Larger resolutions will result in bigger converted files and increase conversion time.

For Image conversion enable the Color option if you want full color images created. Otherwise the images will be Grey-scale.

Converted files will have the same name as the original but with the new file extension. For image files, each page in the PDF document will be converted to a separate image file. The page number will be added to the filename, eg: document_1.tiff, document_2.tiff. You can rename the converted file by entering the new filename in the Rename Converted Files To entry. Use the field replacement %filename% to include the original file.

Specify the folder to save the converted files to in the Save To Path entry.

You can assign the full path & file name to a ThinkAutomation variable to use on subsequent actions (for example, if you wanted to attach the file to an outgoing message). Select from the Assign Filename(s) To list. Multiple files will be separated by commas. You can use this variable on the attachments entry of outgoing emails if you wanted to send the converted files via email.

If Delete File After Message Is Processed is enabled then ThinkAutomation will remove the file when the Automation completes for the current message. This is useful if you wish to use the document in the Automation (for example, to send the document as an attachment with the Send Email action), but do not need to keep a local copy afterwards.


Sign PDF Document

Adds a digital signature to a PDF document.

Select a Sign PDF Document - this can be any local PDF file or a %field% replacement. You can specify multiple documents if required, separated by commas.

Enable the Include Incoming Attachments option to sign attached documents matching the Matching Mask. Enter *.* to sign all PDF attachments.

You must then select a Certificate. This can be either an existing certificate stored in the Windows Certificate Store (specify the Common Name - ThinkAutomation will search for a certificate matching the Common name.) or a PFX file (you must also specify the PFX Password).

Optionally specify a Timestamp URL (eg: http://timestamp.digicert.com) if you want the signature to include a timestamp.

Signature Box

The signature can be added to the first or last page. Select from the Add To Page list. It will be positioned on the page using the Placement (eg: top/left, or bottom/middle).

You can optionally add an Image (for example, a green tick mark) and set the Image Placement & Image Opacity.

You can specify up to 3 lines of text to add to the signature block. The text can contain %field% replacements.

Saving Signed Documents

Signed PDF documents by default will have the same name as the original. You can rename the signed PDF document by entering the new filename in the Rename Signed Files To entry. Use the field replacement %filename% to include the original file.

Specify the folder to save the signed documents to in the Save To Path entry.

You can assign the full path & file name to a ThinkAutomation variable to use on subsequent actions (for example, if you wanted to attach the document to an outgoing message). Select from the Assign Filename(s) To list. Multiple documents will be separated by commas. You can use this variable on the attachments entry of outgoing emails if you wanted to send the signed documents via email.

If Delete File After Message Is Processed is enabled then ThinkAutomation will remove the file when the Automation completes for the current message. This is useful if you wish to use the document in the Automation (for example, to send the document as an attachment with the Send Email action), but do not need to keep a local copy afterwards.


Save As PDF

Renders the incoming message or html file/URL as a PDF document.

From the Render list, select Render Message to render in the incoming message. This will render the incoming message as it would appear in a web browser - including all images.

Select Render File Or Url to render any html file or web page. Enter the file path or full URL to the web page you want to save as a PDF.

Select the Page Size, Orientation & Margin.

You can also enter an open Password. Users opening the PDF must enter this password before they can view the content.

Enter the File Name and select the Save To folder. You can use %field% replacements in the file name. A '.pdf' extension will be added if required.

If Ensure Unique File Name is enabled then ThinkAutomation will add a timestamp to the file name to ensure it is unique within the Save To folder.

If Delete File After Message Is Processed is enabled then ThinkAutomation will remove the file when the Automation completes for the current message. This is useful if you wish to use the document in the Automation (for example, to send the document as an attachment with the Send Email action, or to use the html file as the body of an outgoing email), but do not need to keep a local copy afterwards.

If Generate Table Of Contents Using H1-H6 Tags option is enabled then a table of contents will be generated using HTML heading tags (H1-H6) and inserted into the start of the document.

Enable the Print Created Document option if you want ThinkAutomation to print the PDF file after it is created. You can select the Printer to use.

You can assign the full save path & file name to a ThinkAutomation variable to use on subsequent actions (for example, if you wanted to attach the file to an outgoing message). Select from the Assign To list.

Header/Footer

You can also add Header & Footer HTML. This will be rendered at the top & bottom of the page. Any HTML can be used in addition to %field% replacements. You can also enter the Header/Footer Height in pixels.

Page Breaks

The page breaks in the generated PDF document can be controlled using the following CSS properties:

  • page-break-before: always style forces a page break in the PDF before the element.
  • page-break-after: always style forces a page break after the element.
  • page-break-inside: avoid style will ensure a page break does not occur inside the element if possible.

Word Merge

Performs a mail merge on a Microsoft Word document or Word Attachments and saves the merged document as a new file.

This action takes a Word Document and replaces all the mail-merge fields in the document with ThinkAutomation variable values. The resulting merged document is then saved.

Specify the Word File or select Merge Word Attachments and enter a File Mask to use any Word Documents attached to the message.

In the Save Merged Document To enter the new name for the merged document. You can use the special %filename% replacement to use the original file name in part of the new filename. If no name is specified then the original document will be saved.

In the Save To Path specify the folder to save the new document in.

The merged document path & filename can be assigned to a ThinkAutomation variable. Select the variable to use from the Assign Filename(s) To list.

Select Delete After Message Is Processed if you want ThinkAutomation to delete the file after it has finished executing all actions for the current message.

You must then map the Word Document Merge Fields to ThinkAutomation fields/variables. Click the Get Fields From Word Doc to extract mail merge fields from any Word Document. You can also just type them in the list.

Specify each mail Merge Field and the Value to assign the field to. This can be a fixed value or any ThinkAutomation Field, Variable or Built-in Field.


Print

Prints the incoming message, a report of extracted fields or document attachments.

Enable the Print Message option to print the incoming message.

Enable the Print Extracted Fields option to print a table showing extracted field names and values.

Enable the Print PDF Attachments option if you want ThinkAutomation to print PDF file attachments.

Enable the Print Document Attachments option if you want ThinkAutomation to print any Word, Excel, HTML or Text documents.

You can pre-select the printer to use from the Printer list.

Note: If you select a network printer the ThinkAutomation service may not have permission to print to it. This is because the ThinkAutomation service runs under the SYSTEM account by default and the SYSTEM account cannot access any network resources. Configure the ThinkAutomation Message Processor service to run under a different user.


Run A Report

Creates a report using a pre-defined report template. Reports can be printed, and/or exported to various formats, including PDF, HTML, Rich text and Excel. Exported reports can be attached to outgoing emails.

Enter a Report Name.

Click the Edit Report to start the Report Designer

Using The Report Designer

ThinkAutomation includes a report designer that allows you to create custom report templates. Reports can use ThinkAutomation variable data and link to external data sources.

The Extracted Fields/Variables and built-in fields will be listed in the report designer Explorer pane - Fields List. You can drag any of these onto the report designer surface.

After you have dragged a field to the designer, click it to edit its properties in the Properties Toolbox. You can change colors, alignment, borders, fonts etc. You should also re-size the field so that it will fit the data contents. (Note: If the 'Can Grow' property is set to True then the field height will grow automatically based on the field content).

You can also drag other objects onto the report (Labels, Images, Text Boxes, Charts etc). External data sources can be added using the Add Data Source button.

Click Save in the report designer to save the template.

Enable the Export Report option to export the report at run time. Select the file format from the Export Format list. Available types are:

  • PDF
  • DOCX (Microsoft Word)
  • XLSX (Microsoft Excel)
  • PNG, JPEG
  • TXT, RTF
  • HTML
  • MHT

Use the Assign Export Filename To list to select a ThinkAutomation Variable to assign the exported file name to. You can then use this %fieldname% on other Actions - such as the Send Email action to add the exported report as an attachment.

Enable the Print option to also print the report.


Office 365

Get/Update Contact

Get or add/update a Contact record for an Office 365 Account.

Click the Sign In button to sign-in to Office 365.

Enter the Email Address for the Contact record. Select the Update option if you want to add/update a contact record, otherwise the contact will be retrieved using the email address specified.

In the Map To Extracted Fields grid map your ThinkAutomation variables to the Exchange Contact fields. Against each Exchange contact field select the relevant ThinkAutomation Variable.

If updating then ThinkAutomation will first lookup an existing contact using the Email Address. If an existing contact is found then the contact is updated, otherwise a new contact record is created. If not updating then ThinkAutomation will lookup the contact using the email address and then if found, assign the contact fields to the mapped ThinkAutomation variables.


Create Appointment

Creates an appointment for an Office 365 Account.

Click the Sign In button to sign-in to Office 365.

You must then specify the Appointment Settings.

The Attendees field must use email addresses.

If %field% replacements are used for the Start Date/Time or End Date/Time then you need to ensure that the fields contain valid dates or times.


Send Teams Message

Sends a message to a Microsoft Teams channel on behalf of an Office 365 user.

Click the Sign In button to sign-in to Office 365. This is the user that the message will be sent from.

The Teams and Channels for the user will then be listed. Select the Team and then the Channel within the team to send a message to.

Enter the Message text.

The message text can contain Markdown. If Markdown is used it will be converted to HTML before being sent.


General

String Operation

Perform various operations on strings.

Select the String Operation Type:

  • Right: Get the first Length characters from any text or variable.
  • Left: Get the last Length characters from any text or variable.
  • Sub String: Get Length characters starting at Start Position. If Start Position is not a number then the value of Start Position will be searched in the From value - and the search position will be used (if found).
  • To Upper Case: Returns the From value as Upper Case.
  • To Lower Case: Returns the From value as lower case.
  • Get Length: Returns the character length of the From value.
  • Get Index Of: Returns the start position of Look For value in the From value.
  • Format: Returns a formatted value of the From value. The Format can be any .NET format. For example: 'The delivery date is {0:d}' would return 'The delivery date is 1/1/2021' if From contained a date value.

Note: The 'Sub String' and 'Get Index Of' use 1 based index positions. 'Get Index Of' will return 0 if the Look For value is not found.


Date Operation

Perform various operations on dates.

Select the Date Operation Type:

Operation Type Details
Get Date Extract the date from any text or variable and return it to another variable in a predefined format. Enable the Convert To UTC option to convert the date to UTC.
Get Time Extract just the time from any text or variable and return it to another variable in a predefined format.
Get Date and Time Extract the date and time from any text or variable and return it to another variable in a predefined format.
Get Interval Calculates an Interval between a From and To date and returns the value to a variable. The Interval can be Seconds, Minutes, Hours, Days, Weeks, Months or Years. The interval can be returned as a number or a duration. Select from the Interval Format option. If Short Duration is selected then for interval will be returned as hh:mm:ss format. Long Duration will return as x Hours, x Minutes, x Seconds (depending on the Interval type).
Add To Adds an interval Value to an existing date/time extracted from any text or variable and returns the new date time to a variable in a predefined format.
Subtract From Subtracts an interval Value to an existing date/time extracted from any text or variable and returns the new date time to a variable in a predefined format.

Select the variable to receive the result from the Assign To Variable list.

When extracting and formatting dates you can select the Locale. This will default to the system locale.

You can use this action to change the format of an existing date %field% or %variable%. Use the Get Date and Time operation. Set the From to the variable containing the date. Select the required Format. Then select the same variable from the Assign To Variable list.


File Operation

Create new folders, copy, move, rename, check exists, delete files, get file information.

Use this Action to create new folders or to copy, move, check if files exists, rename & delete files and get file information. You can also use this action to generate an SHA256 hash (checksum) for any file.

Select the Operation Type:

  • Create Folder
  • Copy File
  • Move File
  • Delete File
  • Rename File
  • Check If File Exists
  • Get SHA256 Hash For File
  • Get File Size
  • Get File Date
  • Get File Version
  • Read File To Base64 String
  • Append To Filename
  • Prepend Filename

Depending on the Operation Type enter the Folder, File Name, To Folder & To File Name.

You can assign the result to a variable. Select from the Assign To Variable list. The variable will be set to the new folder and file name depending on the Operation Type. For example, for the Create Folder operation the variable will be assigned to the new folder name. For the Copy operation the variable will be assigned the full path & file name of the new file. If the operation fails the variable will be assigned a blank string and the error will be shown in the log. The Check If File Exists operation will return the file path is the file exists, otherwise blank.

The Get File Version operation returns file information in the following format:

File:             D:\ThinkAutomation\Setup Files\ThinkAutomation.exe
InternalName:     ThinkAutomation
OriginalFilename: ThinkAutomation.exe
FileVersion:      5.0.240.2
FileDescription:  ThinkAutomation Installer
Product:          ThinkAutomation
ProductVersion:   5.0.240.2
Debug:            True
Patched:          False
PreRelease:       False
PrivateBuild:     False
SpecialBuild:     False
Language:         English (United Kingdom)

For the Create Folder operation the complete folder structure will be created if any levels do not exist. If the full folder already exists the Assign to variable will be assigned the existing folder name and no error will be reported. An error will only be reported for the Create Folder operation if the creation of a new folder fails.

Note: If you are access folder/files on your network you will need to change the user name that the ThinkAutomation Service runs under.


Math

Executes mathematical formulas and returns the result to a variable.

Enter the Formula text. The formula can contain %field% replacements.

Select the variable to receive the result from the Assign To list.

Formulas can be as simple as %Price% * %Amount% which would return the value held in %Price% multiplied by the value held in %Amount%.

Click the Validate button to check the formula.

The following mathematical operations are supported:

  • Addition: +
  • Subtraction: -
  • Multiplication: *
  • Division: /
  • Modulo: %
  • Exponentiation: ^
  • Negation: !

Standard Functions:

Function Arguments Description
sum sum(A1, ..., An) Total
sin sin(A1) Sine
cos cos(A1) Cosine
asin asin(A1) Arcsine
acos acos(A1) Arccosine
tan tan(A1) Tangent
cot cot(A1) Cotangent
atan atan(A1) Arctangent
acot acot(A1) Arccotangent
loge loge(A1) Natural Logarithm
log10 log10(A1) Common Logarithm
logn logn(A1, A2) Logarithm
sqrt sqrt(A1) Square Root
if if(A1, A2, A3) If Function
max max(A1, ..., An) Maximum
min min(A1, ..., An) Minimum
avg avg(A1, ..., An) Average
median median(A1, ..., An) Median
round round(A1) Round
random random() Random

Parse CSV Line

Extract values from comma separated text.

Select the CSV value to parse from the Parse CSV Line In list.

In the Column Assignments grid, for each column you want to extract enter the Column Number and select the Assign Value To variable to receive the column value.

Column numbers are 1 based.

This action will correctly handle quoted values.

This action is useful when used with the For..Each loop, looping on Line. This enables you to read a CSV file (or Attachment) and loop on each line. Inside the loop use this action to parse each CSV line.


Encryption

Encrypts or Decrypts text or files using AES encryption and returns the encrypted/decrypted text/filename to a variable.

This action is used both to encrypt and decrypt text or files. Select the Encrypt or Decrypt options.

Encrypting

To encrypt text select the Encrypt option and enter the text or file to encrypt.

When encrypting text you must specify the Encoding method to use. This can be hex, base64 or url. The default is base64.

To encrypt a file select the Encrypt File tab and select the File Path & File Name. Select the Save To Path to save the encrypted file to. Optionally enter a Save To Filename. If no filename is specified then the original file name will be used but with an '.aes' extension. You can use field replacements for the file path & names - this enables you to use it with the For..Each action if you wanted to encrypt attachments.

You must specify a Key Length and Secret Key. The key length can be 256, 192 or 128. These are bit sizes. The secret key length must be 32 characters for 256 bit keys, 24 characters for 192 bit keys or 16 characters for 128 bit keys. You can use %field% replacements for the secret key - however this must convert to the correct key length when the message is processed.

The encrypted text/file path can be returned to a variable. Select from the Assign Encrypted File To list.

Decrypting

To decrypt text select the Decrypt option and enter the text or file to decrypt. The text must be encoded using the same encoding method used to encrypt (base64, hex or url). You must also specify the Encoding method.

To decrypt a file select the Decrypt File tab and select the File Path & File Name. Select the Save To Folder to save the decrypted file to and enter the Save To File Name.

You must specify a Key Length and Secret Key. The key length can be 256, 192 or 128. These are bit sizes. The secret key length must be 32 characters for 256 bit keys, 24 characters for 192 bit keys or 16 characters for 128 bit keys. You can use %field% replacements for the secret key - however this must convert to the correct key length when the message is processed.

The decrypted text/file path can be returned to a variable. Select from the Assign Decrypted File To list.


Compression

Creates Zip compatible compressed archive files for attachments or files/folders. Can also be used to unzip files.

This action is used both to zip and unzip files.

Compressing Files/Attachments

To create a Zip file select Compress.

Select the Zip File Path to save the Zip file to and enter the Zip File Name. You can use %field% replacements here. If a %field% replacement is used for the Zip File Name (for example %msg_subject%) it will first be converted into a valid file name. If no extension exists then .zip will be used.

Enable Create New if you want a new zip file creating. If this option is not selected and an existing Zip file already exists then the new files will be added to it.

Optionally specify a Password if you want to password protect the Zip file.

Enable the Zip Attachments option if you want to compress files attached to the incoming message. You can specify a File Mask if you want to only compress files of a certain type (eg: *.pdf).

Select the local Folder and File Mask for other files you want to add to the Zip file.

The File Mask entry can contain multiple masks, separated by commas (eg: *.pdf, ThisDoc.docx, *.xlsx).

The Exclusions entry can contain filenames and masks that you want to exclude from the zip file. Separate multiple with commas.

Enable the Delete Zip After Message Is Processed option if you want ThinkAutomation to delete the Zip file after the Automation has finished executing actions for the current message. This is useful if you are creating a Zip file to send with an outgoing message and the Zip file is not needed to be kept afterward's.

Select the variable that you want the Zip file path to be assigned to from the Assign To list. You can then use this on further actions - for example on the Attach entry of outgoing messages.

Decompressing

To unzip and existing Zip file select Decompress.

Select the Zip File Path and Zip File Name.

Specify a Password if the Zip file is password protected.

Enter a File Mask for the files you want unzipped - or specify *.* for all files.

The Exclusions entry can contain filenames and masks that you want to exclude from being unzipped. Separate multiple with commas.

Select the Unzip To Folder for the folder where you want the unzipped files placed.

Enable the Delete Unzipped Files After Message Is Processed option if you want ThinkAutomation to delete the unzipped files after the Automation has finished processing actions for the current message.

The unzipped files list can be returned to a variable. Select the variable from the Assign Unzipped Files To list. This will be a comma separated list of files with their full path.


Create Hash

Generate a hash for any text/variable.

Enter the Text To Hash and specify the Hash Algorithm.

The resulting hash can be encoded in various formats (the default is Base64).

Select the variable to assign the hash to from the Assign Hash To list.


Set Logging Level

Set the logging detail level for the current message.

This action can be used to change the level of logging for the currently executing message. This is useful if you have many actions, or actions that loop and you want to reduce the number of log entries. Or if you want to increase the logging level whilst debugging a specific Automation.

The logging level will revert back to the default once the Automation has completed executing actions for the current message.


Create Passcode

Creates a random Passcode and assigns the value to a variable.

This action can be used to generate a random passcode. The passcode can then be sent by email (via the Wait For User Response or Send Email actions) or by SMS (via the Twilio Send SMS Message and Twilio Wait For SMS Reply actions) in order to implement two-factor authentication or to check that a given email address or mobile phone number is valid.

Select the Passcode Type. This can be:

  • Letters (a-z)
  • Letters & Numbers (a-z,0-9)
  • Letters, Numbers & Special Characters (a-z,0-9, ~!@#$%^&*_-+=|(){}[]:;<>?/)
  • Numbers Only (0-9)

Enable Include Upper Case to also include (A-Z) characters if Numbers only is not used.

Enter the Number Of Characters. This can be between 3 & 99.

Select the variable to assign the passcode to from the Assign To list.

The Passcode generated will be random containing no repeating characters. The Passcode is not guaranteed to be universally unique.


Find and Replace

Finds and replaces text in any ThinkAutomation variable and returns the result to the same or different variable.

Enter the text to find in the Replace entry. You can make use of %field% replacements.

Enter the text to replace with in the With entry. Again you can use %field% replacements.

In the In list - select the field to use for the replacement. This can be any of your extracted fields/variables.

By default the text search will start at the beginning of the text. Enter a Start At Character value if you want to start the search from a specific character position.

Enable Replace All Occurrences if you want all occurrences of the Replace text to be replaced.

Enable Case Sensitive Search if the find should be case sensitive.

You must then select variable to assign the replaced text to from the Assign Result To list. By default the same variable that you select in the In selection will be used.


Create JSON

Creates Json Text and allows you to assign variables to each Json element. The resulting Json Text can be assigned to a variable for use on subsequent actions.

You first need to enter or paste valid Json text in the Enter Or Paste Json Here To Parse entry. You need to obtain the Json schema that you want to update and copy/paste into this entry. Then click the Parse > button.

The Json will be parsed and all elements will be listed in a tree structure.

Select each line in the tree in turn. The Selected Path, Element and Type will be shown as you select each entry.

In the Set To Value entry enter or specify the data that you want to be assigned to the selected entry. Fields/Variables can be specified here. Then click the Update button. The updated Json will be shown in the Preview Result view. Repeat for each element that you want to update.

In the Assign Json To list select the variable you want to resulting Json assigned to.

When the message is processed each element in the Json will be assigned the value you specify and the resulting Json assigned to the specified variable.

This Json can then be used on other actions by referencing this variable.


Read/Write Text File

Writes data to any text file and optionally reads the contents of the file into a variable.

The File Path must contain a path & filename of the text file to write to/read from.

On the Write To File tab you can define the text that you want to write to the file. The file will be created if it does not already exist.

Select the file Format. This can be ASCII, Unicode or UTF-8 (default)/

Select the Line Terminator that will be appended to the text written to the file.

Enter the Content that you want to write to the file.

If the Append To File option is enabled then the new text will be added to the end of the existing text file.

If the Make Backup option is enabled the existing file will be copied to the same file name with a .BAK file first.

On the Read From File tab you can select a ThinkAutomation variable that you want to assign the text file contents to. The file will be read again after any text is written to it.


Tokenize

Gets a list of comma separated tokens (words) for any text.

Enter the Text/HTML to tokenize. If the text is HTML then the HTML will be converted to plain text first.

Options:

  • Remove Common Words : Remove all common words (and, the, a etc.) from the tokens list.
  • Remove Email Addresses & Urls: Removes any email addresses and URLs from the tokens list.
  • Normalize: Normalizes common contractions (eg: 'what's' to 'what is') and common abbreviations (eg: hi to hello, nov to november, ur to your, bday to birthday, 2day to today, plz to please, thx to thanks etc.)
  • Unique: Duplicates are removed from the tokens list.
  • Include Count: The frequency is appended to each token.
  • Sort By: None, frequency, word.
  • Top: Return the top x words if sorted.

The tokens can be assigned to a variable. Tokens are returned as a comma separated string.


Text To Speech

Uses the Windows speech synthesizer to convert text to a WAV file containing a spoken version of the text.

Enter the Text To Speak. This can contain %field% replacements.

Select the Voice. This list will be populated by Speech language packs installed on your system. You can install more language packs in your Windows settings. After selecting a Voice, click the Test button to hear how the text will sound.

Select or enter the Save To path where the created wav file should be saved.

Enter the WAV File Name. This can contain %field% replacements. The .wav extension will be added if necessary.

If the Ensure Unique File Name option is selected then ThinkAutomation will append a unique timestamp to the filename to ensure it is unique within the Save To path.

If Delete File After Message Is Processed is enabled then ThinkAutomation will remove the file when the Automation completes for the current message. This is useful if you wish to use the wav file in the Automation (for example, to send the file as an attachment with the Send Email action), but do not need to keep a local copy afterwards.

You can assign the saved path & filename to a variable by selecting the variable from the Assign Saved File Path To list. You can then use this variable in the Attachments entry on Send Email actions or in any other way.


Network

DNS Lookup

Performs a DNS Lookup and assigns the returned data to a variable.

In the Lookup entry enter an IP Address or Hostname. If an email address is used ThinkAutomation will automatically use the domain part (the section after the @ sign).

Select the DNS Record Type to lookup. Here you can select any valid DNS type.

The DNS Server entry allows you to specify a specific DNS server IP address to use for the lookup. Leave blank to use the system default.

You must then select the variable to assign the result to by selecting from the Assign Result To list. If the lookup fails - the variable will be set to Error: {description}.

Results will be returned as FieldName: Value format. The fields returned depend on the DNS Record Type.

For example, an MX lookup of test@google.com would return:

PREFERENCE: 50
EXCHANGE: alt4.aspmx.l.google.com

If the lookup fails an error is returned:

Error: 3 Name error

This Action is useful for validating email addresses. If an error is not returned then the email address has a valid MX record.


Ping

Pings any network/internet host and assigns the response time to a variable.

Enter the Ping host. This can be an IP address, Host Name, Domain name, URL or Email Address. The host name will first be resolved to its IP address before the Ping starts.

Select the variable that the Response Time will be assigned to. You can also assign the Response Host (IP Address).

If the Ping fails or a timeout occurs the Response Time will be blank and an error will show in the log.


Execute Secure Shell Command

Executes a command on a remote SSH Server. Most UNIX/Linux/Mac machines include an SSH Server. The output of the command can be returned to a variable.

Enter the Host Name IP Address or host name of the server you want to execute the command on.

Enter the Port. This defaults to 22. If no port is specified then the default will be used.

Enter the remote User Name & Password. This user must be allowed to execute remote commands on the host system.

Enter the Command Text to execute.

All entries can use %field% replacements.

The result of the command can be returned to a variable. Specify the variable from the Assign Response To list.

Any errors generated by the command can also be returned to a variable. Select from the Assign Errors To list.

Showing A Notification On A Mac

The following command will display a notification on a Mac computer:

osascript -e 'display notification "Processed Message %msg_subject%" with title "ThinkAutomation" subtitle "%AccountName%" sound name "Default" ' 

Speaking Text On A Mac

The following command will speak the given text on a Mac computer:

say "you have received a new message from Think Automation!"

Note: To enable the Remote SSH server on a Mac, use System Preferences - Sharing. Enable the 'Remote Login' option.


CRM

Get CRM Entity

Performs a query against a CRM system and returns values to variables.

Click Connect to connect to a CRM system. Currently ThinkAutomation can connect to

  • Salesforce
  • Microsoft Dynamics
  • Sugar CRM
  • Zoho CRM

Once connected select the Entity Type to query.

You then create Query Conditions to lookup an entity of the Entity Type specified. The query can contain use %field% replacements.

In the Assign CRM Values To Variables list, select each CRM value that you want to assign to a ThinkAutomation Variable.


Update/Create CRM Entity

Creates or updates entities in a CRM system,

Click Connect to connect to a CRM system. Currently ThinkAutomation can connect to

  • Salesforce
  • Microsoft Dynamics
  • Sugar CRM
  • Zoho CRM

Once connected select the Entity Type to update.

Select Create New Entity or Update Existing Entity from the Action To Take selector.

When updating existing entities, you must specify the Entity ID To Update - this can be a ThinkAutomation variable that has received an Id from a previous Get CRM Entity action.

In the Update Entity Fields grid you map Entity items to ThinkAutomation variables.

You can assign the new or updated Entity ID to a variable.


Web

HTTP Get

Reads any http resource using HTTP GET or a local file path and assigns the returned HTML or response text to a variable.

Use this Action to read any http resource (web page) or a local html file. Specify the URL Or File Path To Get (including any query string).

If the web resource requires authentication then specify the Authentication method and optionally a User Name/Password or an OAuth Auth Token retrieved from a previous OAuth SignIn action. Does not apply if reading from a local file path.

Optionally specify any Custom Headers to add to the request.

The Convert Returned Content To option enables you to convert the http response content. Options are:

  • Nothing - leave the returned content as is.
  • Convert HTML To Plain Text - removes all HTML tags.
  • Convert HTML To Well Formed XML - converts the HTML to well-formed XML allowing easier parsing.
  • Convert CSS To InLine Styles - moves all CSS styles sheets to inline style attributes. This enables the HTML to be sent via email as most email clients only support inline styles.

The returned content must then be assigned to a variable. Select from the Assign Content To list.

The HTTP response status code & response headers can also optionally be assigned to variables.

You can then make use of the HTML (or converted Plain Text or XML) in subsequent Actions.


HTTP Post

Post data to any web resource using HTTP POST.

Specify the Post To URL of the http resource to post to.

If the web resource requires authentication then specify the Authentication method and optionally a User Name/Password or an OAuth Auth Token retrieved from a previous OAuth SignIn action.

Select the Post Type you wish to perform. This can be:

  • Regular Post - for posting form field values.
  • Json Post - for posting Json data.
  • Json Put - for posting Json data using a HTTP Put instead of Post.
  • Custom - for performing custom HTTP Posts using data you specify

For regular Posts you can specify any number of Names and Values. The Values can be fixed or %fieldname% replacements or combinations of both.

The format of the body for this action is application/x-www-form-urlencoded. The action resembles the traditional post action from an HTML

element.

For JSON Posts or Puts you must specify the JSON Text.

For Custom Posts you must specify the Custom data. This would be the body of the postdata - not the headers.

For all post types you can specify any Custom Headers. Multiple header names & value pairs can be specified. Any existing HTTP headers will be replaced if you use a standard header.

You can specify the Connection Timeout (in seconds). This is the number of seconds to wait for the initial connection. The Response Timeout is the number of seconds to wait for a response after the post has been made.

The HTTP response status code, response headers & response body can also optionally be assigned to variables.


Download File

Download a file via HTTP from any URL.

Enter the URL To Download. This can be any HTTP or HTTPS URL that points to a downloadable file.

If the web resource requires authentication then specify the Authentication method and optionally a User Name/Password or an OAuth Auth Token retrieved from a previous OAuth SignIn action.

Enter or select the Save To Folder. This is the folder on your file system that you want the downloaded file to be saved in.

Optionally enter a Use Filename. If no filename is specified then the filename will be extracted from the URL.

Enable the Make Filename Unique option to append a unique number to the filename if a file already exists in the selected folder with the same name.

Once the file is downloaded the resulting full path/filename will be assigned to the variable selected from the Assign Returned File Path To list.

You can then use this variable to perform other actions such as adding the file as an attachment to outgoing emails.


OAuth SignIn

Sign in to an OAuth endpoint to obtain an authorization token.

This action can be used to obtain an authorization token from an OAuth enabled web API. The token can then be used on subsequent HTTP GET or POST actions.

Enter the Name. This is simply an identifier to show in your Automation actions list. Any text can be used.

You must then supply the Authorization Endpoint, Token Endpoint, Client ID, Client Secret and Scope. These settings depend on the API you want to use. Consult the API documentation to obtain the correct values.

Click the Sign In button to begin the sign in process. A browser session will be started to complete the sign in.

Select a variable to receive the authorization token from the Assign To list.

On any subsequent HTTP GET, HTTP POST or Read JSON Document actions you can then set the Authentication method to OAuth and then Auth Token to the variable value.

ThinkAutomation will automatically refresh the authorization token when it expires.

Note: As with all other Action settings, the Client ID and Client Secret are stored securely in the ThinkAutomation metadata database.


Cloud Storage

Download or Upload files to various cloud storage providers.

Select the Provider.:

  • Amazon S3
  • Google Drive
  • Google Cloud Storage
  • Microsoft OneDrive
  • IBM Cloud Object Storage

Depending on the provider, click the Sign In button or enter your Access Key and Secret Key (Amazon S3 will also need the Region) and click the Connect button to connect.

Select Upload or Download from the Operation selector.

Downloading

In the Remote Files navigator you can navigate folders and files. Double-click a file to add it to the Download Files entry. Multiple files can be downloaded within the same action. Separate each file with a comma.

You can also specify the Downloaded Files directly by entering the paths (or use %field% replacements). Each file must specify the full path (beginning with /).

Specify the Save To folder where you want the downloaded files saved to.

The Assign To variable will receive the local path/filename where the file(s) have been downloaded to. Multiple files will be separated by commas.

Uploading

In the Remote Files navigator you can navigate folders and files. Select the folder where you want to upload files to.

In the Upload Files entry enter or select the local files to upload (use %field% replacements if required). Multiple files should be separated by commas.

You also have the option of uploading Attachments. Select the Include Incoming Attachments option and specify the Mask.

The Assign To variable be receive the remote path names for the uploaded files(s). Multiple files will be separated by commas.


Read JSON Document

Parses a Json formatted document from any URL or text/variable and assigns element values to variables.

Parsing Json From Web Responses

Select the Get Json From URL tab to read a Json document from a URL.

Enter the Json Document URL to read. This can be a secure HTTPS URL if required.

If the web resource requires authentication then specify the Authentication method and optionally a User Name/Password or an OAuth Auth Token retrieved from a previous OAuth SignIn action.

The HTTP status code can be assigned to a variable from the Assign Status Code To list.

The full Json text returned from the URL can be assigned to a variable. Select from the Assign Returned JSON To list.

You can also map specific path values to ThinkAutomation variables by entering the Full Path and selecting the variable from the Assign Value To column.

The Full Path entries used when extracting specific attributes can contain %field% replacements.

Click the Test button to parse the response from current URL or text. This results will be shown in the tree. Click each node to expand the child nodes. The Selected Path & Selected Value entries will show the value for the currently selected Path. You can copy/paste the Selected Path into the Assign grid.

Parsing Json Text

You can also specify any Json text directly instead of reading from a URL. This can be a variable from a previous action. Select the Json Text tab.

Enter or paste the Json text or specify a %fieldname%


Wait For Webhook

Pauses execution of the Automation until a webhook callback is made from a 3rd party web service.

This action can be used to integrate with external web API's. Each processed message has a unique callback URL. This is available via the %Msg_WebCallbackUrl% built-in variable.

If you pass this variable via any HTTP Get or HTTP Post actions to a 3rd party API that offers a webhook response, then you can use this action to pause execution of the current message until the webhook response is received. You can then assign any of the parameters passed back with the webhook to variables in your Automation.

Enter the Name. The name shows in the actions list - but is not used otherwise.

Specify the Maximum Wait in minutes. If a response is not received before this time the Automation will continue.

You can send a response to the webhook call. Specify the Response Type and Response Data. This is optional and will depend on the 3rd party API.

The Request Parameter Assignments grid can be used to map parameters sent by the webhook to fields & variables in your Automation.

To use this action you would first use the HTTP Get or HTTP Post actions to make a request to the 3rd party web API. As part of the request you would include the %Msg_WebCallbackUrl% variable. This will tell the API the URL to use to make the webhook callback. Consult the API documentation for the parameter name to use.

After the HTTP Get/Post action you would add a Wait For Webhook action to pause execution until the webhook callback is received.


Call A Soap Web Service

Executes a SOAP or .NET Web Service and returns the results to ThinkAutomation variables.

Method URI (Namespace)

This is the namespace of the web service. You can find the namespace by viewing the Web Service Definition (WSDL). For .NET Web Services view the .asmx page and click the Service Description link. The namespace will be shown in the targetNamespace element. .NET Web Services have a default namespace of http://tempuri.org. You should change this before making your web services public.

Method Name

This is the name of the method you want to call. You can view a list of available methods provided by the web service by viewing the asmx file.

Action URI

This defaults to the Method URI/Method name.

URL (asmx)

Enter the full public URL to the asmx page. You can use a secure address (https://) if required.

If your web services require a login before being accessed enter the User Name & Password and the Authentication type.

You must specify a value for all of the Parameters that the web service method expects. Enter the parameter Name and Value. For the value you can use %field% replacements.

Assign Returned Value To

You can assign the returned value to a ThinkAutomation variable. Select the variable from the drop down list. If the web service returns a single value then this will be assigned to the variable. If the web service returns a complex data type - such as a DataSet - then then entire XML response will be assigned.

Output Parameters

If the web service returns output parameters then you can assign individual parameter values to ThinkAutomation fields or variables. If a parameter name specified is not returned as an output parameter then ThinkAutomation will scan the returned XML and extract the specified parameter name as a tag and assign to the tag value to the ThinkAutomation variable.


FTP Upload

Uploads files or attachments to an FTP or SFTP server.

First select FTP or SFTP.

Enter your FTP Host, User Name & Password.

Click the Connect button to connect to your FTP Server. You may need to uncheck the Passive Mode option if your FTP server doesn't support passive mode.

You can select the Secure Mode of 'Auth TLS', 'SSL' & 'None' if your FTP server requires a secure connection.

You can then select a Remote Path to upload your files to.

The Local Files can be used to select a local files to upload.

To upload attachments enable the Include Incoming Attachments option and specify the Mask.

Enable the Show Progress In Log option to add log entries to show the progress of the upload.


FTP Download

Download files from an FTP or SFTP server.

First select FTP or SFTP.

Enter your FTP Host, User Name & Password.

Click the Connect button to connect to your FTP Server. You may need to uncheck the Passive Mode option if your FTP server doesn't support passive mode.

You can select the Secure Mode of 'Auth TLS', 'SSL' & 'None' if your FTP server requires a secure connection.

You can then select a Remote Path to download files from.

Select or enter the File Name Or Mask to download.

Select the Save To folder to save the downloaded files to.


Get Browser Info

Extracts browser name, version & operating system information from a User Agent string.

Specify a user agent or %field% in the Get Browser Info For User Agent entry.

You can the select variables to receive:

  • Browser Name
  • Version
  • Operating System
  • Is Mobile (true or false)
  • Is Spider (true or false)

This Action is useful when receiving messages via the API - from web forms, or web requests. It allows you to obtain browser information for the user making the request.

For API received messages the originating user-agent is added to the Message Headers. You can extract this using the Extract Field action: Extract From %msg_headers% and look for 'User-Agent:'.


Location

Translate

Translates text from one language to another and returns the result to a variable.

Enter or select the From Language. If blank the language will be automatically detected (if possible).

Enter or select the To Language. This is required.

Enter the Text To Translate. This is limited to 10000 characters.

Enable Is HTML if the text will contain HTML tags. Passing the built-in field %msg_html% would pass the entire HTML of the incoming message.

Enable Preserve Layout In Plaintext if you are passing none HTML (for example, the %msg_body% field contains the plain-text version of the incoming message). If this option is enabled then any carriage return/line feed characters and any white space will be preserved. Otherwise all control characters and white space is removed from the text before translation.

Select the variable you want the translated text assigned to from the Assign Translated Text To dropdown.

Note: Translation requires a Translation account. This is configured in the ThinkAutomation Server Settings - Translation Tab


Detect Language

Detects the language for any text and returns the language code to a variable.

Enter the Text To Detect. This field is limited to 10000 characters.

Select the variable you want the language code assigned to from the Assign Language Code To Variable list.

Note: Translation requires a Translation account. This is configured in the ThinkAutomation Server Settings - Translation Tab


Speak Text

Returns a URL of a WAV or MP3 file containing spoken text in the desired language. This action is designed to translate and then speak text in a different language. If you simply want to convert text to speech, use the Text To Speech action - which performs the conversion locally and does not require a Translation account.

Enter the Text To Speak. This is limited to 2000 characters.

Enter or select the Speak In Language. This can be the same as the input language if you just want to speak the text as is.

Select the Sound File Format (WAV or MP3).

Select the variable you want the URL to be assigned to from the Assign Sound File URL To Variable list.

You can use the Download Action if you want to download the file to your system.

Note: Translation requires a Translation account. This is configured in the ThinkAutomation Server Settings - Translation Tab


GeoIP Lookup

Performs a Geo IP lookup for any IP address, domain name, email address or URL. The Geo IP lookup returns the City, Region & Country for any IP address. Also returns the Organization name.

In the Lookup field enter any field, variable or constant. If the field contains an IP address then this will be used. If no IP address is found then the first email address will be used. If no email address then the first URL. If an email address/domain name is used then ThinkAutomation will first perform a reverse DNS lookup to find the IP address and then use that to do the Geo IP lookup.

You can then assign the Country, Region, City & Organization to variables.

This action is useful for validating customer details - for instance you can check that the GeoIP Country of the customers email address matches the country they specify on an order form.

This Action is also useful when receiving messages via the API - from web forms, or web requests. It allows you to obtain Geo IP information for the user making the request.

For API received messages the remote host (IP Address) is added to the Message Headers. You can extract this using the Extract Field action: Extract From %msg_headers% and look for 'RemoteHost:'.

Note: This Action uses ThinkAutomation's own GeoIP database installed locally. This is updated on a regular basis.


Twilio

Twilio Make A Telephone Call

This action enables you to call any telephone number. Once answered, ThinkAutomation can speak custom text to the receiver and/or connect the call to another number.

Makes an outbound voice call using the Twilio API. Twilio is a cloud-based telephony provider.

See: https://www.twilio.com for more information.

Before using this action you need to create a Twilio Account. Once you have created an account, login and select Dashboard. Select Show API Credentials - this will display the Account SID and Account Token. Enter these into ThinkAutomation Server Settings - Twilio Tab.

You must specify the From Twilio Number. This is the phone number that will be displayed on the receivers phone. In your Twilio Account you can create a new phone number, or you can verify one of your existing phone numbers with Twilio. Once verified it can be used as the From Number.

Enter the phone number to call in the Call Number entry. This must be the full international number. You can use the Normalize Phone Number action to correctly format a phone number for a given country.

Select the Ring For (Seconds). This defaults to 30 seconds. If the call is not answered within this time the call will be closed.

On Call Answer

Once the receiver has answered the call you can choose to:

Say Text

This will read the specified text to the receiver. You can specify up to 4096 characters. The text can include %field% replacements. The Say In Language can be used to change the language for the text being read (English US, English UK, French, German, Spanish or Italian). The Say In Voice option allows you to select a female or male voice.

Play Audio File URL

You can also have an audio file played to the receiver. Specify the URL to the audio file to be played.

Hang Up If Machine Answers

Enable this option if the call should be stopped if an answering machine or voice mail system picks up the call.

Record Call

Enable this option if you want the call to be recorded. The URL of the recording can be returned to a ThinkAutomation field or variable on completion of the call.

Connect Call To

Enable this option if you want the call to be connected to another number once it has been answered and the Say Text/Play Audio has completed (if any). Specify the Connect To Number. This other number will then be called and the two calls connected. If you do not use the call connect then the call will end once the Say Text/Play Audio has completed.

On Call Completion

Once the call has ended the Call Duration, Call Status and Recording URL can be returned to ThinkAutomation variables.

The Call Status will be one of: completed, busy, failed or no-answer

Automation Processing

When ThinkAutomation starts the call the message processing for the current message will pause until the call completes (or fails). Other messages will be processed whilst the call is active. Once the call is complete the remaining actions in the Automation will execute.

Phone Number Formats

All phone numbers must include the country code preceded by + so 800 680 7712 would be +18006807712. For UK numbers the first 0 of the number is omitted. For example 01782 822577 would be +441782822577. ThinkAutomation will remove any spaces and add the + sign itself if required. Use the Normalize Phone Number Action to correctly format a phone number.


Twilio Send SMS Message

Sends an SMS text message to any phone using the Twilio API. Twilio is a cloud-based telephony provider.

See: https://www.twilio.com for more information.

Before using this action you need to create a Twilio Account. Once you have created an account, login and select Dashboard. Select Show API Credentials - this will display the Account SID and Account Token. Enter these into ThinkAutomation Server Settings - Twilio tab.

You must specify the From Twilio Number. This is the phone number that will be displayed on the receivers phone. In your Twilio Account you can create a new phone number, or you can verify one of your existing phone numbers with Twilio. Once verified it can be used as the from number.

Enter the To number and Message Body.

Note: The To number must include the country code.

You can also specify a Media URL if you want to send a Multi-Media Message (MMS). You can specify a URL to a Gif, Png or Jpeg image. This will be rendered on the receivers phone. The image must be less than 5mb.

Note: MMS messages are only supported for USA and Canada numbers. Regular text messages can be sent to any number in the world.

Waiting For Delivery Status

Once the message is sent the sent status can be assigned to a ThinkAutomation variable. This status will be set to 'delivered' if the message has been successfully sent. Otherwise it will be set to 'undelivered', or 'failed: {error message}' for failed messages. If you assign the status to a variable then ThinkAutomation will wait until the SMS has been sent (or failed) before assigning the status and proceeding with the remaining actions for the Automation. Automations will still execute on other messages during this waiting phase (normally only a few seconds). ThinkAutomation will wait for up to 3 minutes for the status.

Note: Waiting for delivery status requires the Web API to be enabled.

Note: If you want to use the Wait For SMS Reply action to wait for a reply to this message you should always check the Assign Status To variable and only wait for the response if the sent status is 'delivered'. This ensures that the message has been sent before you start waiting for a response.

Automation Processing

When ThinkAutomation sends the text message the message processing for the current ThinkAutomation message will pause until the SMS text is sent (or fails). Other messages will be processed during this time. Once the SMS message has been sent the remaining actions in the Automation will execute.

Phone Number Formats

All phone numbers must include the country code preceded by + so 800 680 7712 would be +18006807712. For UK numbers the first 0 of the number is omitted. For example 01782 822577 would be +441782822577. ThinkAutomation will remove any spaces and add the + sign itself if required. Use the Normalize Phone Number Action to correctly format a phone number.


Twilio Wait For SMS Reply

This Action will wait to receive an SMS text message from a specific number. Normally this action would be used to wait for a response to a previously sent SMS message.

Set the From Number to the number you want to wait to receive a message from. Leave this blank to use the number from the last Twilio SMS Message action.

Set the Wait For to the number of seconds you want to wait for. If a message is not received after this time then the message text will be blank and Automation execution will continue. The maximum value for this is 9999 seconds (166 Minutes).

Set the Assign Message Text to a variable that you want to reply text to be set to.

When this action executes, ThinkAutomation will pause execution of the current Automation Message execution until the reply is received (or the timeout seconds has elapsed). Other ThinkAutomation messages will be processed during this waiting period. When the reply is received the remaining Automation actions for the current message will be executed.

You can have multiple send/wait for reply actions within a single Automation, allowing you to construct automated SMS text conversations and performing different actions based on the reply results.


Normalize Phone Number

Formats a phone number for international or domestic use.

Takes any phone number and adds or removes the international dialing code for the specified country. It also removes any spaces, dashes or parenthesis.

Specify the Phone Number. This can be a field or variable. The first phone number found in the text specified will be used.

Specify the Country Code/Name. This can also be a variable. You can use the full country name eg: United Kingdom, or the country code, eg: GB

Enable the Make International option to return the full international phone number. Otherwise the domestic number will be returned.

Select the variable to assign the result to from the Assign To list.

This action is useful when using the Twilio actions, or for normalizing phone numbers before being recorded in a database.

International phone numbers will be returned in the format:

+{countrycode}{number}

Eg:

(407) 488 2019 for United States becomes: +14074882019

01782-822577 for United Kingdom becomes: +441782822577

Eg for domestic numbers:

+44 1782 822577 for United Kingdom becomes: 01782822577

If the country specified does not exist then the phone number will be returned blank.


Sentiment

Get Sentiment Score

Performs Sentiment Analysis on any text and returns the Sentiment Score to a variable. The ThinkAutomation Sentiment Analyzer is able to detect if text is either positive or negative in sentiment or any other yes/no, positive negative construct. You could then use the result to perform specific actions, for example, to send alert emails or SMS texts if an incoming email contains a high negative sentiment score.

Before Sentiment Analysis can work the ThinkAutomation Sentiment Analyzer must be 'trained'. The Sentiment Analyzer will accuracy will improve the more it is trained. See: Train Sentiment Analyzer

In the Get Sentiment Score For entry enter the text you want to analyze. Any text can be entered including %field% replacements. To analyze the incoming message body set the value to %Msg_Body%.

The Sentiment Class Name can be used to analyze against a specific set of data.

In the Assign Sentiment Score To drop down, select the field or variable to assign the sentiment analysis score to.

The result will be returned as a number between 1 and 100. 100 being maximum positive sentiment and 1 being maximum negative sentiment. A result of 50 indicates neutral sentiment.

You can optionally also get a list of the most relevant tokens used in the scoring process. Select a field or variable to assign the list to from the Assign Relevant Tokens List To entry.

The list is returned as a text field. Each token on its own line as:

token=score,count
token=score,count
...

Where score between 1 and 100. Count shows the number of occurrences of the token in the text analyzed. This list shows the tokens that have had the most effect (positive or negative) on the sentiment score.

Sentiment Analysis can be used to classify a message for any construct - not just Positive or Negative sentiment. For example, it could be used to classify a message as a sales inquiry or not. The construct is defined only by the training data. So if you trained the Sentiment Analyzer with 1000 sales inquiries and 1000 non-sales inquiry messages then it could be used to classify incoming messages as sales inquiries and then take appropriate action.

Note: This action uses ThinkAutomation's built-in sentiment analyzer - which requires training before it will return accurate scores. The online Custom Action library also includes an Azure Sentiment action. This uses the pre-trained Sentiment Analyzer provided by Microsoft Cognitive Services.


Train Sentiment Analyzer

Trains the ThinkAutomation Sentiment Analyzer with positive or negative sentiment text. The ThinkAutomation Sentiment Analyzer must be trained with Positive and Negative sentiment messages before sentiment analysis can be used.

In the Train Sentiment Analyzer With entry enter the text you want to use. This can contain %field% replacements.

Select Positive, Negative or Add Ignore Words from the Train As drop down.

The Sentiment Class Name can optionally be used to categorize the Sentiment Analysis database. For example, you could have 'Emails' and 'Twitter' class names. Each would produce their own specific results.

The number of tokens added to the Sentiment Analysis database can be returned to a variable. Select the variable to use from the Assign Result To list.

Training Process

The Sentiment Analysis accuracy will improve with more training data. It is best, if possible, to train roughly equal numbers of Positive and Negative messages. You should where possible use actual positive and negative messages rather than just individual positive/negative keywords.

Ignore Words

In addition to adding positive and negative sentiment messages you can use this action to add 'Ignore Words'. Select Add Ignore Words from the Train As option. The text used will be split into words and each added separately to the Sentiment Database. When Sentiment Analysis is performed any words in the Ignore list wont be used to in the sentiment scoring process. You can add email address, links and any other words/text. The number of unique ignore words added will be returned to the Assign To Variable.

Parker Software Professional Services team can assist in creating a training plan. Contact our Professional Services team for more information.


Azure

Azure File

Download or Upload files to Azure Storage shares.

Specify your Azure Storage Account Name and Access Key and click the Connect button to connect.

Select the Share that you want to upload to or download from.

Select Upload or Download from the Operation selector.

Downloading

In the Remote Files navigator you can navigate folders and files in the Azure Share. Double-click a file to add it to the Download Files entry. Multiple files can be downloaded within the same action. Separate each file with a comma.

You can also specify the Downloaded Files directly by entering the paths (or use %field% replacements). Each file must specify the full path (beginning with /).

Specify the Save To folder where you want the downloaded files saved to.

The Assign To variable will receive the local path/filename where the file(s) have been downloaded to. Multiple files will be separated by commas.

Uploading

In the Remote Files navigator you can navigate folders and files in the Azure Share. Select the folder where you want to upload files to.

In the Upload Files entry enter or select the local files to upload (use %field% replacements if required). Multiple files should be separated by commas.

You also have the option of uploading Attachments. Select the Include Incoming Attachments option and specify the Mask.

The Assign To variable be receive the Azure path names for the uploaded files(s). Multiple files will be separated by commas.


Get URLs to files in an Azure Storage share.

This action can be used to generate a read-only URL to a file in an Azure Share. You can specify the number of minutes that the URL will be active for.

Specify your Azure Storage Account Name and Access Key and click the Connect button to connect.

Select the Share that you want to use.

In the Remote Files navigator you can navigate folders and files in the Azure Share. Double-click a file to add it to the Get Link(s) For Files entry. Multiple URLs can be generated within the same action.

You can also specify the Get Link(s) For Files directly by entering the paths (or use %field% replacements). Each file must specify the full path (beginning with /). If using this action after the Azure File - Upload action you can use the %field% previously returned from the Upload - this will then get links to the files just uploaded.

In the Links Valid For Minutes entry, specify the number of minutes that the link is usable for. This defaults to 1440 (24 hours).

In the Links Valid Only For IP Addresses entry you can optionally specify an IP address or range. The link will then only work when requested from the IP. IP ranges should be in the format (for example): 168.1.5.60-168.1.5.70

The Assign Links To variable will receive the URL. If multiple files are used then each URL will be separated with a comma.

You can then send this URL with an outgoing email to give the recipient time-limited access to the file(s).


Azure Cosmos DB

Update or query Json documents from an Azure Cosmos DB.

Specify your Azure Cosmos DB Endpoint and Access Key and click the Connect button to connect.

Enter or select the Database and Container within the selected database.

Enter the Partition Key that you have defined for the Database\Container.

If the database or container do not exist they will be created if the Create option is enabled.

Operation

Insert or Update Document

This option will add a new document or update an existing one.

Set the Document Json to the Json text for the document. If the Json contains an id field then an existing document will be updated if one exists with the same id. If no id field is specified in the Json document the Cosmos will insert a new record and add the id field to the Json stored in the database.

You can build Json using the Create Json action and then set the Document Json to the %field% name containing the Json, or you can specify it directly.

To store the incoming message you can set the Document Json to %Msg_Json%. The %Msg_Json% built in field returns a Json document representing the incoming message (including attachments).

Query Document

This option will query the selected database/container. The returned query results (in Json format) can be assigned to a variable from the Assign To list.

Enter the Query SQL Select Statement, for example:

SELECT *    
FROM Families f    
WHERE f.id = "AndersenFamily"

The SQL statement must be compatible with the Cosmos SQL specifications.

You can use %field% replacements:

SELECT *    
FROM Families f    
WHERE f.id = "%FamilyId%"

You can also use parameters:

SELECT *    
FROM Families f    
WHERE f.id = @id

If parameters are used you must the assign each parameter name a type and value in the Parameters grid.

When the Automation executes the Json returned from the query will be assigned to the variable specified. If multiple documents are returned the Json will contain an array of documents. If a single document is returned then the Json will be set to the document json.

You can assign the count of documents returned to a variable from the Assign Count To list.


Azure Blob

Read from or write to Azure Blob Storage.

Specify your Azure Storage Account Name and Access Key and click the Connect button to connect.

Select the blob Container to read from or write to.

Select the Operation - Get Blob to read a blob or Put Blob to upload new blobs.

Get

Enter the Blob Name to read. This can contain %field% replacements.

You can specify a Save To where the Blob will be saved. The saved blob path & name can then be assigned to a variable from the Assign To list.

If no Save To path is specified then the blob data itself will be assigned to the Assign To variable without being saved to a file.

Put

You can Put either Files & Attachments or Blob Data:

Files & Attachments

Enter a Blob Name - this is optional. If no name is specified then the file names will be used.

In the Upload Files entry, specify local files to upload. You can specify multiple files separated by commas. Leave blank to only upload attachments

Enable the Include Incoming Attachments to upload attachments and specify the Matching Mask (eg: *.pdf).

Enable the Ensure Unique option to append a timestamp to the uploaded file names to ensure they are unique. Otherwise any existing blob with the same name will be overwritten.

Enable the Append Filenames To Blob Name option to append uploaded file names to the Blob Name specified. This is only applicable if a Blob Name has been specified. For example: If the Blob Name is set to 'orders' and the attachment '1234.pdf' is uploaded, then the Blob name in your storage account will be set to 'orders1234.pdf'.

Each uploaded Blob is given a unique URL. You can assign the URL to a variable from the Assign Url(s) To list. If multiple files are uploaded then the multiple URL's will be returned, separated by commas.

Blob Data

This option allows you to upload raw blob data. The Blob Name & Blob Data must be specified. Any existing Blob with the same name will be overwritten.


Azure Table

Read from or write to Azure Table Storage.

Specify your Azure Storage Account Name and Access Key and click the Connect button to connect.

Select the Table Name to read from or write to.

Select the Operation - Get Entity to read a table row or Put Entity to write a new table row.

Get

Specify the Partition Key and Row Key for the table entity you want to read. These can contain %field% replacements.

Once the table entity has been read you can then map entity property names to ThinkAutomation variables. Select the ThinkAutomation variable name from the Assign To list - and then enter or select the table entity property name in the Assign From column.

Put

Specify the Partition Key and Row Key for the new table entity you want to write. These can contain %field% replacements.

You must then map entity property names to ThinkAutomation variables. Select the ThinkAutomation variable name from the Assign From list. Select the property Type, and then enter or select the table entity property name in the Assign To column.

You can also assign the URL to the newly created Table entity by selecting from the Assign Url To list.


Azure Queue

Get or Add to an Azure Queue.

Specify your Azure Storage Account Name and Access Key and click the Connect button to connect.

Select the Queue Name to use.

Select the Operation - Get Message to take the next message from the queue or Put Message to add to the queue.

Get Message

This will take the next message from the queue. Select the variable to receive the queue message from the Assign To list.

Put Message

This will add a message to the queue. Specify the Message Data.


System

Execute PowerShell

Executes a Windows PowerShell command or script file. Returns the response to a ThinkAutomation variable.

Enter the PowerShell Command or specify PowerShell Script File.

In the PowerShell Command you can either specify the command and it's parameters (use %field% replacements if required) or you can specify the command only and then provide parameter names & values in the Parameters Grid.

Select the variable that you want the Response to be assigned to. The entire PowerShell command response will be assigned to the field/variable.

Example: To read a directory. Set the PowerShell Command to Get-ChildItem and add a parameter name Path with value C:\


Run A Program

Execute any Windows executable file with optional parameters. The Output of the program can be assigned to a variable.

Enter the Program To Run and any Parameters. You can use %fieldname% replacements in both entries.

You can optionally specify user Credentials that the program should execute as.

Select the Redirect Output if you want to receive the output of the program. The output can then be assigned to a variable selected from the Assign Output To list.

Select the Wait For Exit option if you want ThinkAutomation to wait for the program to complete before containing with the remaining actions on the Automation. You can also specify a Wait Max in milliseconds.

Custom Action Designer

The ThinkAutomation Professional Edition includes a Custom Action Designer. This allows you to create your own Custom Action types. The Custom Action Designer includes a UI builder for configuring the Action settings and a C# or Visual Basic .NET code editor for editing the execution code. Once a Custom Action has been created it appears in the available actions toolbox and can be used like any other action on any of your Automations.

Select the Custom Actions tab on the ThinkAutomation Studio Ribbon.

Click Add Action to add a new custom action.

Each action must have a unique Class Name. This must be less than 100 characters and must not contain spaces or special characters. The Class Description is the text that will show in the Actions toolbox. The Group Name is the section the action should appear in the Actions toolbox. You can select an existing group or create a new one. The Default Height/Width define the size of the Action property page.

Settings Input Fields

You can create any number of settings. These are the Action Settings that appear when the Action is added to an Automation. Your custom action execution code can access these setting values at runtime.

Click Add to add a setting.

Each setting must have a unique Setting Name (unique within the custom action). You will use this name when accessing setting values inside your custom action code.

The Label is the text that should appear next to the setting. The Label Position can be set to the Left or Top of the setting input. The Label Group Name is optional and allows you to group settings on the settings form. All settings with the same Group Name will appear together in a bordered group.

You must then select the Field Type:

Type Details
TextBox A regular textbox for text settings.
Numeric Integer A textbox that only allows integer values.
Numeric Decimal A textbox that only allows decimal values.
Date A date picker (setting value will be a string in 'yyyy-MM-dd HH:mm:ss' format).
CheckBox A boolean checkbox (setting value will be 'true' or 'false').
ComboBox A combo box with a list of possible values.
ListBox A List box with a list of possible values.
TreeView A tree view with a list of possible values organized with parent/child hierarchy.
Assign To Field Picker A combo box already populated with all other variables in the Automation.
File Picker A textbox with a button to select a local file.
Folder Picker A textbox with a button to select a local folder.
Grid A simple grid for editing rows & columns of data.
Plain Text Editor An editor for editing plain text.
Html Editor An editor for editing HTML.
SQL Editor An editor for editing SQL.
Json Editor An editor for editing Json text.
Label Display a label - no data input.
OAuth Sign-In Button A button to sign in to a web resource that supports OAuth.
Microsoft Graph Sign-In Button A button to sign in to Office 365/Microsoft Graph.

Setting Input Fields have additional properties depending on the field type, such as Default Value, Is Required, Is Password, Max Length, Numeric Range.

You can add multiple setting fields depending on the type of settings you need to store with your custom action when it is used on Automations.

You can change the order that settings appear on the settings form using the Up/Down buttons.

After you have created your input fields, click Preview to see how the custom action properties form will appear when it is used on an Automation.

Note: An 'Assign Return Value To' Assign To Field picker setting is added automatically.

ComboBox/ListBox

For ComboBox or ListBox setting types you define a list of Items containing Display Names and optional Values. The user can then select one of the items. If the ComboBox Is Editable is enabled then the user can also type any value. If Values are specified then the Value will be assigned to the setting value rather than the Display Name. If the Value is blank then the Display Name will be assigned to the setting value.

Grid Editor

For Grid field types you define the columns in your grid. For each column you set the allowed type (String, Integer, Decimal, Date, Time, Boolean or Memo). You can also mark a column as a Field Combo. Columns marked as field combo will automatically show a drop down list of ThinkAutomation variables when data is entered in that column.

For each string type column you can optionally also assign a list of Choices. Each choice should be separated by a | character. If Choices are specified then the column will show a drop down list. If the Choices entry starts with a | character then the grid column value can only be selected from the choices list - a different value cannot be typed. For Example: If the Choices is set to 'Red|Green|Blue' then the user can select from the list but also type in another value. If Choices is set to '|Red|Green|Blue' then the user can only select one of Red, Green or Blue.

OAuth Sign In Button

This Input Field type can be used if your custom action code needs to access a web API that requires an OAuth Authorization token. You must set the additional properties of Authorization Endpoint, Token Endpoint, Client ID, Client Secret & optional Scope, depending on the OAuth service you want to sign in to.

When the Action is used on an Automation and the ThinkAutomation Studio user clicks the Sign-In button, a web browser window will start the sign-in process and return an Authorization token. The Authorization token is assigned to the input field value. Which can then be used inside your action execution code. ThinkAutomation will refresh expired tokens automatically before your custom action executes.

Inside your action execution code when making HTTP requests to a web API you must add the 'Authorization' header and the value to the setting value. For Example:

string Authorization = settings.value("MySignInSettingName");
WebClient Client = New WebClient();
Client.Headers.Add("Authorization",Authorization)

You can also use the httpHelper class which simplifies http calls. See: Using The Http Helper Class

Microsoft Graph Sign In Button

This Input Field type can be used if your custom action code needs to access the Microsoft Graph API. You must set the Scope depending on the resources you need to access. The User.Read scope is added automatically. The sign in uses the ThinkAutomation app clientid.

When the Action is used on an Automation and the ThinkAutomation Studio user clicks the Sign-In button, a web browser window will start the sign-in process and return an Authorization token. The Authorization token is assigned to the input field value. Which can then be used inside your action execution code. ThinkAutomation will refresh expired tokens automatically before your custom action executes.

Inside your action execution code when making HTTP requests to Microsoft Graph you must add the 'Authorization' header and the value to the setting value.

You can also use the httpHelper class which simplifies http calls. See: Using The Http Helper Class

Execution Code

The Execution Code pane is used to create the C# or Visual Basic .NET code that will execute when the custom action is executed for an Automation by the Message Processor. You should decide on the language (C# or Visual Basic .NET) before you start coding, since changing it will reset the code. Each separate custom action can use either language.

When ThinkAutomation executes the custom action it calls the execute method. This is the entry point to your execution code. You should not change the execute method name or parameters. Inside your code you can add any number of additional methods. The execute method returns a string value. The returned value will be assigned to the Assign Return Value To variable.

Custom action code is compiled by ThinkAutomation when it is executed for the first time. Therefore, once custom actions have executed once they will operate as fast as built-in actions.

You can access the current message being processed, access or update existing Automation variables and add to the Automation log in the same way as the Execute Script action.

Accessing Settings Values Inside Your Code

Inside your code you can access the Settings Input Field values using:

string SomeSetting = settings.value("settingname");

Where settingname is the Setting Name. You can also simply drag a setting onto the code editor to create.

All setting values are strings. So for a Numeric Integer setting it would still be returned as a string. A ComboBox value will either be 'true' or 'false'.

All settings values will have already been 'replaced'. This means that if the user had used any %field% replacement(s) within the setting value - each will have been replaced with actual values before your code executes.

Accessing Grid Input Type Data

Setting Input Fields that are defined as Grid input types are accessed by row/column values. You can access the number of rows and the value at each row/column. For example:

The settings.tableDataRows("settingname") returns the number of rows entered in the grid setting called 'settingname'. Eg:

int Rows = settings.tableDataRows("GridSetting");

The settings.tableDataRowColumnValue("settingname" , row, col) returns the grid value for a specific row & column. Eg:

string Value = settings.tableDataRowColumnValue("GridSetting", 1 , 2);

.NET References

Custom action code can reference other .NET assembles. Use the References tab to add additional references. Any .NET referenced assembly must be located in the ThinkAutomation program files folder or be in the global .NET path.

Validating Custom Action Code

Click the Check button to validate that the code compiles successfully.

Using Visual Studio To Develop Custom Action Code

You can use Microsoft Visual Studio to develop & debug your custom action code. When development is complete you can then copy/paste the code into the Custom Action code editor.

Start a new Visual Studio console application protect. Set it use use .NET Framework 4.7.

Add a Reference to ThinkAutomationCoreClasses.dll (located in the \Program Files\ThinkAutomation.NET\ folder) and any other references your script code will use.

Example (Visual Basic):

Imports ThinkAutomationCoreClasses.ThinkAutomation
Imports ThinkAutomationCoreClasses.Scripting

Module Module1

    Sub Main()

        ' create some test settings
        Dim TestSettings As New actionSettings
        TestSettings.Add("firstname", "John")
        TestSettings.Add("lastname", "Smith")

        ' create a blank incoming message
        Dim IncomingMessage As New clsMessage(New clsMessageSource, New clsAutomation)
        Dim Message As New currentMessage(IncomingMessage)

        Dim MyAction As New ThinkAutomationScript
        Console.WriteLine(MyAction.execute(TestSettings, Message))
        Console.ReadLine()

    End Sub

End Module

Public Class ThinkAutomationScript

    Public Function execute(ByVal settings As actionSettings, message As currentMessage) As String
        Try

            ' Action execution code
            ' Get custom action settings using settings.value("settingname")
            ' Get extracted fields/variable values using message.GetValue("name")
            ' Set extracted fields/variable values using message.SetValue("name","value")
            Dim FullName As String = settings.value("firstname") & " " & settings.value("lastname")
            Return FullName

        Catch e As Exception
            ' Pass the error back to the automation log
            message.AddErrorToLog(e.Message)
            Return ""
        End Try
    End Function

End Class

First we need to create some settings to pass to the execute method. The setting names should match your Setting Input Fields. You then need to create a blank message to pass to the execute method.

You can the run & debug the execute method.

When you have completed development select the Public Class ThinkAutomationScript code and paste it into the Custom Action code editor (replacing the existing ThinkAutomationScript code block).

Using The Http Helper Class

When making http requests inside your execution code you can make use of the built-in helpersHttp class. This helper class simplifies making http GET, POST & DELETE requests. It also honors any proxy settings in your ThinkAutomation Server Settings.

Simple Get Request:

Dim Http As New helpersHttp

' set the Url
http.URL = "https://graph.microsoft.com/v1.0/users/" & settings.value("Email")

' set the OAuth token if required.
http.AuthorizationToken = settings.value("SignIn") 

' send the request
Dim Json As String = Http.SendRequest
If Json.Length = 0 Then
    ' if nothing returned then check the http status
    message.AddErrorToLog(http.LastStatus.ToString & " " & http.LastError)
End If

Post Request

Dim Http As New helpersHttp

' set the Url
http.URL = "https://graph.microsoft.com/v1.0/me/messages/abcd1234/move"
' set the Verb to GET (default), POST, DELETE or PUT
http.Verb = "POST" 
' add any additional headers using AddHeader
http.Addheader("header","somevalue") 
' add any additional querystring parameters if required
http.AddQueryStringParameter("param","somevalue") 
' set the OAuth token if required.
http.AuthorizationToken = settings.value("SignIn") 
' set the content-type
http.ContentType = "application/json"
' set the post body
http.PostBody = "{""desinationid"": ""defgh67890""}" 

' send the request
Dim Json As String = Http.SendRequest
If Json.Length = 0 Then
    ' if nothing returned then check the http status
    message.AddErrorToLog(http.LastStatus.ToString & " " & http.LastError)
End If

Settings Form Code

The Settings Form Code pane is used to create C# or Visual Basic .NET code that will be executed by the ThinkAutomation Studio when your custom action is used on an Automation. Changing this code is optional and is only required if you need to fine-tune the settings form functionality within the Studio. The code does not affect Automation execution.

The default code contains 3 methods - Loaded, EditValueChanged & Saved. You can add code inside these methods (do not change the method names or parameters). You can add additional methods of your own that can be called from these methods, and you can add additional .NET References if required.

Loaded

Loaded is called when the settings form initially loads. You can set default values for settings and show/hide or enable/disable individual settings.

To set a default value for a setting, use:

```visual basic settings.SetDefaultValue("settingname","initial value")

Where *settingname* is the name of one of your Settings Input Fields. All values are set as strings. For CheckBox type inputs you should set to *'true'* or '*false*. For Date inputs the date should be in *yyyy-MM-dd HH:mm:ss* format.

For Date inputs you can set the initial value to *'today'*, *'yesterday'* or *'tomorrow'* to have it default to todays date (or yesterday, tomorrow). 

To hide a setting or mark as disabled, use:

```visual basic
settings.Hide("settingname")    ' hides a setting
settings.Disable("settingname") ' disables a setting
settings.UnHide("settingname")  ' show a previously hidden setting
settings.Enable("settingname")  ' enable a previosly disabled setting

EditValueChanged

EditValueChanged is called when a setting value is changed by the user. You can use this to set values for other settings or to show/hide, enable/disable other settings. The changed setting name is passed as a parameter.

You can access the current value for any setting input field using settings.GetValue("settingname").

For Example:

```visual basic Public Sub EditValueChanged(ByVal settings As customActionDesignerSettings, ByVal SettingName As String) If SettingName = "PostToURL" Then Dim CurrentValue As String = settings.GetValue("PostToURL") If CurrentValue = "true" Then settings.UnHide("URL") Else settings.Hide("URL") End If End If End Sub

You can set a setting value using `settings.SetValue("settingname","value")`.

**Setting ComboBox & ListBox Setting Values**

ComboBox and ListBox input types are set as a list of Display Name/Value pairs. You can either set the currently selected item or replace all ComboBox/ListBox items.

To set the currently selected item in a ComboBox/ListBox setting, simply set its value, for example:

```visual basic
settings.SetValue("ListBoxSetting","value2")

Will set the ListBox with setting name 'ListBoxSetting' to the item with value 'value2'.

To replace all items in a ComboxBox or ListBox use:

```visual basic Dim ListItems As New List(Of String) ' create a List(Of String) ListItems.Add("List item 1|value1") ' Add items. Separate Display Name & Value with |
ListItems.Add("List item 2|value2") ListItems.Add("List item 3|value3") ' Use SetValue and pass settings.KeyValuePairs(List) settings.SetValue("ListBoxSetting",settings.KeyValuePairs(ListItems))

**Setting Grid Choices Column Values**

Grid settings can include columns that contain drop down selectors. You can set the values contained in the drop down selector using:

```visual basic
Dim Choices As New List(Of String) ' create a List(Of String)
Choices.Add("Choice 1") ' populate the list with available choices
Choices.Add("Choice 2")
Choices.Add("Choice 3")
' Use SetValue and pass settings.GridColumnValues('ColumnName',IsEditable,ChoicesList)
settings.SetValue("GridSettingName",settings.GridColumnValues("Choices Col",False,Choices))

Saved

Saved is called when the form is saved. You can use this to perform additional validation and to prevent the user saving the action.

By default the Saved method returns a blank string. If you want to prevent the settings form from being saved, return a string value. The returned string will be shown to the user in a message box. For example:

```visual basic If settings.GetValue("PostToURL") = "true" And settings.GetValue("URL") = "" Then Return "You must specify the URL is Post To URL is enabled." Else Return "" End If

### Help Text

#### Action Description Template

This setting is used to define the text that appears in the Automation Action List. By default it will show the Class Description. You can add additional text - and include setting names. The template is in the following format:

Text {1:%SettingName1%} text {2:Text %SettingName2%} {a:Assign To %Setting3%}

Where 'text' is any text. Any %settingname% enclosed in % will be replaced with the setting value. If you enclose text with {} you can set its color. Eg: {1:%name%} will show the value of the %name% setting in color 1. There are 3 colors and an 'assign to' color. You can show a setting in the 'assign to' color using {a:%assignto%}.

#### Help Details/Notes

These optional settings are stored with the Custom Action. The help text will show in the Action Properties page Help tab, when the custom action is used on an Automation. Help text can contain Markdown.



### Publishing

Custom Actions will not appear in the Actions toolbox until marked as 'Published'. This enables you to work on a custom action before it is available to use on your Automations. To mark as published, click the **Publish** button and then click **Save** to save the custom action. The custom action will then show in the Actions toolbox when designing your Automations. You can drag it to the Actions list and use it like any other action. 

> Note: ThinkAutomation checks that the custom action code compiles successfully before you can publish it.



### Sharing You Custom Action

You can share your custom action with other ThinkAutomation users once it is marked as 'Published'. Click the **Share** button to enable sharing. The custom action will then be uploaded to the online library each time it is saved. Other ThinkAutomation users will then see it in the *Online Actions Explorer* and can add it to their own custom actions.  

> Note: Your custom action will not be visible to other users until Parker Software has verified it. 



## Exporting Solutions

You can export a Solution to a ThinkAutomation *Solution Package* File. The Solution can then be imported into another ThinkAutomation installation. The solution package file will contain all *Message Sources* & *Automations* for the Solution along with any *Custom Actions* that any of the Automations in the Solution use.

On the ThinkAutomation Studio ribbon, select the **Explorer** tab. Select the Solution to export from the Solution selector. Click the **Save To Package File** button.

Previously exported Solution files can be imported using the ThinkAutomation Studio - **File** menu - **Import Solution.** When a Solution is imported its Message Sources will be marked as disabled so that processing does not start immediately after import. Mark the Message Sources as enabled when you are ready to begin processing.

> Note: Solution package files are encrypted can cannot be read outside the ThinkAutomation Studio.



## Using The Local API

Messages can be posted to ThinkAutomation via local HTTP GET or POST requests. Each of your configured *Message Sources* has a unique local API URL in the form `http://localhost:9899/addmessage?taid={id}`. By default ThinkAutomation Server accepts local API requests from local IP addresses only. You can add additional IP addresses to the *Whitelist* using the ThinkAutomation Server Settings.

Any message posted to, or requested from, this URL will be passed to the ThinkAutomation server for immediate processing. Messages will be processed by the default *Automation* configured for the Message Source. There is no limit to the number of messages that can be posted to the local API. Messages can be sent to ThinkAutomation via the API regardless of the configured Message Source type.

### HTTP Get

The local API accepts HTTP GET requests. You can specify the message content as part of the URL. Whenever the URL is requested a new ThinkAutomation message will be created.

The *body*, *subject*, *from* & *to* addresses can be specified on the query string:

http://localhost:9899/addmessage?taid=5f7b421a6e1f408c38488397179 &from=alice%40test.com &subject=unsubscribe &body=testmessage

The *body*, *subject*, *from* and *to* query string parameters are optional.

#### Passing Field/Value Pairs

You can also pass specific parameters using `x-parametername=value`. In this case the message passed to ThinkAutomation will be in Json format with each parameter value (excluding the 'x-').

For example:

http://localhost:9899/addmessage?taid=5f7b421a6e1f408c38488397179 &from=alice%40test.com &subject=unsubscribe &x-name=Alice+Bamber &x-email=alice%40test.com

The message body which would be sent to ThinkAutomation as:

```json
{
    "name": "Alice Bamber",
    "email": "alice@test.com"
}

If you do not want to use field=value pairs you can pass the raw body text using the &body= query string parameter. The ThinkAutomation message body will be set to the contents of the body parameter with no conversion.

HTTP Post

The local API accepts x-www-form-urlencoded, form-data, and raw post data formats.

Raw Data

For raw posts the post data can be set to the mime text of an email message. If mime text is not sent the ThinkAutomation Server will convert the message to mime text using the post data as the plain text message body.

Example:

Add Message local API URL:

http://localhost:9899/addmessage?taid=5f9ab14c6e1f405c7cbf955c

Post Data:

MIME-Version: 1.0
To: test@test.com
From: test@mycompany.com
Subject: Test Message

This is a test message

This would send a message to the Message Source with the above local URL. The Message would be processed by the default Automation configured for the Message Source.

x-www-form-urlencoded

This is the default for web form submissions. The Message Body passed to ThinkAutomation will be Json text with each field value. For example, suppose you post a web form with 2 fields Name=Test Name, Age=20, the message passed to ThinkAutomation will have the body:

{
    "Name": "Test",
    "Age": "20"
}

The from, to & subject can either be passed as post fields or as parameters on the URL query string.

Response

For each GET or POST the Local API will respond with a HTTP 202 Accepted status along with a Json response:

{
    "Success": true,
    "Cached": true,
    "ErrorMessage": "",
    "MessageResultDetail": null
}

Success will be true if the message was accepted, otherwise false and ErrorMessage will contain the reason.

Cached will always be true when using the local API.

Waiting For Automation Results

By default local API GET or POST requests will respond with a 202 Accepted response as soon as the message has been queued. You can optionally wait for the Automation results by adding &results=json to the URL. If the results parameter is used then the HTTP response will be sent back when the Automation has completed for the message. The response will include the Automation return value.

If &results=json is used the local API will return the results of the Automation as Json text (See below for an example). If &results=text is used then only the Automation Return Value (or error message) is returned as text.

Note: By default the ThinkAutomation Server only accepts HTTP requests from local IP addresses for the local API. You can add additional hosts to the Whitelist using the Server Settings.

Sample API Calls C# & VB

The samples below show HTTP POST and GET against the local API. To use the public Web API replace the local URL (http://localhost:9899/addmessage?taid=xxx) with the public URL.

C# Post

public void SendMessage()
{
    using (HttpClient client = new HttpClient())
    {
        var values = new Dictionary<string, string>()
        {
            {"name","Alice Bamber"},
            {"email","alice@test.com"},
            {"subject","unsubscribe"},
            {"from","alice@test.com"}
        };
        var content = new FormUrlEncodedContent(values);
        var response = client.PostAsync("http://localhost:9899/addmessage?taid=5fcf74b96e1f4068c0f1b5c7", content).Result;
        Console.WriteLine(response.Content.ReadAsStringAsync.Result);
    }
}

C# Get

private void SendMessageUsingGet()
{
    using (HttpClient client = new HttpClient())
    {
        string URL = "http://localhost:9899/addmessage?taid=5fcf74b96e1f4068c0f1b5c7" + 
            "&from=" + HttpUtility.UrlEncode("alice@test.com") + 
            "&subject=" + HttpUtility.UrlEncode("unsucscribe") + 
            "&x-name=" + HttpUtility.UrlEncode("Alice Bamber") + 
            "&x-email=" + HttpUtility.UrlEncode("alice@test.com");
        var result = client.GetAsync(URL).Result;
        Console.WriteLine(result.StatusCode);
    }
}

Visual Basic .NET Post

Public Sub SendMessage()
    Using client As New HttpClient
        Dim values = New Dictionary(Of String, String) From {
            {"name", "Alice Bamber"}
            {"email", "alice@test.com"},
            {"subject", "unsubscribe"},
            {"from", "alice@test.com"}
        }
        Dim content = New FormUrlEncodedContent(values)
        Dim response = client.PostAsync("http://localhost:9899/addmessage?taid=5fcf74b96e1f4068c0f1b5c7", content).Result
        Console.WriteLine(response.Content.ReadAsStringAsync.Result)
    End Using
End Sub

Visual Basic .NET Get

Private Sub SendMessageUsingGet()
    Using client As New HttpClient
        Dim URL As String = "http://localhost:9899/addmessage?taid=5fcf74b96e1f4068c0f1b5c7" & _
            "&from=" & HttpUtility.UrlEncode("alice@test.com") & _
            "&subject=" & HttpUtility.UrlEncode("unsucscribe") & _
            "&x-name=" & HttpUtility.UrlEncode("Alice Bamber") & _
            "&x-email=" & HttpUtility.UrlEncode("alice@test.com")
            Dim result = client.GetAsync(URL).Result
            Console.WriteLine(result.StatusCode)
    End Using
End Sub

Specifying The Automation

By default the addmessage GET or POST will execute the default Automation assigned to the given Message Source. You can explicitly set the Automation to execute by adding &automationid={id} to the GET or POST query string. Automation Id's are shown on the Automation View Properties tab.

Viewing Server Status

You can use the local http interface to view the ThinkAutomation Server status.

Use a web browser to view the address:

http://localhost:9899

This will display a web page showing server status, along with messages processed, queued and error counts for each Message Source and Automation.

You can request the status in Json format, by requesting the page:

http://localhost:9899/status.json

Using The Web API

ThinkAutomation provides a public Web API that acts as a secure gateway between web resources and your on-premises ThinkAutomation instance. When your ThinkAutomation Server starts it makes a secure connection to the ThinkAutomation Web API server.

The Web API is used for the following:

Type Details
Web Form Message Sources For creating publicly accessible web forms that connect to your Automations.
Teams Message Sources For receiving messages from Microsoft Teams users.
Custom Web Forms For posting your own web forms directly to ThinkAutomation for processing.
Twilio Actions For making calls or sending/receiving SMS messages via Twilio.
Wait For User Response Action For requesting additional information from a users during an Automation.
Web For Webhook Action For integrating with 3rd party web API's that offer webhook callbacks.
Other web based integrations For example posting messages to your ThinkAutomation instance via HTTP POSTS or GETS for your own or 3rd party integrations.

The Web API does not hold any of your settings, or keep copies of messages it has forwarded to your ThinkAutomation Server - it simply acts as a secure gateway between a unique public URL and your ThinkAutomation Server.

You can disable the Web API in your ThinkAutomation Server Settings. Your ThinkAutomation Server will then not make any connection to the Web API Server - however the operations above cannot then be used.

Posting Messages Via The Web API

Web Forms Message Source

The Web Form Message Source Type enables you to create a publicly accessible web form with multiple input fields. The web form has a unique secure public URL hosted on the ThinkAutomation Web API. You can embed the web form inside your own website or send a link to the form in outgoing emails. When a web user completes the form, the results are sent to your ThinkAutomation Server for immediate processing. The Web Form can optionally display the Automation return value after the form is submitted. See: Web Forms

Your Existing Website Forms

The Web API can accept HTTP POST requests from your own web forms. Simply set the form action to the Web API URL shown on the Message Source properties.

Custom HTTP Requests

Messages can be also posted to ThinkAutomation via the Web API using HTTP GET or POST requests. Each of your configured Message Sources has a unique public endpoint URL. The URL contains a secure hash of your ThinkAutomation instance and Message Source Id. Any message posted to this endpoint will be passed to your ThinkAutomation server for immediate processing. Messages will be processed by the default Automation configured for the Message Source. If your ThinkAutomation server is not active when a message is posted then the message will be queued for up 48 hours.

The Web API enables you to send messages to ThinkAutomation from any location.

You send messages to ThinkAutomation using HTTP POST or GET requests to the public Message Source URL. HTTP POST & GET requests are sent in the same way as the local API - but with the public URL instead of the local URL.

You can limit the Allowed Origins for each Message Source. This setting restricts the domain names that are allowed to make requests.

The Web API accepts x-www-form-urlencoded, form-data, and raw post data formats as the local API.

Response

The Web API will respond with a HTTP 202 Accepted status along with a Json response:

{
    "Success": true,
    "Cached": false,
    "ErrorMessage": "",
    "MessageResultDetail": null
}

Success will be true if the message was accepted, otherwise false and ErrorMessage will contain the reason.

Cached will be true if your ThinkAutomation Server was not active when the message was added. The Message will be cached and sent to your ThinkAutomation Server when it becomes active.

Waiting For Automation Results

By default Web API POST or GET requests will respond with a 202 Accepted response as soon as the message has been queued (unless a &redirect parameter is specified). You can optionally wait for the Automation results by adding &results=json to the URL. If the results parameter is used then the HTTP response will be sent back when the Automation has completed for the message. The response will include the Automation return value.

If &results=json is used the Web API will return the results of the Automation in the MessageResultDetail object of the Json response.

Example:

{
    "Success": true,
    "Cached": false,
    "ErrorMessage": "",
    "MessageResultDetail": {
        "MessageStoreId": "5f9befaf6e1f4065a89a5d9e",
        "MessageSourceId": "5f9ab14c6e1f405c7cbf955c",
        "IncomingUid": "dff8ad81-7ec2-4cc6-a288-975f7134ff85",
        "AutomationId": "5f86c3076e1f402260ea4bec",
        "AutomationSuccess": true,
        "AutomationError": "",
        "AutomationReturnValue": "this 1, test 1, message 1",
        "AutomationLog": [
            {
                "_id": "5f9befaf6e1f4065a89a5da0",
                "MessageStoreId": "5f9befaf6e1f4065a89a5d9e",
                "AutomationId": "5f86c3076e1f402260ea4bec",
                "LineNumber": 0,
                "Dated": "2020-10-30T10:49:19.99",
                "IsError": false,
                "LineText": "Process Message, Dated 30/10/2020 10:49:19, From test@mycompany.com, (318B), Subject: Test Message",
                "NodeName": "TACOMPUTER"
            },
            {
                "_id": "5f9befaf6e1f4065a89a5da2",
                "MessageStoreId": "5f9befaf6e1f4065a89a5d9e",
                "AutomationId": "5f86c3076e1f402260ea4bec",
                "LineNumber": 2,
                "Dated": "2020-10-30T10:49:19.99",
                "IsError": false,
                "LineText": "Variable Text Set To: This is a test message",
                "NodeName": "TACOMPUTER"
            },
            {
                "_id": "5f9befaf6e1f4065a89a5da3",
                "MessageStoreId": "5f9befaf6e1f4065a89a5d9e",
                "AutomationId": "5f86c3076e1f402260ea4bec",
                "LineNumber": 3,
                "Dated": "2020-10-30T10:49:19.99",
                "IsError": false,
                "LineText": "Variable Tokens Set To: ",
                "NodeName": "TACOMPUTER"
            },
            {
                "_id": "5f9befb06e1f4065a89a5db2",
                "MessageStoreId": "5f9befaf6e1f4065a89a5d9e",
                "AutomationId": "5f86c3076e1f402260ea4bec",
                "LineNumber": 4,
                "Dated": "2020-10-30T10:49:20.293",
                "IsError": false,
                "LineText": "Tokenized to 3 tokens This is a test message.",
                "NodeName": "SPDELLXPS17"
            },
            {
                "_id": "5f9befb06e1f4065a89a5db3",
                "MessageStoreId": "5f9befaf6e1f4065a89a5d9e",
                "AutomationId": "5f86c3076e1f402260ea4bec",
                "LineNumber": 4,
                "Dated": "2020-10-30T10:49:20.293",
                "IsError": false,
                "LineText": "Variable Tokens Set To this 1, test 1, message 1",
                "NodeName": "TACOMPUTER"
            }
        ],
        "ExecutionTime": 301
    }
}

The AutomationLog array will contain a list of Automation Log lines.

Depending on what your Automation is doing - the Web API POST or GET request may timeout before the Automation completes. The maximum wait time is 30 seconds. So for long running Automations (for example: if your Automation is uploading FTP files etc), then the &results parameter may not be applicable.

Returning Only The Automation Return Value

If using the &results=text parameter is used then only the Automation Return Value content (or an error message) is returned instead of the full Json response. If the Automation Return Value contains HTML then the value will be returned as text/html. If the return value contains Json then the value will be returned as application/json.

Web API Usage Limitations

Each instance of ThinkAutomation includes free access to the Web API with daily limits of:

  • Standard Edition: 1000 messages per day.
  • Professional Edition: 5,000 messages per day.
  • Evaluation & Developer Editions: messages 200 per day.

With a standard rate limit of 1 message per second. Please contact us if you need to increase these limits.

Each message posted via the Web API is limited to 10mb in size.

Reserved Web API Instance

For businesses with large Web API usage requirements, Parker Software can offer a reserved Web API instance (for example: mycompany.thinkautomation.com). This is a reserved instance of the ThinkAutomation Web API Server with higher message limits. Please contact us for more information.

Server Settings

Server-wide settings can be accessed using the File menu on the ThinkAutomation Studio ribbon. These settings affect the ThinkAutomation server.

Email

These settings control how ThinkAutomation sends outgoing emails. This should be configured if any of your Automations use the Send Email action.

You can send emails via:

  • SendGrid
  • Smart Host

Via SendGrid

You can use SendGrid to send outgoing emails. You must create a SendGrid account and specify your SendGrid API Key. SendGrid provides a reliable and fast option for sending outgoing emails. See: https://www.sendgrid.com.

Via Smart Host (SMTP)

You can use an external mail server to send outgoing emails. Specify the Mail Server IP address or DNS name, Port, Username & Password. Click the Requires Secure Connection option if your mail server requires a secure connection. You can also use this option to send via cloud hosted email providers that provide an SMTP option (such as Amazon SES).

Click the Send Test Email button to verify the outgoing email settings.

Twilio Integration

If you use any of the Twilio actions (Twilio Make A Telephone Call, Twilio Send SMS Message etc.) then you must Enable Twilio Integration and enter your Twilio Account SID and Auth Token. These can be found in your Twilio Account Settings.

Enter the Default Twilio Caller Id. This is the default Twilio phone number that you have created in your Twilio account. This will be used as the sender 'from' number for the Twilio SMS Send SMS Message/Twilio Make A Telephone Call actions, if no specific From number is specified on these actions.

Translation

If you use the Translate, Detect Language or Speak Text actions then you need to create a Translation Account. Contact Parker Software to create a Translation Account or a free trial. Once you have created an account enter your Translation Account Username & Password.

Note: You can also use the Azure Translate action (available from the online Custom Actions library). This action allows you to use your own Azure credentials.

Message Store

This tab shows the current Message Store configuration. Click Reconfigure to change the Message Store type.

Disable Daily Database Clean-Up

Each day at midnight the ThinkAutomation Server will delete processed messages according to the Keep Messages For (Days) setting on each of your Solutions. You can disable the automatic deletion for all Solutions by enabling this option.

Backup Solution Settings In Message Store Database

If this option is enabled then ThinkAutomation will automatically store copies of your Solutions (Message Source & Automation settings) in the Message Store database. These copies will be updated whenever any changes are made. This setting should not be enabled if your Message Store database is not secure - since someone without ThinkAutomation user access could view settings data if they can access the database.

Restoring Solution Settings

Should your MetaData file (MetaData.db) become corrupt or lost, the ThinkAutomation server will attempt to restore your Solutions from the Message Store backup (if enabled). Ensure the ThinkAutomation Service is stopped. Remove the corrupted MetaData.db file from the \ProgramData\Parker Software\ThinkAutomation.NET\ folder. The restart the ThinkAutomation Server. If the server cannot find a MetaData.db file it will attempt a recovery from the Message Store database.

Web API

ThinkAutomation allows messages to be sent for processing via the Web API. The Web API provides a secure public endpoint allowing messages to be posted to ThinkAutomation from your own or 3rd party solutions. The ThinkAutomation Server connects to the Web API server when it starts. Each of your Message Sources configured in ThinkAutomation will have a unique URL which you can post messages to.

You can disable the Web API for your ThinkAutomation Server if required. If the Web API is disabled you will not be able to use: Web Form Message Sources, Microsoft Teams Message Sources, Wait For User Response & Twilio Actions.

See: Using The Web API for more information.

Users

This tab allows you to configure users of the ThinkAutomation Studio. A default system administrator user will have been created during the setup. You can create additional users and set various rights for each user. You must have one user that is the System Administrator.

Resetting A Password

You can request a password reset for any user. Edit the user and enable the Requires Password Reset option and save the user. When the user next logs in using the ThinkAutomation Studio they will be asked to change their password.

When you create a new user the Requires Password Reset option is automatically enabled. The new user must change their password after their first login.

Note: The System Administrator user's password is also used to encrypt the Metadata database (containing all the Message Sources & Automation settings). If you reset the System Administrator user's password then the metadata database will be rebuilt using the new password.

Limited Access Users

If the Can Create/Edit Message Sources & Automations user right is disabled, the user will not be able to add or edit Message Sources or Automations. The user can send new messages for processing.

If all User Rights are disabled for a user then the ThinkAutomation Studio can only be used to send messages to an Automation for processing and to view the results. No other options will be available for the user.

Proxy

Use this tab to specify your Proxy Server details if your ThinkAutomation computer uses a proxy server to connect to the Internet. Automation actions that make outbound TCP or HTTP connections will then attempt to use the proxy server properties specified. If you do not specify a specific proxy server then ThinkAutomation will attempt to auto detect a proxy from your system.

Customer Participation

Send Usage Data

The ThinkAutomation Server will periodically (once per week) send usage information to Parker Software. This helps us to improve the product based on customer usage. Only the Action Type Names that you are using across all your Automations are sent. No personal information or configuration settings are sent.

Automatically Check For Updates

If this option is enabled ThinkAutomation will automatically check for new updates once per day. A message will be shown in the ThinkAutomation Studio if an update is available. If the automatic check is disabled you can still manually check for updates using the Studio - File - Check For Updates option.

Include Pre-Release Updates

If this option is enabled then pre-release updates will be included in the Check For Updates.

Message Store Maintenance

The ThinkAutomation Server will automatically remove old processed messages from the Message Store database. The date at which a processed message is removed is defined by the Keep Messages For Days setting on the Solution properties (which defaults to 1095 days). This will affect messages processed by all Automations within the Solution.

Use the Edit Solution Properties button on the Ribbon to change this setting.

Set the Keep Messages For Days option to zero to disable automatic deletion.

The ThinkAutomation Server performs the maintenance at midnight each day. When Automations or Solutions are deleted via the Studio, ThinkAutomation marks the messages in the message store for deletion during the next overnight maintenance run.

Messages in the Message Store provide an audit trial of messages processed. To maintain best performance you should only keep processed messages for a long as you need to.

Local Server Limitations

Any number of Solutions can be created. Each containing any number of Message Sources and Automations.

There is no limit to the number of messages that can be processed. The only limit is available hardware.

The effective maximum number of active Message Sources & Automations is determined only by available memory and processor capacity. Each Message Source executes concurrently. So if you created 10 Message Sources to download messages from 10 separate Office 365 accounts then each will process at the same time. The Automations executed from these Message Sources also execute concurrently (up to a maximum based on the processor cores available) as each new message arrives.

For high volume ThinkAutomation implementations you should monitor the memory & processor usage of the ThinkAutomation services. If you are using the Professional Edition then the Message Reader and Message Processor services can be configured to run on separate computers and multiple instances of the Message Processor service can be configured to share the processing.

The Message Store can store a unlimited number of processed messages - limited only by the database type being used. Each message can be any size - but with an effective limit of 50mb per message. For all editions you can run the Message Store database on a separate computer if required.

Individual Automations are limited to 16mb in metadata size - which equates to many thousand Actions per Automation. However for very large Automations it is recommended to split into separate Automations and use the Call action type.

Markdown Notes

Markdown is a lightweight markup language with plaint-text formatting. See: Markdown Guide

You can use Markdown in ThinkAutomation for outgoing email text, Teams Messages, Web Forms and Wait For User Response forms (headings, prompt text, help text). You can also use it with the Set Variable action. The Set Variable action has an option for converting Markdown to HTML.

For example: If you set an outgoing plain text email or Teams message to:

Please find below your order:

Order: **1234**
Link: [View Order](https://mycompany.com/orders/1234.pdf)

The outgoing email HTML would be converted to:

<p>Please find below your order:</p>
<p>Order: <strong>1234</strong><br />
Link: <a href="https://mycompany.com/orders/1234.pdf" target="_blank">View Order</a></p>

For outgoing emails any converted HTML will be wrapped inside <html> & <body> tags.

To represent blank lines in HTML you should end any Markdown lines with a double space or you can use the <br/> tag. The <br/> tag is converted to double space before the Markdown to HTML conversion. Any other HTML tags in the Markdown text will be removed before conversion.

Any of the standard Markdown formatting can be used. For example, tables:

# Details

| Item    | Details           |
| ------- | ----------------- |
| From    | **%Msg_From%**    |
| To      | **%Msg_To%**      |
| Subject | **%Msg_Subject%** |

Would be converted to:

<h1 id="details">Details</h1>
<table>
<thead>
<tr>
    <th>Item</th>
    <th>Details</th>
</tr>
</thead>
<tbody>
<tr>
    <td>From</td>
    <td><strong>sender@test.com</strong></td>
</tr>
<tr>
    <td>To</td>
    <td>receiver@test.com</td>
</tr>
<tr>
    <td>Subject</td>
    <td><strong>Test Subject</strong></td>
</tr>
</tbody>
</table>

Markdown document files or attachments (*.md) can be converted to PDF, Word & HTML files using the Convert Document action.


Configuring Distributed Setup

The Professional Edition of ThinkAutomation allows the ThinkAutomation main service, Message Reader service and Message Processor service to be configured to run on separate computers. You can also run multiple instances of the Message Processor service on separate computers in a load-balanced configuration (additional license required).

Preparation

You first need to decide on the computer that will run the ThinkAutomation Main Service. Only one computer can run the ThinkAutomation Main Service.

Choose the computers that will run the ThinkAutomation Message Reader Service and the ThinkAutomation Message Processor Service. You can choose to run one or both of these in the same computer as the Main Service or separately.

Configuring The Main Service Computer

Run the ThinkAutomation.exe setup to install ThinkAutomation on the main computer. After the setup is complete the ThinkAutomation Node Configuration application will start.

Select the Distributed Services option and then select the services to run on this computer. The Main Service option must be selected on the main computer.

You should then run the ThinkAutomation Studio to complete the setup of the ThinkAutomation main service. This includes registering your product and completing the Message Store database configuration.

Configuring Node Computers

On a separate computer, run the ThinkAutomation.exe setup again to install ThinkAutomation. After setup is complete the ThinkAutomation Node Configuration application will start.

Select the Distributed Services option and the un-select the Main Service option and select either (or both) the Message Reader Service or Message Processor Service.

You must then enter the IP address of the Main Service computer. Click the Verify button to verify that the computer can connect to the ThinkAutomation main service.

Important: The Message Reader and Message Processor services use ports 9110 and 9899 to communicate with the ThinkAutomation Server. Ensure these ports are open on any firewall on the ThinkAutomation Server computer.

Installing The ThinkAutomation Studio On Remote Computers

You can install and use the ThinkAutomation Studio on any remote computer that can access the ThinkAutomation Server.

Run the ThinkAutomation.exe setup on the remote computer.

When the ThinkAutomation Node Configuration starts after installation, select Studio Only.

Start the ThinkAutomation Studio and set the ThinkAutomation Server to the IP Address or computer name of the ThinkAutomation Server computer.

Important: If you will be connecting to the ThinkAutomation Server from an external host (for example, if your ThinkAutomation Server is hosted on a cloud virtual machine) you will need to add the remote IP address to the ThinkAutomation Server Whitelist. This needs to be done on the ThinkAutomation Server computer. Use the Studio on the server computer - Server Settings - Clients - Whitelist. Add the External IP addresses for any ThinkAutomation Studio users.

You may also need to configure any firewalls on the ThinkAutomation Server computer to accept inbound requests on port 9110 and 9899.


Backing Up Your Settings

MetaData

All of your Solutions, Message Sources and Automations (referred to collectively as 'metadata') are stored in an encrypted document store database called 'metadata.db' located in the settings folder:

\ProgramData\Parker Software\ThinkAutomation.NET\

You can open this folder using the ThinkAutomation Studio - File Tab - Open button next to the Data Path setting.

You can make a copy of this file at any time to backup your settings.

The metadata file is encrypted using your ThinkAutomation system administrator user password. If you re-install ThinkAutomation on a new computer and copy an existing MetaData.db file to the settings folder - you will need to use the same password when setting up the System Administrator user - otherwise the metadata file will be inaccessible.

Library

All Custom Action settings and Automations saved to the library are stored in a document store database called library.db also located in the settings folder.

You can make a copy of this file at any time.

Contact Information

Parker Software Limited UK Parker Software Inc USA
Victoria Business Park, Prospect Way, Stoke on Trent, Staffordshire, ST8 7PL. United Kingdom. 4767 New Broad Street, Baldwin Park, Orlando, Florida, 32814. United States.
Tel: (UK) 0330 0882 943 Tel: (USA) 800 680 7712

Email Sales: sales@parkersoftware.com, Support: support@parkersoftware.com

Web: www.ThinkAutomation.com

Copyright (c) 2021 Parker Software Limited.