Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The script must be uploaded to the LogicHub (drag and drop script file to Automations > Scripts).

Operator Usage in Easy Mode

  1. Click + on the parent node.
  2. Enter the Call Script operator in the search field and select the operator from the Results to open the operator form.
  3. In the Input Table drop-down, enter or select the table containing the data to run this operator on.
  4. In the Script Name drop-down, select the name of the script.
  5. In the Args drop-down, select one or multiple column names to use as arguments for the script.
  6. In the Time between Calls field, enter a value in seconds, minutes, hours, days, or weeks.
  7. Click Run to view the result.
  8. Click Save to add the operator to the playbook.
  9. Click Cancel to discard the operator form.

Usage Details

LQL Command

Code Block
callScript(inputTable, scriptName, args, timeBetweenCalls)

...

args are the columns names (such as ["user", "accessCode"]). From the script they are accessed using sys.argv[1] and so on. To produce output to the table, you must print the result. See examples below for more information.

Example 1

Table = "users"

firstNamelastNameemailAddress
EmilBilgazyevemil@logichub.com

...

firstNamelastNameemailAddressoutputexitCodeerror
EmilBilgazyevemil@logichub.comBILGAZYEV Emil works at LOGICHUB

Example 2

If the script produces multiple rows for each row, you must print them as an array of JSON objects that will get populated into columns and rows.

...