Skip to content

Automation Actions

An Automation can contain any number of Actions. Each of the actions are optional. 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 quickly add actions by typing the action name and selecting from the list. Press the TAB or Enter key to select the first action in the list based on the letters you have typed. The new action will be inserted below the currently selected action in the Actions List.

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 %variable% replacements. Drag a %variable% from the variables list on to the property or type the %variable% name. These %variable% holders will be replaced with the Extracted Field, Variable, Built-In Variable or Constant value when the Automation executes. See: Variable 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

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 process test messages using the Send Message option even if the Message Source is disabled.

Favorite Actions

If you right-click an action in the Toolbox and select Add To Favorites, the selected action will be added to the Favorites group at the top of the Toolbox. You can remove actions from the favorites group by right-clicking the action again.

Built-In Automation Actions

ThinkAutomation includes a collection of built-in automation actions for common tasks. You can also download more actions from the Custom Action 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 new actions.

Common

Data

Outgoing

Documents

  • Create Document : Create a formatted document and save it in various formats.
  • Create Spreadsheet : Create a spreadsheet and save it in various formats.
  • Convert Document : Convert Word, Open Document, Excel, PDF, Richtext, Text, Markdown Text, CSV or HTML documents or attachments to PDF, Word, HTML, image or text.
  • Convert Document To Text : Convert PDF, Word, Open Document, Excel, Richtext or HTML documents or attachments to plain text or extract PDF form data.
  • Convert Image To Text Using OCR : Convert an image file or attachment to text using optical character recognition (OCR). Can also extract images from PDF files and convert these to text.
  • Convert PDF Document : Convert a PDF document or attachment to image files, text or HTML.
  • Append To PDF Document : Appends document content or text to a PDF document.
  • Convert PowerPoint Document : Convert a PowerPoint document or attachments to image files or PDF.
  • Sign PDF Document : Add a digital signature to a PDF document.
  • Save As PDF : Save the incoming message, image 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 : Automatically print the incoming message, attachments or specific documents.
  • Run A Report : Create a report using a pre-defined report template and export it to various formats.

Office 365

General

  • Text Operation : Perform various operations on text values.
  • Date Operation : Perform various operations on date values.
  • File Operation : Perform various operations on files & folders.
  • List Operation : Create, update, sort and get single or all items from generic lists.
  • Math : Perform mathematical calculations and save the result to a variable.
  • Encryption : Encrypt/decrypt text data or files.
  • Compression : Create or unzip Zip files for attachments, files & folders.
  • Create Hash : Create hash values for text data or files.
  • Set Message Store Flag : Assign a flag to the message stored in the Message Store.
  • Message Store Operation : Read a list of message store messages from/to & to/from two email addresses, search the message store and other operations.
  • Set Logging Level : Set the amount of detail recorded in the Automation log.
  • Create Passcode : Create a random Passcode and assign the value to a variable.
  • Find and Replace : Finds and replaces text in any variable.
  • Read Or Write Text File : Save data to a text file or read an existing text file and assign the content to a variable.
  • Tokenize : Tokenize any text and assign the comma separated tokens to a variable.
  • Extract Address Parts : Parse a postal address and extract specific address parts.
  • Extract Email Signature : Parse contact and company information from email signature footers.
  • Text To Speech : Convert text to a speech WAV file and return the WAV file path to a variable.

Flow

  • If Block : Conditionally execute a one or more actions based on a Condition.
  • Call Automation : Call another Automation with a value and assign the return value to a variable.
  • Return : End execution of the Automation and return a value.
  • End Processing : End execution of the Automation without returning a value.
  • For Each : Create a loop on various properties and execute Actions inside the loop.
  • Select Case : Conditionally execute a one or more actions in the matching Case block.
  • Go To Label : Move processing to a label.
  • On Error : Control what should happen if an error occurs on subsequent actions.
  • Create Web Form Redirect : For Automations called from a Web Form Message Source. Redirect the submitted form to another ThinkAutomation Web Form or URL.
  • Create Chat Input Request: For Automations called from a Web Chat Message Source. Create a set of buttons or form fields to send back to the chat to provide the user with a multiple choice response or specific data entry.

