Chapter 5 - Actions

tBOT > tBot User Manual
Download Action
There are two types of actions
  1. tFlow - tBot is connects to tFlow via http and uses the tFlow API to connect, publish the queues and exchange data.
  2. FTP - tBot can be used as FTP client to manage remote files
 
How to Connect tBot to tFlow
 
1.  Create a service user in tFlow
    a.  Login into tFlow with an account that has admin rights.  Go to Users and create a new account.
    b.  Name it "tBot" (without the quotation marks). 
    c.  Set is as an admin.
    d.  Assign it to the main instance company. 
    e.  Make sure the flags for "Auto-assign this user to new Orders" and "Auto-assign to new company" are checked.
    f.  In the email address field just enter a fake email address like "tbot@domain.net".
    g.  Disable all the email notifications for this user (Email alerts)!
 
 
You can find additional information here:
 
 
2.  Log into tFLOW with the tBot user you just created.
    a. Click on the user avatar located in the upper right corner and then select "My profile"
    b. On the Profile tab, scroll to the bottom of the page and click on "Show API credentials"
    c. Copy the API key and the Secret key.
 
 
3.  Configure the tBot download action in tBot:
 
    a. Choose “tFlow” as the data source (default value).  Note: One tBot instance can only contain one type of source(Automation Hub or tFlow). There is no limit for FTP source.
    b. Enter the tFlow server url in field 1(Example: http://testtflow.com:8080/ - only the root url is required)
    c. Enter the API key from Step 2c
    d. Enter the Secret key from Step 2c
    e. Choose the “Download folder” which is the local directory where downloaded files will be saved. (You can type the directory or press F2/ellipsis to open the directory selection)
    f.  Choose the interval to check new files on the server
    g. Choose retrieve interval and attempts count
    h. You can group files in the “Download folder” by the customer’s name or order number. This means that tBot will create a special folder for the customer’s name or order in the “Download folder” and put related files in this directory.
    i.  Choose the file type to download. You can select Production (default value) or Proof file
    j.  Click “Test Connection”. You should see a message that the connection settings are valid.
 
 
 
How to Connect tBot to an FTP Server
 
  1. Choose “FTP” as the data source 
  2. Enter the FTP server url to field 1(Example: ftp.myserver.com - only the root url is required)
  3. Enter the FTP port in field 3 (21 is the default value for most FTP servers)
  4. Fill remote path in field 4 to scan on FTP (for root path leave “/” value)
  5. Fill the Login in field 5 or leave it blank to use an anonymous account
  6. Fill the Password in field 6 or leave it blank to use an anonymous account
  7. Choose the “Download folder” - local directory for downloaded files (You can write it by hand or press F2/ellipsis to open the directory selection dialog )
  8. Choose the interval to check for new files on the server
  9. Choose the retrieve interval and attempts count
  10. Click “Test Connection”. You should see a message that the connection settings are valid.
 
 
How to Configure tBot Batches
 
tBot allows you to process multiple downloaded files at once. Batch parameters are configured in the “Download” action and can be used for several integrations and all other actions. Integrations which support batches include:
  • Impostrip integration
  • Ergosoft integration
  • Griffin integration
  • Phoenix integration
tBot supports three types of triggers - Fill Flat, Time and Job Count. When a trigger event occurs, tBot process all files in the batch at once.
 
 
How to Configure Fill Flat Trigger for Batch
  1. Select “Fill flat” from the trigger list.
  2. Set the maximum media size.  When the newly-downloaded file exceeds this size, the trigger event will occur.
  3. Set the “Calculate flat include quantity” flag if you want to include the quantity of copies from tFlow, otherwise, each file will be calculated in flat only once
  4. Set the maximum timeout for the trigger event. In the example below, the event will be generated after 600 minutes from the time the first file was included in the batch.
 
How to Configure Time Trigger for Batch
  1. Select “Time” from the trigger list.
  2. Set the maximum timeout for the trigger event. In the example below, the event will be generated after 60 minutes from the time the first file was included in the batch.
 
 
How to Configure Job Count Trigger for Batch
 
  1. Select “Job count” from the trigger list.
  2. Set the maximum count of files to include in the batch.  When the number of newly downloaded files exceeds this quantity, the trigger event will occur.
  3. Set the maximum timeout for the trigger event. In the example below, an event will be generated after 30 minutes from the time the first file was included in the batch.
 
 
 
 
tBot Integrations with Third Parties
 
Currently, the integration is only available for tFlow data source.  Follow the steps below to configure your integration:
  1. Choose the destination system in list
  2. Fill the required parameters
  3. You can find more information about settings and examples in this section of the tBot manual.
 
Move Action
This action allows you to move and rename files from one directory to another.  To configure a move action, follow the steps below:
 
 
 
  1. Add  the actions to the action list:
  2. Set action parameters:

    a. Set the input folder. If you leave it blank files from the previous step will be processed.
    b. Configure the filter options. Only files that meet filter conditions in the Input folder will be processed
    c. Set output folder.  This is the destination for the downloaded files.
  3. Filter option list:
    a. Match field:
      File name – search pattern in filename
      Extension – search patter in file extension
      File size – filter by file size
      File date– filter by file date
    b. Match type:
      Equal
      Not equal
      Contains
      Not contains
      Starts with
      Ends with
      Regex
    More/less than
    Between
    c. Condition value (or values for between type)
    d. Choose “Ignore case” if you want to make case insensitive filter for text match type 
  4. Rename options (detailed description for rules can be found in the “Configure Rules and Options” section):
    a.  Add text settings
    b.  Replace text settings
    c.  Add date or time settings
    d. Make sequential
How to Configure tBot Batches
 
How to Configure Fill Flat Trigger for Batch
  1. Select “Fill flat” from the  trigger list
  2. Set maximum media size, when a newly downloaded file exceeds the  summary layout the trigger event will occur
  3. Set the “Calculate flat include quantity” flag if you want to include the quantity of copies from tFlow, otherwise, each file will be calculated in the flat only once
  4. Set the maximum timeout for the trigger event. In the example below, the event will be generated after 600 minutes from the time the first file was included in the batch.
 
How to Configure Time Trigger for Batch
  1. Select “Time” from the trigger list
  2. Set the maximum timeout for the trigger event. In the example below, the event will be generated after 60 minutes from the time the first file was included in the batch.
 
How to Configure Files Count Trigger for Batch
  1. Select “Files count” from the trigger list.
  2. Set the maximum count of files to include in the batch.  When the newly-downloaded file exceeds this quantity the trigger event will occur.
  3. Set the maximum timeout for trigger event. In the example below, the event will be generated after 30 minutes from the time the first file was included in the batch.
 
 
Copy Action
This action allows you to copy and rename files from one directory to another.   To configure the copy action, follow the instructions below:
  1. Add an action to the action list:

     
  2. Set the action parameters:

    a. Set input folder. If you leave it blank, files from the previous step will be processed.
    b. Configure filter options. Only files that meet filter conditions in Input folder will be processed
    c.Set output folder – destination place for files.
     
  3. Filter option list:
    a. Match field:
    File name – search pattern in file name
    Extension – search pattern in file extension
    File size – filter by file size
    File date– filter by file date

    b. Match type:
    Equal
    Not equal
    Contains
    Not contains
    Starts with
    Ends with
    Regex
    More/less than
    Between

    c. Condition value (or values for between type)

    d. Choose “Ignore case” if you want to make a case insensitive filter for text match type 
     
  4. Rename options (detailed description for rules you can find in section: “Configure Rules and Options”):
    a. Add text settings
    b. Replace text settings
    c. Add date or time settings
    c. Make sequential
Delete Action
This action allows you to delete files from some directory.  To configure a delete action, follow the steps below:
  1. Add Actions to action list:
  2. Set action parameters:

    a. Set the input folder. If you leave it blank, files from previous step will be processed.
    b. Configure filter options. Only files that meet filter conditions in the Input folder will be processed
  3. Filter option list:
    a. Match field:
    File name – search pattern in the file name
    Extension – search pattern in the file extension
    File size – filter by file size
    File date– filter by file date

    b. Match type:
    Equal
    Not equal
    Contains
    Not contains
    Starts with
    Ends with
    Regex
    More/less than
    Between

    c. Condition value (or values for between type)

    d.Choose “Ignore case” if you want to make case insensitive filter for text match type 
 
Upload Action
There are two types of upload actions:
  1. tFlow (tBot is connecting to tFlow via http and is using the tFlow API to connect, publish the queues and upload artwork.)
  2. FTP (tBot can be used as an FTP client to upload files to a remote folder)
 
How to Connect tBot to tFlow
  1. Create a service user in tFlow
    a. Login into tFlow with an account with admin rights.  Go to Users and create a new account.
    b. Name it tBot and set is as an admin user. Assign it to the main instance company and make sure the flags for "Auto assign this user to new Orders" and "Auto assign to new company" are checked.
    c. In the email address field just enter a fake email address like "tbot@domain.net".
    c. Disable all the email notifications for this user.


     
  2. Login into tFLOW as the tBot user.
    a. When logged in, click on the top right on the user avatar and select "My profile"
    b. Scroll to the bottom of the profile page and click on "Show API credentials"
    c. Copy the API key and the Secret key.
     
  3. Configure the tBot upload action:

    1. Choose “tFlow” as the data source (default value)
    2. Enter the tFlow server url in field 2(Example: http://testtflow.com:8080/ - only the root url is required)
    3. Enter the API key you copied in step 2c above
    4. Enter the Secret key you copied in step 2c above
    5. Choose the interval to check for new files on the server
    6. Choose retrieve interval and attempts count
    7. Click “Test Connection”. You should see message that connection settings are valid.
 
How to Connect tBot to an FTP Server
 
  1. Choose “FTP” as  the data source 
  2. Enter the FTP server URL. (Example: ftp.myserver.com - only root URL required)
  3. Enter FTP port (21 is default value for most FTP servers)
  4. Fill the remote path to access on FTP (for root path leave “/” value)
  5. Fill Login or leave it blank to use an anonymous account
  6. Fill Password or leave it blank to use an anonymous account
  7. Choose the interval to check for new files on the server
  8. Choose retrieve interval and attempts count
  9. Click “Test Connection”. You should see a message that the connection settings are valid.
 
Configure Source Folder
  1. Set the action parameters:

    a. Set input folder. If you leave it blank, files from the previous step will be processed.
    b. Configure the filter options. Only files that meet the filter conditions in the Input folder will be processed.
  2. Filter option list:
    a. Match field:
       File name – search pattern in file name
       Extension – search patter in file extension
       File size – filter by file size
       File date– filter by file date
    b. Match type:
       Equal
       Not equal
       Contains
       Not contains
       Starts with
       Ends with
       Regex
       More/less than
       Between
    c. Condition value (or values for between type)
    ​d. Choose “Ignore case” if you want to make a case insensitive filter for text match type 
Configure Upload Parameters
If you use tFlow data source, you will be able to upload artwork for jobs. To do this you need to meet a few conditions:
  1. Job should be in “Waiting for Artwork” or “Waiting for Revision” state
  2. File name of pdf file should be equal to existing job or if you set “Create order if none exists” should be equal to a new order/job name.
  3. You need to fill parameters:
    a. Select the instance user. This user will be assigned to the job. The artwork will be uploaded to the job under this user.
    b. Select the product. This value is needed for order/job creation.
    c. Select the date increment.  This is the count of days from the upload date. This value will be used for the ship date field of the new job/order
 
Print Action
This action allows to print the file which was processed in a previous step.  To configure the print action, follow the steps below:
  1. Add Action to action list:
  2. Select printer:
Transfer Action
This action is used to transfer files between tBot instances.  The tBot instances need to be on different servers. First, you will need to configure the sender instance and then the receiver instance.
 
 
Configure Sender Instance
To configure the sender instance, follow the steps below:
  1. Add a Transfer action to the action list on the sender server:
  2. Set the action parameters:

    a. Choose server type: “Sender”
    b. Fill the server address field with the IP address of the receiver instance
    c. Configure the  connection options: check interval and retries on failure
    d. Click “Test connection”(Receiver instance should be online)
    e. If you see an error message, please check:
       Receiver instance is online.
       The IP address is correct and available.
       Check you brandmauer or antivirus. tBot uses port 10456 to communicate between instances.  This port should be opened for incoming and outgoing connections
  3. Save queue
Configure Receiver Instance
To configure the receiver instance, follow the steps below:
 
  1. Add the Transfer action to action list on the receiver server:
  2. Set action parameters:

    a. Set server type to “Receiver”
    b. Choose sender from list
    c. Set folder for incoming files
    c. Configure connection options
  3. Save queue
 
 
 
 
Configure Rules and Options
 
Adding Name Settings
  1. Click “Add” button and select “Name Settings”

     
  2. Fill the filter parameters(When) and action (Then)

    a. Match field:
       File name – search pattern in file name
       Extension – search patter in file extension
       File size – filter by file size
       File date– filter by file date
    b. Match type:
       Equal
       Not equal
       Contains
       Not contains
       Starts with
       Ends with
       Regex
       More/less than
       Between
    c. Condition value (or values for between type)
    d. Choose “Ignore case” if you want to make case insensitive filter for text match type 
    e. Fill text what you want to add to filtered files
    f. Select position:
       Before file name
       After file name
       As new file extension
     
  3. Click “Remove rule” to delete option
 
Replace Text Settings
  1. Click “Add” button and select “Replace text settings”

     
  2. Fill the source text parameters(When) and new text parameters (Then)
    a. Select replace parameter:
       Full name – search source text in full file name
       Base name  - search in base name, without extension
       Extension – replace only in extension
 
 
 
Date or Time Settings
  1. Click “Add” button and select “Date or time settings”

     
  2. Fill filter parameters(When)


    a. Match field:
       File name – search pattern in file name
       Extension – search patter in file extension
       File size – filter by file size
       File date– filter by file date
    b. Match type:
       Equal
       Not equal
       Contains
       Not contains
       Starts with
       Ends with
       Regex
       More/less than
       Between
    c. Condition value (or values for between type)
    d. Choose “Ignore case” if you want to make case insensitive filter for text match type 
     
  3. Fill Action parameters(Then):
    a. Choose Date type:
       Created –Date, when file was created
       Modified – File Last updated date
       Last opened – Date, when file was opened last time
       Current – Current system time, when file will be processed
    b. Select date format:
       Month Day Year – default value
       Year Month Day
       Day Month Year
    c. Select place to add date time:
       Before file name
       After file name
       As new file extension
    d. Choose date delimiter:
      Space
      Underline
       Dash
       Forward slash
    None  - without delimiter
    e. Set leading zeros to True if you want a full date/time mask (For Example 20160101 instead of 201611)
 
Make Sequential Settings
 
  1. Click the “Add” button and select “Make Sequential”

     
  2. Fill the filter parameters (When). The file will be processed if a file with the same name exists in the destination folder or file matches filter parameters.

    a. Match field:
       File name – search pattern in file name
       Extension – search patter in file extension
       File size – filter by file size
       File date– filter by file date
    b. Match type:
       Equal
       Not equal
       Contains
       Not contains
       Starts with
       Ends with
       Regex
       More/less than
       Between
    c. Condition value (or values for between type)
    d. Choose “Ignore case” if you want to make case insensitive filter for text match type 
     
  3. Fill Action parameters(Then):
    a. Select place to add counter:
       Before file name
       After file name
       As new file extension
    b. Choose start number – 0 is default
    c. Choose delimiter:
       Space
       Underline
       Dash
       Forward slash
       None  - without delimiter
    d. You can pad all numbers to the same length by adding number of digits(For Example if you set value to 3, first sequence will be 001)
 
Job Settings
 
  1. Click “Add” button and select “Job Settings”

     
  2. Fill filter parameters (When). This option is available only for the tFlow data source.

    a. Match value:
       Job name – source files will be filtered by job name
       Job description – source files will be filtered by job description
       Job notes – source files will be filtered by job notes
       Print width – source files will be filtered by job parameter: print width
       Print height – source files will be filtered by job parameter: print height
       Quantity – source files will be filtered by job parameter: quantity
    b. Match type:
       Equal
       Not equal
       Contains
       Not contains
       Starts with
       Ends with
       Regex
       More/less than
       Between
    c. Condition value (or values for between type)