Utilities

Version: 2.1.8

Bucket for miscellaneous utility integrations

Connect Utilities with LogicHub

  1. Navigate to Automations > Integrations.
  2. Search for Utilities.
  3. Click Details, then the + icon. Enter the required information in the following fields.
    • Label: Enter a connection name.
    • Reference Values: Define variables here to templatize integration connections and actions. For example, you can use https://www.{{hostname}}.com where, hostname is a variable defined in this input. For more information on how to add data, see 'Add Data' Input Type for Integrations.
    • Verify SSL: Select option to verify connecting server's SSL certificate (Default is Verify SSL Certificate).
    • Remote Agent: Run this integration using the LogicHub Remote Agent.
  4. After you've entered all the details, click Connect.

Actions for Utilities

Render Template

Render a given Jinja2 template with the column values of the parent table. Note that the template text is output-agnostic, so it can be Markdown, HTML, or whatever format you like.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Template TextThe Jinja2 template text.
Example: Here is some sample text with {{columnName}}.
Required
Auto-escape HTMLSpecify whether the substituted text should be automatically HTML-escaped. It is a select type field with two options - Yes and No.Required
Render NumberJinja-template for the number of times a Jinja2 template need to be rendered (Default is 1).Optional

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • result: A JSON with rendered jinja2 template as shown in Fig 3. The input to integration is in Fig 2.

Figure 1

1930

Fig 1

Figure 2

1340

Fig 2

Figure 3

1256

Fig 3

Render Template Across Entire Table

Render a given Jinja2 template with the column values of the parent table. Note that the template text is output-agnostic, so it can be Markdown, HTML, or whatever format you like.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Template TextThe Jinja2 template text. Here is some sample text with {{rows}}.Required
Auto-escape HTMLSpecify whether the substituted text should be automatically HTML-escaped. It is a select type field with two options - Yes and No.Required

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • result: A json with rendered jinja2 template as shown in Fig 6. The input to integration is in Fig 2.

Figure 4

1318

Fig 4

Figure 5

1154

Fig 5
The output is HTML-escaped

Figure 6

1244

Fig 6
The output is not HTML-escaped

Extract with Regexes

Searches for regexes in the input data, returns matching groups.

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
The regexes to searchA YAML dictionary with the regexes to use - keys are the column names, values are the regexes to use. Regexes need to have one group.Required
The column with the data to analyzeColumn from the parent table containing data to analyze.Required

Output

A JSON object containing multiple rows of result:

  • has_error: True/False
  • error: message/null
  • result: A JSON containing values matched with regex as shown in Fig 8. The input to integration is in Fig 2.

Figure 7

1326

Fig 7

Figure 8

1334

Fig 8

Generate Random String

Generates random string

Input Field

Choose a connection that you have previously created and then fill in the necessary information in the following input fields to complete the connection.

Input NameDescriptionRequired
Length of the StringJinja-templated number containing the length of the string (Default is 16).Optional
Number of DigitsJinja-templated number containing the number of digits (Default is 2).Optional
Number of SymbolsJinja-templated number containing the number of symbols (Default is 2).Optional
Number of Uppercase LettersJinja-templated number containing the number of uppercase letters (Default is 2).Optional
Number of Lowercase lettersJinja-templated number containing the number of lowercase letters (Default is 2).Optional

Output

JSON containing the following items:

{
   "text":"nGA1o2uCIq+w0^84zix{",
   "has_error":false,
   "error":null
}

Release Notes

  • v2.1.8 - Bug fix: Render Template breaking when no input is given in Render Number.
  • v2.1.4 - Changed from python2 to python3 for vulnerability fix.
  • v2.1.0 - Added 1 new action: Generate Random String,
  • v2.0.0 - Updated architecture to support IO via filesystem
  • v1.1.0 - Bug fix: Deprecated Render Template action and replaced it with the new one with the fix for escaping character's bug.
  • v1.0.13 - Added Render Number optional field to Render Template action.
  • v1.0.10 - Added documentation link in the automation library.

© Devo Technology Inc. All Rights Reserved.