Network

  • DNS Lookup : Perform a DNS Lookup and assign the returned data to a variable.
  • Ping : Ping any host and return the results to a variable.
  • Execute Secure Shell Command : Execute SSH commands against any host and assign the response to a variable.

CRM

  • Get CRM Entity : Read entity values from Microsoft Dynamics, Salesforce, Sugar or Zoho CRM.
  • Update CRM Entity : Add or update Microsoft Dynamics, Salesforce, Sugar or Zoho CRM entities.
  • Query CRM Entities : Perform a generic query to read one or more CRM entities as Json text, CSV or Markdown.

Xero

  • Xero Contact : Read, create & update Xero Accounting contacts.

Web

  • HTTP Get : Read any web page or web API and assign the returned content to a variable.
  • HTTP Post : Post data to any web page or API.
  • Download File : Download a file via HTTP and return the local path to a variable.
  • OAuth SignIn : Obtain a authorization token from an OAuth endpoint for use on subsequent HTTP actions.
  • Cloud Storage : Download, Upload or Delete files using cloud storage providers (Amazon S3, Google Drive, Google Cloud Storage, Microsoft OneDrive, IBM Cloud Storage, Wasabi, Digital Ocean, Linode).
  • Wait For Webhook : Wait for a 3rd party webhook call.
  • Call A Soap Web Service : Execute a SOAP or .NET Web Service and assign the results to variables.
  • Check SSL Certificate : Check the validity and expiry date for the SSL certificate used on any host/URL.
  • FTP Upload : Upload 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.
  • Wrap HTML : Wraps text inside HTML tags with optional styling.
  • Web Spider : Crawls a web site and returns a list of all URLs found.

Json

  • Create JSON : Create a Json Document and assign it to a variable.
  • Update JSON : Create or update multiple Json paths within Json text and return the updated Json to a variable.
  • Read JSON Document : Parse a JSON document from any URL and assign element values variables.
  • Convert JSON To HTML : Convert Json to a readable HTML table and assign the HTML to a variable.

CSV

  • Update CSV : Add a row to a CSV file or variable containing CSV data.
  • Read CSV : Read a CSV file or variable containing CSV data.
  • Parse CSV Line : Extract column data from a comma separated text value.
  • Convert CSV To HTML : Convert CSV data to a readable HTML table and assign the HTML to a variable.

Location

  • Translate : Translate text from one language to another and assign the result to a variable.
  • Detect Language : Detect the language of any text and assign the language code to a variable.
  • Speak Text : Return a URL of a WAV or MP3 file containing spoken text in the desired language.
  • GeoIP Lookup : Perform a GeoIP lookup for any IP address, URL, domain name or email address. Assign the Country, Region and City information to variables.
  • Country Lookup : Lookup country details for country name, code or dial code. Assign the Country Name, Code, Dial Code, Dial Prefix and Currency Code to variables.

Twilio

AI

  • Ask AI : Send a prompt to an AI and assign the response to a variable. Prompts can be assigned a Conversation Id if previous prompts/responses should be included when part of a conversation.
  • Score Sentiment : Perform Sentiment Analysis using the built-in sentiment analyzer on any text and return the score to a variable.
  • Train Sentiment : Train the Sentiment Analysis database.
  • Classify Sentiment : Assign the most relevant sentiment class name for any text to a variable.

Azure

  • Azure File : Download or Upload files to Azure Storage shares.
  • Azure File Get Link : Get URLs to files in an Azure Storage share and assign to a variable.
  • Azure Cosmos DB : Update Or Query Documents In A Cosmos Container.
  • Azure Blob : Get or Put Azure Blobs.
  • Azure Table : Get or Put Azure Table Entities.
  • Azure Queue : Get or Put Azure Queue Messages.
  • Azure Form Recognize : Extract text, key-value pairs and tables from documents, forms, receipts, invoices and business cards using the Azure Form Recognizer service.

