Using Field Replacements

<< Click to Display Table of Contents >>

Navigation:  Trigger Actions >

Using Field Replacements

All actions that have parameters allow you to use %fieldname% replacements. This means you can specify a ThinkAutomation field name, variable, built-in field or constant in the parameter that will be replaced at execution time with the value of the field or 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 'Attachments' action lets 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 '%OrderNumber%.pdf'.


Built-In Fields

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



The original plain text message. (If the message is HTML and has no plain text, ThinkAutomation will create a plain text version and store it here).


The HTML version of the original message (if it has one).


The complete mime text of the message (including attachments).


The original message subject.


The 'To' email address(s). Just the email addresses separated by commas. Name portions are removed.


The To addresses including names (if available).


The 'From' address.


The 'From Name' if available.


The IP address of the sender.


The 'CC' addresses. Just the email addresses separated by commas. Name portions are removed.


The 'CC' addresses including names (if available).


The 'BCC' addresses. Just the email addresses separated by commas. Name portions are removed.


The 'BCC' addresses including names (if available).


The 'Reply To' address.


The 'In Reply To' header.


The 'References' header.


The 'Return-Path header.


The 'Sender' header field.


The date of the message.


The date the message was originally sent.


The total size of the message including attachments (in bytes).


The complete headers section of the email.


A string containing each attachment file name (separated by CrLf).


The number of attachments.


The number of inline attachments.


A string containing the file system location of each saved attachment (if Attachment saving action used).


A string containing each attachment & size separated by commas eg: 'document1.pdf (2mb), document2.pdf (500kb)'


The character set used on the email.


The Unique message identifier.


The GEO-IP City data for the senders IP address.


The GEO-IP Country data for the senders IP address.


The GEO-IP Organization data for the senders IP address.


Unique keywords extracted from the message body (space separated excluding common words).


Unique keywords sorted by word count (highest first).


Unique keywords with word count.


Unique keywords with word count sorted (highest first).


The first 500 characters of the plaintext body with all whitespace removed.


A link to the ThinkAutomation web services viewmessage URL. See: The Message Link URL


A link to the validation web page for the message - used by the Wait For Validation action. See: Wait For Validation


A string containing JSON formatted text for all extracted fields and their values.


The current date.


The current time.


The current hour (0-23).


The current minute (0-59).


The current date & time.


The current date in yyyy-mm-dd format.


The current date & time in yyyy-mm-dd hh:mm:ss format.


The current day of week string.


The current day of the week number (1=Sunday, 2=Monday etc).


The current month number.


The current month name.


The current year number.


This will contain a numeric error number returned from an Action that has failed for some reason.


This will contain a description of the last error.


The current system drive free space in bytes.


The document root folder. Corresponds to ProgramData\Parker Software\ThinkAutomation\{organization name}\


The current trigger execution log for the message.


The name of the ThinkAutomation Account associated with the current message.


The name of the ThinkAutomation Trigger associated with the current message.


The name of your Organization.


The default email address of your Organization.


Used on Actions that use Attachments. When referenced will replace the current filename. The extension will be appended to the resulting string. Eg: %filename%%ordernumber% if used as a filename would result in 'invoice1234.pdf' assuming the current attachment filename was 'invoice.pdf' and %ordernumber% contained '1234'.


Used to execute an InLine function. See InLine Functions.


The current time elapsed since midnight.


You can assign any of the above fields to fields you create in ThinkAutomation. You can also use them directly in any Action parameters.


Dropping Field Names Into Action Parameters

Each Action form includes the Fields Tree:




Drag and drop any field/variable or built-in field to any of the editable Action fields to use that field in the entry. At execution time the %field% will be replaced with its value. You can also directly type any %field% or %variable% into any entry. Click the Add Global Variables button to add a new variable whilst editing any action. You can also create variables by dragging the Set Variable action on to your Actions list.


See Also: Organization Constants


See Also: InLine Functions



ThinkAutomation © Parker Software 2016