Network Actions
The Network Actions allow your Automations to interact with external systems and network resources. These actions enable you to perform DNS lookups, test network connectivity, and execute remote commands over SSH. They are typically used for validation, monitoring, system administration, and triggering workflows on remote servers or devices. Network Actions are useful when integrating ThinkAutomation into broader infrastructure environments, performing checks before processing data, or orchestrating tasks across multiple machines.
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 %variable% 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!"
To enable the Remote SSH server on a Mac, use System Preferences - Sharing. Enable the 'Remote Login' option.