System

  • Execute PowerShell : Execute PowerShell commands and assign the results to a variable.
  • Run A Program : Execute a Windows executable file and assign the output to a variable.

Custom Actions

ThinkAutomation also includes Custom Actions. These are additional actions you create or download 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 using the Custom Action Designer. The Custom Action Designer includes 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 parse and extract from the incoming message, and assign it a field name. You can use these extracted field values on other action properties using %variable% replacements.

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

Create Extracted Fields From Text Or Json

You can create multiple Extract Field actions using the Create Extracted Fields From Text/Json button on the Automation toolbar. This option allows you to paste some text or Json and then create the Extract Field actions to extract each item.

Paste a sample of the text or Json you want to extract from. You can also specify the Extract Fields From variable - this should be set to the variable you will be extracting from. You can optionally set the Database Table Name if you will be using the Update A Database Using Extracted Fields action.

When extracting from Json you can also optionally specify a Start At Path. For example, suppose we want to create Extracted Fields the contact section only of the following:

{
  "events": [
    {
      "id": "EVWB66IXJICNYVGN3JAKVBEYP523WE",
      "processed": false,
      "created": 1674055179966,
      "type": "account.created",
      "live": true,
      "data": {
        "id": "kssbzdB-RZigU84gp7ycyQ",
        "account": "kssbzdB-RZigU84gp7ycyQ",
        "contact": {
          "first": "TestFirstName",
          "last": "TestLastName",
          "email": "test@test.com",
          "company": "Test Company",
          "phone": "4075452118",
          "subscribed": true
        }
      }
    }
  ]
}

You would set the Start At Path to events[0].data.contact

Extracted Fields would then be created for first, last, email, company, phone & subscribed only. You can then repeat the process for other sections.

Click the Create Extracted Fields button to create the Extract Field actions..

A preview of the Extract Field actions created will be shown. You can test the extractions using the Test button.

Click OK to save. The Extracted Field actions will be inserted into your Automation below the currently selected line.


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 return value 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%). Other message properties (%Msg_Subject%, %Msg_From%, %Msg_To% etc.) will inherit the values from the currently executing message.

Passing HTML

If the With Message Body Set To entry is set to a %variable% containing HTML, then this will be available in the called Automation in the %Msg_HTML% built-in variable. The %Msg_Body% built-in variable will be automatically set to the plain text version of the HTML.

Passing Files

You can also optionally add attachments. Add one or more files (or %variables% containing file paths) in the With Attachments entry. Enable the Include Incoming Attachments and/or Include Incoming Inline Attachments options to include attachments contained with the currently executing message. You can enter a file mask in the Attachments Mask entry to only include matching attachments (eg: *.pdf).

Passing The Complete Currently Executing Message

If you want to pass the original message in its entirety you can set the With Message Body Set To entry to %Msg_Mime%. This will pass the currently executing message with no changes.

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

Scheduled Execution

If the Wait For Completion option is not enabled then you can optionally enable the Scheduled Execution option. You can specify that the call should execute After x minutes, hours or days or At a specific date/time. If scheduled execution is enabled then the new message will be added to the process queue - but will not be executed until the specified execution time. Called Automations waiting to be executed will show in the Outbox list when viewing the Message Store using the Studio. You can delete pending messages if you need to cancel execution.

The Scheduled Execution option is useful if you have some actions in your Automation that you need to execute at a certain time or be delayed. You can place these actions in their own Automation and use the Call action with the Scheduled Execution option.

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 (which would result in a loop).

Calling Automations From The Library

If you have created a generic Automation that would be useful to other Automations across all of your Solutions, then you can save it to the Library. Any Automation saved to the library can be called from any other Automation in any of your Solutions.


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 with the current message 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.

