Utilities
Version: 2.1.8
Bucket for miscellaneous utility integrations
Connect Utilities with LogicHub
- Navigate to Automations > Integrations.
- Search for Utilities.
- 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.
- 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 Name | Description | Required |
---|---|---|
Template Text | The Jinja2 template text. Example: Here is some sample text with {{columnName}}. | Required |
Auto-escape HTML | Specify whether the substituted text should be automatically HTML-escaped. It is a select type field with two options - Yes and No. | Required |
Render Number | Jinja-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
Figure 2
Figure 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 Name | Description | Required |
---|---|---|
Template Text | The Jinja2 template text. Here is some sample text with {{rows}}. | Required |
Auto-escape HTML | Specify 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
Figure 5
Figure 6
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 Name | Description | Required |
---|---|---|
The regexes to search | A 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 analyze | Column 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
Figure 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 Name | Description | Required |
---|---|---|
Length of the String | Jinja-templated number containing the length of the string (Default is 16). | Optional |
Number of Digits | Jinja-templated number containing the number of digits (Default is 2). | Optional |
Number of Symbols | Jinja-templated number containing the number of symbols (Default is 2). | Optional |
Number of Uppercase Letters | Jinja-templated number containing the number of uppercase letters (Default is 2). | Optional |
Number of Lowercase letters | Jinja-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 inRender 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 filesystemv1.1.0
- Bug fix: DeprecatedRender 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 toRender Template
action.v1.0.10
- Added documentation link in the automation library.
Updated about 1 year ago