TACopy Command Line Utility

The TACopy.exe utility is a command line application that can be used to send messages to ThinkAutomation for processing. It can be run from the command prompt or executed from other applications (such as Windows Task Scheduler, PowerShell, Batch Files or Macro Playback software etc). TACopy can be run on any network computer that can access the ThinkAutomation Server.

TACopy can send plain text messages, files, emails and Outlook messages. Multiple files can be sent in a single operation - with each file being sent to ThinkAutomation as a separate message.

Usage

tacopy {command} [parameter] [/m messagesourceid] [/a automationid] [/w]
                             [/s "subject text"] [/f fromaddress] [/t toaddress] [/b "body text"]
                             [/i serverNameOrIP[:port]]

The /i switch is used to specify the IP address or computer name of the computer running the ThinkAutomation Server. If this is not specified then localhost is assumed.

Commands

Command Details
status Displays the ThinkAutomation Server status.
list Displays a list of Message Sources & Automations along with their ID's.
send Sends messages to ThinkAutomation for processing.

The Send command can be used to send a plain text message - by specifying the body text as part of the command line, or it can read and send files. For plain text or HTML files the content of the file is used as the body of the message. For email files (.eml) and Microsoft Outlook messages (.msg) the complete email is sent including attachments. For any other type of file will be sent as an attachment to a plain text email.

The /m switch must be specified followed by a valid message source Id. The message will then be processed by the default automation assigned to the message source. You can optionally also specify an automation Id (/a) if you want to execute a specific automation (within the same solution). You can find the message source/Automation Id's using the list command, or they can be viewed in the ThinkAutomation Studio.

For send commands you can optionally include the /w switch. If the /w switch is included then TACopy will wait for the automation to complete before showing the Return Value.

Examples:

tacopy SEND C:\Files\document.pdf /m 60e2f87a13d7e5074c1e05a8 /t sales@mydomain.com /i 192.168.1.1 /w

Will create a plain text message with document.pdf added as an attachment and a To Address of 'sales@mycomain.com' and send it to ThinkAutomation for processing and display the automation return value. If no /s subject switch is supplied then the message subject will be set to the filename.

tacopy SEND /s "Subject Text" /f someone@mydomain.com /t sales@mydomain.com /b "Plain text body" /m 60e2f87a13d7e5074c1e05a8

Send a plain text message with the Subject, From Address, To Address and Body specified.

tacopy SEND C:\Emails\*.msg /m 60e2f87a13d7e5074c1e05a8

Sends all Outlook Messages (*.msg) in the folder C:\Emails to ThinkAutomation. The messages will be the full email messages including attachments.

tacopy SEND C:\Files\Body.txt /s "Subject Text" /f someone@mydomain.com /t sales@mydomain.com /m 60e2f87a13d7e5074c1e05a8

Send a plain text message using the contents of C:\Files\Body.txt as the body content.

Using TACopy On Other Computers

TACopy.exe is installed with the main ThinkAutomation Setup and the ThinkAutomation Desktop Connector setup. You can copy it to other computers if you need to send messages via the command line from networked computers.

TACopy does not require installation if you want to use it on its own.

Copy the following files from the ThinkAutomation Program Files folder:

  • TACopy.exe
  • GemBox.Email.Dll
  • Newtonsoft.Json.Dll

Copy these files into a folder of your choice. TACopy can then be executed from there. You should add the folder to the Windows Path environment variable if you want to execute TACopy from any other folder on your system.

Info

TACopy communicates with the ThinkAutomation Server using https on port 9898.

Note

You need to ensure that any remote IP's are added to the ThinkAutomation Whitelist in the ThinkAutomation Server Settings and ensure that port 9898 is open on the ThinkAutomation Server firewall.