You can have multiple Return actions in an Automation inside If..Else..End If or Select Case blocks allowing you to return different values depending on conditions.

The return value can be fixed text or %variable% 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 Message Store unless the Don't Save Return Value With Message In Message Store option is enabled.

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 Return Value 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%**').

You can also include a redirect in the return value if you want another Web Form or URL shown after the form is submitted. See the Create Web Form Redirect action.

Returning The Return Value On API Message Sources

If you use the API message source then the return value can be returned to the calling HTTP GET or POST request. If the &results=true querystring parameter is added to the API request then request will wait for the Automation to complete and the Automation Return value will be returned. Depending on the content of the Automation Return value, the result content-type will be served as plain text (text/plain), HTML (text/html) or Json (application/json). If the Return Value contains Markdown text it will be converted to HTML first. If the Return Value is already HTML it will be returned as HTML. If the Return Value is Json it will be returned as Json.

Providing A Link To The Automation Results

The %Msg_ResultsUrl% variable returns a static link to the Automation return value that a user can access via a web browser. Your Automation could include this variable in an outgoing email. A user can click the link to view the Automation return value at a later date. The %Msg_ResultsUrl% URL is unique for each processed message and contains a secure hash. The link will work for as long as the Message is stored in the Message Store.


End Processing

Ends execution of the Automation without returning a value.

You can conditionally end execution by including End Processing or Return actions inside If.. End If blocks.


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 variable or one of your Extracted Fields or Variables (you can also type text and have combinations of text and %variables%).

In the Is column you select one of the following Match Types:

  • Equal To
  • Not Equal To
  • Less Than
  • Greater Than
  • Less Than Or Equal To
  • Greater Than Or Equal To
  • Is Blank
  • Is Not Blank
  • Is A Number
  • Contains
  • Contains One Of (list of words or phrases)
  • Contains All Of (list of words or phrases)
  • RegEx Matches (matches a regular expression)
  • Does Not Contain
  • Starts With
  • Ends With (value
  • Length Equal
  • Length Less Than
  • Length Greater Than
  • Is A Valid Email Address (check the email address is the correct format)
  • Is A Valid Email Address With MX Record (check the email address is the correct format AND has a valid MX record)
  • Is Not A Valid Email Address
  • Date Only Equal To
  • Date Only Less Than
  • Date Only Greater Than
  • Hour Less Than
  • Hour Greater Than
  • Minute Less Than
  • Minute Greater Than
  • Weekday Number Equal To

In the Value column enter a value to compare against. This can contain %variable% replacements.

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.

Contains / Does Not Contain Wildcards

The Contains and Does Not Contain match types can use wildcards in the value. For example: If value was 'good ,' - then this would match for a string containing 'Good Morning,' AND 'Good Afternoon,'. The Contains/Does Not Contain* matches are case-insensitive.

Wildcard character Matches
? Any single character
* Zero or more characters
# Any single digit
[charlist] Any single character in charlist
[!charlist] Any single character not in charlist

Contains One Of/Contains All Of Match Types

For the Contains One Of or Contains All Of match types you can enter multiple words or phrases. For Contains One Of the If field must contain at least one of the values. For Contains All Of it must contain all of the values. Both Contains One Of and Contains All Of use case-insensitive matching. Individual words/phrases can contain wildcards.

For example: Suppose we want to check that the message body (%Msg_Body%) contains 'Red' AND 'Blue' AND 'Green' - we would use Contains All Of and set the value to 'Red,Blue,Green'.

Individual words or phrases in the list can contain %variable% replacements. For example, you could use 'Red,Blue,%MyColor%' - %MyColor% will be replaced before the condition is checked.

Word Matches

By default the Contains One Of and Contains All Of match types match text anywhere, so if Contains One Of contained 'request' it would match for 'request' and 'requested' etc. To match whole words only, enclose the word or phrase in square brackets. For example: If we want to check that the message subject contains 'support' AND 'request' we would use Contains All Of and set the value to 'support,[request]'. This would match if the subject was 'New support request', but would NOT match if the subject was 'Support was requested'.

RegEx Matches Match Type

For RegEx Matches match type the value must be a valid Regular Expression. The match will be true if the If value contains one or more matches. For example: To check that the message body contains a ZIP code, set the If to %Msg_Body% and use the RegEx Matches match type with the value set to *\b\d{5}(?:[-\s]\d{4})?\b*

Comparing Numeric Values

If the If value and the value both contain numeric values then the Equal To, Not Equal To, Less Than, Greater Than, Less Than Or Equal To and Greater Than Or Equal To comparisons compare the numeric values rather than string literals. So '1000.00' and '1,000' would be evaluated as equal.

Comparing Date Values

Where the If value is a date or datetime (for example: %Msg_Date%), you can use:

  • Date Only Equal To/Less Than/Greater Than : where value is also a date or datetime. Compares the date only portions (ignoring the time).
  • Hour Greater Than/Less Than : where value is a number. Compares the hour value of the time.
  • Minute Greater Than/Less Than: where value is a number. Compares the minute value of the time.
  • Weekday Number Equal To : where value is a number. Compares the day of week value (0=Sunday,1=Monday..6=Saturday).

You can also use other match types (Equal To, Not Equal To, Greater Than etc) where the If value is a date/datetime and the value is a date/datetime. In these cases the dates are converted to yyyy-mm-dd hh🇲🇲ss format and then compared.

Example If Block

If %Msg_To% Contains support Then
    If %Msg_Subject% Contains One Of urgent,ticket Then
        // Support Email
        If %Msg_Date% Hour Greater Than 8 And %Msg_Date% Hour Less Than 18 Then
            // Day time
            Send Teams Message To Support Team "Support Request: %Msg_Subject%" For User Support
        Else
            // Out of hours
            Send Email To outofhours@mycompany.com "Support Email: %Msg_Subject%"
        End If
    End If
End If  

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 %variable% 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
  • Contains One Of (list of words or phrases)
  • Contains All Of (list of words or phrases)
  • Starts With
  • Ends With
  • Else

Enter a Value or %variable% 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.

Contains / Does Not Contain

The Contains and Does Not Contain match types can use wildcards and are case-insensitive.

Contains One Of/Contains All Of Match Types

For the Contains One Of or Contains All Of match types you can enter a list of words or phrases. For Contains One Of the Select Case Value must contain at least one of the values. For Contains All Of it must contain all of the values. Both Contains One Of and Contains All Of use case-insensitive matching. Individual words/phrases can contain wildcards.


For Each Loop.. Next Loop

Allows you to create a loop based on the following:

  • Message Recipients (All, To, CC or BCC)
  • Message Attachments (Regular Attachments, Inline Attachments only or both)
  • Message Keywords
  • Message Headers
  • Extracted Fields
  • List values contained in a List (See: List Operation)
  • 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)
  • Json Member in
  • 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 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 Comma Separated Values In, the In value will be split on commas. Quoted values will be handled. For example, if Comma Separated Values In contained:

1997,Ford,E350,"Super, luxurious truck"

.. then the loop would be executed 4 times with values:

  1. 1997
  2. Ford
  3. E350
  4. Super, luxurious truck

When looping on Json Member In the In value can be assigned any Json text. The loop will execute for each member. The Start At Path can be optionally set to a Json path (using dot notation). You can assign each member Name and Value to variables. See: Looping Through Json Member Values Using For..Each

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.

Exit Loop

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. Processing will continue with the action following the Next Loop action.

Continue Loop

The Continue Loop action moves processing to the Next Loop action. The loop will continue with the next iteration of the loop - or exit the loop if there are no more iterations. You can place the Continue Loop action in an If block if you need to move to the next iteration 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. Labels cannot be placed inside If, Select Case or For Each blocks.


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 (regardless of the current Log Level). The Comment text can contain %variable% replacements. Comment text will be truncated if longer than 1000 characters.

If the Show Notification In ThinkAutomation Studio option is enabled then the comment will appear in the ThinkAutomation Studio for any active Studio users as a notification when the Automation executes. The Message Processor will limit studio notifications to 500 per processed message to prevent the Studio being overloaded.

If you have used the Studio Send Message option to send a manual message to an Automation then any Comment actions will show in the response, regardless of the Show Notification In ThinkAutomation Studio or Show In Log options.


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 of the current message when an error occurs, send a notification email 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.


Create Web Form Redirect

The Create Web Form Redirect action is used on Automations called from a Web Form or Web Chat Message Source.

It can be used to redirect the submitted Web Form to another ThinkAutomation Web Form, Web Chat or external URL after the form is submitted. You can also pre-populate field values on the new Web Form with custom values or %variable% replacements created in the Automation.

Using the Create Web Form Redirect action allows you to create interactive forms that display new forms based on values submitted on a previous one.

When you create a web form redirect the redirect details are stored in a ThinkAutomation variable (selected from the Assign To list). You include this %variable% in your Automation Return value to trigger the redirect on the web form. You can create multiple Create Web Form Redirect actions and conditionally return the one you want to execute.

In the Redirect To list select Another ThinkAutomation Web Form or URL. If redirecting to an external URL enter the URL or use a %variable% replacement.

Another ThinkAutomation Web Form Or Web Chat Form

You must now choose another Web Form or Web Chat Message Source that you want to the user to be shown after the current one is submitted. You can create multiple Web Form and Web Chat Message Sources within a Solution. The current Web Form must have the Wait For Automation option enabled.

Pre-Populate New Web Form Fields

You can optionally pre-populate fields on the redirected web form. In the Value column of each field enter a value or select a field/variable. When the new web form is displayed, its field values will be automatically set. You can also define fields on the web form as hidden by default if you want to pre-populate a hidden field.

Delay Before Redirect

If a value (in seconds) is entered here then there will be a delay before the new Web Form is shown.

Assign To

Select the ThinkAutomation variable to receive the redirect properties. This %variable% must be included in the Automation Return value. The Automation return value can also contain other text if you want to display a response to the user. As long as the redirect %variable% is included somewhere in the return value then the redirect will execute.

You can conditionally return different redirects, for example:

If %ContactType% Equal To Customer Then
    Redirect = Create Webform Redirect To NewCustomerForm Pre-Populate Name=%Name%
Else
    Redirect = Create Webform Redirect To NewSupplierForm Pre-Populate Name=%Name%
End If
Return Contact Accepted. One moment please %Redirect%

Create Chat Input Request

This action is used on Automations called from a Web Chat Message Source.

It can be used to create one or more buttons or input fields that are returned to the chat session. The user can click a button or input a value to send back a specific response. For example, you could ask 'Which product do you use?' followed by buttons for each product. The user can click one of the buttons to answer the question. Or you could create an input to request specific text, numbers or dates etc.

When you create a chat input request, the form details are stored in a ThinkAutomation variable (selected from the Assign To list). You include this %variable% in your Automation Return value to trigger the form display in the web chat. You can create multiple Create Chat Input Request actions and conditionally return the one you want to be displayed to the user.

In the Ask For Inputs list click Add Input to create an input request.

Select the Input Type. This can be:

  1. Button Response : Shows a button that when clicked submits the text in the Send Response On Click entry. You can change button color using the Button Style selector.
  2. Button Link : Shows a button then when click launches a web URL in the user browser.
  3. Input Field Response : Shows an input field. Click the Edit Properties button to configure the input field. You can specify the Prompt text, field type (text, number, date etc) and any validation rules.

You can create multiple buttons or fields.

Assign To

Select the ThinkAutomation variable to receive the input request properties. This %variable% must be included in the Automation Return value. The Automation return value can also contain other text if you want to display a response to the user above the buttons/form.

When your Automation returns the %variable% containing the input request the buttons and/or form fields will be displayed to the web user in the chat session.

When the user clicks on one of the buttons the Send Response On Click text will be sent back to your Automation (as if the user had typed it).

For input forms, all form field values are sent in a single message, in the format:

FieldName: value
FieldName: value

Debugging Automations

During Automation development you can debug your Automation regardless of the Message Source type.

Before debugging you first set one or more Breakpoints. Select an Automation line and click the Toggle Breakpoint button or click the breakpoint column in the Actions List. If you want to step through the entire Automation, set a breakpoint on the first line.

Once a breakpoint is added click the Debug button on the Automation actions list toolbar. Enter the message text and click Send. You can also drop files onto the send message textbox. Any .eml or .msg files will be converted to emails and sent. Any text files will be converted to message text. Any other sort of files will be added as attachments and sent.

You should send a new message in the format that the Automation expects.

The test message will start processing immediately. The message processor will pause execution at the first breakpoint. The Debug window will show in the Studio. This contains the current value of each variable and the current Automation log.

Once processing hits a breakpoint you can start stepping through your actions:

  • Click Step Next (or press F8) to continue processing the next action. As you step through the actions the current variable values displayed will be updated. The currently executing line will be highlighted.

  • Click Continue To Next Breakpoint to process all actions until the next breakpoint (or all remaining actions if no more breakpoints are defined).

  • Click Stop Debugging to end processing (no more actions will be processed).

The Variable Values list shows each Automation Variable, Extract Field & List names along with their current values. This list will be updated as you step through the actions. If a variable contains multiple lines of text, only the first line will be visible. Click the variable value to view all lines. Only the first 5000 characters of a variable value is shown.

Debugging Notes

  • If your Automation calls another Automation using the Call action then debugging will automatically switch to the called Automation and return to the parent Automation after the call is completed.
  • You cannot edit the Automation during debugging. You can open an Action to view its properties however.
  • Debug messages are processas a separate task so will not affect normal message processing.
  • Debug messages are processed by the Message Processor as with regular processed messages. If you debug an Automation from the Studio running on a remote computer, the message is still processed by the Message Processor service running on the remote ThinkAutomation server.
  • When stepping through actions - the Message Processor will wait a maximum of 1 hour for you to continue with the next action before aborting the debug session.
  • Debug messages are added to the Message Store as with regular messages.

Testing Without Debugging

Click the Debug button on the Automation actions list toolbar without setting any Breakpoints. Enter the message text and click Send. You can also drop files onto the send message textbox. Any .eml or .msg files will be converted to emails and sent. Any text files will be converted to message text. Any other sort of files will be added as attachments and sent.

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

Use the Comment & Return actions to provide feedback. Comments can include %variable% replacements, so if you need to see the value of a variable - simply add a Comment action containing the %variable% name.

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

You can reprocess any existing messages stored in the Message Store. See: Viewing The Message Store - Reprocessing Messages.


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.

The number of revisions stored is set in the Server Settings - Revision Saving.


Automations Library

You can save a copy of any Automation to the Automations Library. You can also create Automations directly in the library. The Call action can call Automations in the library. This is useful when you have a specific Automation that is called from multiple Automations in different Solutions. Rather than creating multiple copies of the same Automation in different Solutions, you can have a single version and call it from any other Automation.

To save an Automation to the library click the Save To Library button on the Automation toolbar.

To view the Library, select Open Library Automations from the Solution selector. You can add/edit/delete Automations in the library.

The Automations Library is also used when creating new Automations. When you select the New Automation button to create a new Automation. The New Automation dialog lists all current Automations and Automations in the library. You can select any of these to create the new Automation from. The New Automation will then be created based on the selected Automation. This is useful when you need a base Automation template to use to create new Automations from.

Viewing The Online Library

Click the Explorer Online Library button to open the Online Library Explorer. The Online Automation Library contains sample Automations created by Parker Software and Automations shared by other ThinkAutomation users. You can select an Automation in the online library and click the Install button to download it and add it to your local library.

Sharing Your Automations

If you have created an Automation that would be useful to share with other ThinkAutomation users, you can upload it to the online library. First save your Automation in your library using the Save To Library button on the Automation toolbar. Then open the library, right-click the Automation and select Upload To Online Library. The Automation will be uploaded. It will appear in the online library once it has been verified by Parker Software.


Sending Manual Messages

You can send manual messages to any Automation regardless of its configured Message Source. Select an Automation in the Explorer view and click the Send Message button on the ribbon. You can specify from/to addresses & subject text. You can also add attachments. Enter the Message Text and click the Send button.

If the Automation has any Extract Field actions you can optionally click the Enter Field Values button. This will display a form where you can enter specific field values.

Messages sent with the Send Message form will be processed immediately. The Return value (if any) for the Automation will be displayed, along with any Comment action values.

Dropping Files

You can also drag and drop any file on to the Send Message form. These will be sent to ThinkAutomation for immediate processing. Any text files dropped will be converted into plain text emails. HTML files will be converted to HTML emails. Email messages (EML files) and Microsoft Outlook messages (MSG files) can also be dropped. Any other file types will be added as an attachment to a plain text email before being sent to ThinkAutomation. You can drag & drop multiple files in a single drag/drop operation. Each file will be treated as a separate message.

Network users can also use the ThinkAutomation Desktop Connector to send manual messages for processing. See: The ThinkAutomation Desktop Connector Application for more information.


Automation Properties

When editing an Automation click the Properties tab to view/edit general Automation properties:

You can change the Automation Name and Details. These are text fields that can contain any text to describe the Automation. You can also provide a Group Name. Automations with the same group name will appear grouped together in the Explorer view.

You can enable or disable an Automation with the Enabled option. You can also enable/disable an Automation by right-clicking it in the Explorer. If an Automation is disabled no new messages will be processed. Messages will remain in the queue until the Automation is enabled.

Concurrent Execution

The Message Processor service processes Automations. Separate Automations process messages concurrently. By default each incoming message for an Automation is processed one message at a time in the order that incoming messages were received.

If the Allow Concurrent Execution option is enabled then the Message Processor will process multiple messages for the same Automation concurrently. This setting is disabled by default on new Automations. It should not be enabled if the Automation should process messages in the same order that messages are received or that may be updating a file or database that does not support multi-user access. For example: If a Database Pull Message Source reader reads records from a database and the Automation saves those records to a CSV file, then if concurrent execution is enabled there is no guarantee that the CSV rows will be in the same order as the Database Pull records.

When Allow Concurrent Execution is not enabled then separate Automations will still process messages concurrently but a single Automation will only process one message at a time in the order that the messages were received. See Also: Server Settings - Message Processor.

Save Outgoing Messages To Sent Items

If this option is enabled then any outgoing emails sent using the Send Email action are saved in the Message Store database. You can view Sent Items when viewing the Message Store. Disable this option if you do not need to view sent items. This will improve performance and decrease the size of the Message Store database. Sent Items can be automatically deleted from the Message Store by specifying the retention days on the Solution Properties Keep Sent Items For (Days) entry.

Flag Message As Failed On Outgoing Email Fail

If this option is enabled then any outgoing emails sent using the Send Email action that fail to send (after any retries) will flag the processed message as failed. This Message Source will also be paused and a notification will show in the Studio (if the Pause Message Source On Automation Errors option is enabled). Outgoing emails are sent by the main ThinkAutomation Server and there could be several retries before an eventual fail (for example if your outgoing email server is down). Therefore, the executed message in the Message Source could show as executed successfully, and then later be marked as failed.