System

Common no-code system functionality including flow loops, sub flows and dynamic object control.

Triggers

Web Hook Trigger

A trigger that is externally called via an API. GET or POST methods can be used to call the external API https:///integration/system// when using POST you can optionally include a list of events within a json list.

Input

Name Description Type Required Syntax
Token The security token that will be required along with an access key when calling the API endpoint. It is recommended to leave this as auto generated unless the key becomes known and you wish to change it. input True False
Allow Concurrent Triggers Enable this option to enable the webhook to be executed multiple times concurrently. checkbox False False

Data Trigger

A trigger that contains a static user defined list of events.

Input

Name Description Type Required Syntax
Events Manually defined list of events. json-input False False

Storage Trigger

Load events from an existing storage file in csv, json or txt format.

Input

Name Description Type Required Syntax
Storage ID ID of the existing storage file to load. input True False
File Type Type of file that should be parsed to extract events. dropdown True False

Actions

Reset Trigger

Resets a trigger based on the trigger ID defined within the event data. data[event][triggerID] is the key used when attempting to reset a trigger.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "42": {"description": "No trigger ID found or trigger does not exist."}}

Get Trigger

Get a given trigger's details.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Trigger ID The ID of the trigger for which you would like to get the details. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Trigger does not exist."}}
trigger Returns the trigger in json format. json False {}

Set Trigger

Updates a given field on an existing trigger object with the defined value.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Trigger ID The ID of the trigger for which you would like to update the field. input True True
Field Name of the field within the trigger to update. input True True
Value The value to set the field to for the given trigger. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Trigger does not exist."}}

Enable Trigger

Enables an existing trigger by ID.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Trigger ID The ID of the trigger to enable. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Trigger does not exist."}}

Disable Trigger

Disables an existing trigger by ID.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Trigger ID The ID of the trigger to disable. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Trigger does not exist."}}

Get Action

Get a given action's details.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Action ID The ID of the action for which you would like to get the details. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Action does not exist."}}
action Returns the action in json format. json False {}

Set Action

Updates a given field on an existing action object with the defined value.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Action ID The ID of the action for which you would like to update the field. input True True
Field Name of the field within the action to update. input True True
Value The value to set the field to for the given action. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Action does not exist."}}

Enable Action

Enables an existing action by ID.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Action ID The ID of the action to enable. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Action does not exist."}}

Disable Action

Disables an existing action by ID.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Action ID The ID of the action to disable. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "404": {"description": "Trigger does not exist."}}

Generate Password

Randomly generate a password string.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
length Required length of the password to generate. input True False
lowercase When enabled lowercase characters will occur at-least once in the generated password. checkbox True False
uppercase When enabled uppercase characters will occur at-least once in the generated password. checkbox True False
digits When enabled number characters will occur at-least once in the generated password. checkbox True False
symbols When enabled symbol characters will occur at-least once in the generated password. checkbox True False
blacklist A defined list of characters to exclude from the password i.e. 1li. input False False
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure, password was not generated."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "100": {"description": "Password could not be generated."}}
password Returns the generated password value in plaintext. string False {}

Break

Exits out of a loop or subFlow.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}}

Exit

Exits the currently running trigger.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}}

Collect

Build events into a list based on the size limited provided. Once the list is built the collect object passes the list of events onto the next object.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Use Custom Data Generate a json item to add into the event list instead of using the existing flow event. This option is useful when you want to specify the extract data. group-checkbox False False
Custom Data Item A json item that contains data to be used as the event. json-input False True
Limit When greater than 0 events will be combined into lists up to the maximum value defined. Each time the event list reaches its maximum collect will continue the flow with the event list being returned; once the flow completes for this event collect will continue building another event list to repeat this behavior for all remaining events. input False False
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Flow continuing as event list is built."}, "False": {"description": "Event added to event list."}}
rc Returns the exit code for the action. number True {"0": {"description": "Flow continuing as event list is built."}, "9": {"description": "Event added to event list."}}
event Updates the existing flow event field to contain the list of events. json False {}

Extract

Regular expression extraction of a given string.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Regex Regex extraction string provided in python format. Defined groups are built into json key value pairs. input True True
String The value to preform regex extraction on. input True True
Comment User defined comments. input False False
Type Cast / Replacement Syntax when true extracted dictionary will be type casted and replacement syntax will be enabled checkbox False False
Dot Matches All When true . in regex matches all including newlines checkbox False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}}
extracts Returns the list of extracted json key values. json True {}

Foreach

Loop over a data list of json events.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Manual When selected a user defined manual list of events is used instead of a dynamic list from within the flow data. group-checkbox False False
Event Key Key within flow data that contains a list of json. input False True
Events List Manually defined list of json. json-input False True
Merge Events When selected existing flow event will be merged with the loop event data. If the same key exists in both flow event and loop event then the event loop data will be used during the loop iteration. checkbox False False
Comment User defined comments. input False False
Concurrency When greater than 0 events within the loop will be run concurrently up to the number specified. input False False
Limit A maximum number of events to loop. input False False
Skip The number of events within the list to skip. input False False

Output

Name Description Type always_present values
result Returns True when the loop is iterating and False once completed. boolean True {"True": {"description": "Loop iteration."}, "False": {"description": "Loop completed."}}
rc Returns the exit code for the action. number True {"0": {"description": "Loop iteration."}, "200": {"description": "Loop completed."}}

Global Set

Sets a global variable that can be later retrieved with the globalGet object.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Name Name of the global variable. This should be a unique name! input True True
Value Value to set the global variable to. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}}

Global Get

Retrieve global variable by name.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Name Name of the existing global variable. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}, "100": {"description": "Unable to find variable."}}
variable Variable is automatically defined within the flowData variables when successful and exit code is 0. any False {}

Sleep

Sleep for a defined number of seconds before moving onto the next action within a flow.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Sleep For Number of seconds to sleep. input False False
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}}

Sub Flow

Jump to another flow entry point using a defined trigger ID. SubFlow allows you to call flows as functions passing in and returning data so that flows can be easily reused.

Hints

When a trigger is called by SubFlow it will execute the given triggers doCheck() function changing creating new event data that is then used in the SubFlow. Pointing a SubFlow at a normal trigger will avoid this behavior and preserve the original event data.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Trigger ID The trigger ID to used as a pointer to a flow to jump into. input True True
Comment User defined comments. input False False
Use Custom Event Value When True a user defined event value is used to pass into the sub flow. This field is ignored if event list is defined. group-checkbox False False
Event Value A value that is passed into the sub flow as an event. Supporting replacement syntax means that can point to an existing list of events as well as keys and running functions. input False True
Use Custom Event List When True a user defined list of json events is used. group-checkbox False False
Event List A list of json events to pass into the sub flow. json-input False True
Merge Final Data Value When true the returning flow data will be merged into the existing flow's flow data. checkbox False False
Merge Final Event Value When true the returning event data will be merged into the existing flow's event data. checkbox False False
Merge Final Conduct Value When true the returning conduct data will be merged into the existing flow's conduct data. checkbox False False
Compatibility Version Execution action with the defined compatibility version. dropdown False False
Use New Data Template When True a new data template will be generated. checkbox False False
Max Retries When greater than 0 a sub flow will be reattempted if it does not exit. input False False
Retry Delay When greater than 0 a delay will be applied before reattempting any failed sub flows. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successfully ran sub flow and flow is now continuing."}, "False": {"description": "Failure."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successfully ran sub flow and flow is now continuing."}, "5": {"description": "Unable to find the specified trigger."}}

Sub Flow Return

Exit a subFlow and return true/false as a result via the subFlowResult variable.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Result True/False to determine the subFlow result. checkbox True False
Exit Code Exit code to determine the subFlow result. input True False
Message Any message to describe the subFlow result. input False True
Data Additional data to include in the subFlow result. json-input False True
Comment User defined comments. input False False

Echo

Echos a message into the action output.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Message Message to echo into the action output. input True True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when successful. boolean True {"True": {"description": "Successful."}}
rc Returns the exit code for the action. number True {"0": {"description": "Successful."}}
echo Returns the message. string True {}

Web Request

Call and external web service over HTTP/S and get the response.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
HTTP Method The HTTP method to use e.g. HEAD, GET, PUT, POST, DELETE. dropdown True True
URL Destination URL. input True True
Data Body data to include with the request. input False True
Timeout Request timeout defined in seconds. input False False
SSL Verify When False SSL verification will be disabled. group-checkbox False False
CA Path When Verify is True you can use CA Path to define a custom CA file to use. input False False
Comment User defined comments. input False False
Headers Request headers. json-input False True
Cookies Request cookies. json-input False True

Output

Name Description Type always_present values
result Returns True when successful or 2xx HTTP response code, otherwise False. boolean True {"True": {"description": "Successful 2xx HTTP response code."}, "False": {"description": "Failure due to error or non 2xx HTTP response code."}}
rc Returns the error exit code or HTTP response code. number True {"255": {"description": "An error occurred whilst making the request."}, "555": {"description": "An unknown error occurred."}}
headers Headers returned by the remote server. json False {}
body Body returned by the remote server in json or string format depending on the data type. json string False

Take Snapshot

Start taking an execution snapshot midway through a flow.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when snapshot process is running. boolean True {"True": {"description": "Snapshot running."}, "False": {"description": "Snapshot has been taken."}}
rc Returns exit code depending on state. number True {"0": {"description": "Snapshot running."}, "200": {"description": "Snapshot has been taken."}}

Discard Snapshot

Stop taking an execution snapshot midway through a flow with an option to save its current state.

Input

Name Description Type Required Syntax
_id input False False
Name Display name for the action object. input False False
Enabled Enable / Disable this action object. checkbox False False
Logic Logic that when defined must be evaluated as true for the action object to return True otherwise False will be returned. input False False
Variables Variables to define when triggering an event. var False True
Save when True the current state of the snapshot will be saved. checkbox True False
Comment User defined comments. input False False

Output

Name Description Type always_present values
result Returns True when snapshot process is running. boolean True {"True": {"description": "Snapshot stopped and saved/discarded."}, "False": {"description": "Snapshot not running or could not be discarded."}}
rc Returns exit code depending on state. number True {"0": {"description": "Snapshot stopped and saved/discarded."}, "404": {"description": "Not snapshot is currently being taken."}, "500": {"description": "Snapshot stopped but could not be discarded."}}

Create Data Snapshot

Create a snapshot of the data within a flow for future review.

Output

Name Description Type always_present values
result Returns True. boolean True {"True": {"description": "Data snapshot created"}}
rc Returns exit code depending on state. number True {"200": {"description": "Data snapshot created and stored within snapshots."}, "500": {"description": "Data snapshot created and stored within debug session output."}}

Try Except

Try a portion of flow and handel error as an exception if it occurs.

Output

Name Description Type always_present values
result Returns True when try except is running. boolean True {"True": {"description": "Try except is running."}, "False": {"description": "try except exit."}}
rc Returns exit code depending on state. number True {"0": {"description": "Try except is running"}, "200": {"description": "try except is exit."}, "500": {"description": "Error raised."}}

Raise

Raise an exception.

Input

Name Description Type Required Syntax
Error Message Error message to use when raising the exception. input True True

Output

Name Description Type always_present values
result Never returns as an exception is raised. boolean True {}
rc Never returns as an exception is raised. number True {}

Storage Download

Download and return the file path for a given storage file.

Input

Name Description Type Required Syntax
Storage ID ID of the storage file to download. input True True

Output

Name Description Type always_present values
result Never returns as an exception is raised. boolean True {"True": {"description": "File was downloaded and is ready for use."}, "False": {"description": "Storage file by given ID was not found."}}
rc Never returns as an exception is raised. number True {"0": {"description": "File was downloaded and is ready for use."}, "500": {"description": "Storage file by given ID was not found."}}

Timed

Time connected actions and output when completed the total time taken.

Input

Name Description Type Required Syntax

Output

Name Description Type always_present values
result True for start, False for finished. boolean True {"True": {"description": "Timed function started"}, "False": {"description": "Timed function finished"}}
rc Result code representing the state of the timed function. number True {"0": {"description": "Timed function started"}, "200": {"description": "Timed function finished"}}
time_taken Total amount of time taken to execute all connected actions number False {}

Concurrent

Run several flow paths concurrently.

Input

Name Description Type Required Syntax
Concurrency Number of concurrent paths to run. input True True

Output

Name Description Type always_present values
result True for each path, or false when completed. boolean True {"True": {"description": "Concurrent path started"}, "False": {"description": "Concurrent paths completed"}}
rc Concurrent path ID or 200 when completed. number True {"X": {"description": "Concurrent path number"}, "200": {"description": "Concurrency completed"}}

While

Loop until a condition is True

Input

Name Description Type Required Syntax
Condition Condition that while True will cause the loop to continue input True True
Timeout Maximum amount of time to wait for the condition to become False input True True

Output

Name Description Type always_present values
result Loop start/stop condition boolean True {"True": {"description": "Loop started"}, "False": {"description": "Loop exited"}}
rc State of the loop number True {"X": {"description": "Loop started"}, "200": {"description": "Loop exited"}, "503": {"description": "Loop timed out"}}

Functions

Lists

index(array,*args)

Index provides allows deep nested access to lists or dictionary objects. It is extremely useful when you want to access an list or dictionary element with the reference of another variable

Arguments

Key Description
array Target list or dictionary
arg1 1st reference key
arg2 2nd reference key
arg3 3rd reference key
etc n reference key

Examples

{ "data" : { "var" : { "list" : { "a" : [1,2] }, "x" : "b" } }

index(data[var][list],"a",0)
> 1

index(data[var][list],data[var][x],1)
> 3

append(array,value,copyPointerValues=True)

Add a value to a list object

Arguments

Key Description
array Target list
value Value to append to the list
copyPointerValues When set False only pointers will be used for the appended value meaning that future changes to this value will also update the appended item within the target list

Examples

{ "data" : { "var" : { "list" : { "a" : [1,2] }, "x" : "b" } }

append(data[var][list],3)
> [1,2,3]

append(data[var][list],"this is a test")
> [1,2,"this is a test"]

append(data[var][list],data[var][x])
> [1,2,"b"]

append(data[var][list],length(data[var][x]))
> [1,2,1]

remove(array,index)

Removes an item by index from a list

Arguments

Key Description
array Target list
index Index of the item to remove

Examples

{ "data" : { "var" : { "list" : { "a" : [1,2] } } }

remove(data[var][list],0)
> [2]

removeItem(array,item)

Removes an item from a list

Arguments

Key Description
array Target list
item Item to remove

Examples

{ "data" : { "var" : { "list" : { "a" : [1,"test",2] } } }

removeItem(data[var][list],"test")
> [1,2]

chunk(array,size)

Split a list into multiple chunks of a given size

Arguments

Key Description
array Target list
size Size of the chunks

Examples

{ "data" : { "var" : { "list" : { "a" : [1,2,3,4] } } }

chunk(data[var][list],2)
> [[1,2],[3,4]]

unique(array)

Remove duplicate items from a list

Arguments

Key Description
array Target list

Examples

{ "data" : { "var" : { "list" : { "a" : [1,1,2,2] } } }

unique(data[var][list])
> [1,2]

listFind(array,key,value,regex=False)

Iterates a list of dictionaries hunting for a matching key value within the root directory.It also matches based on a regex and returns all matching dictionaries

Arguments

Key Description
array Target list
key Dictionary key to use when checking for a match
value Value to match for the given key
regex True for matching key value using regular expression otherwise it is false

Examples

{ "data" : { "var" : { "list" : { "a" : [{ "name" : "test" },{ "name" : "test" },{ "name" : "test2" }] } } }

listFind(data[var][list],"name","test")
> [{ "name" : "test"},{ "name" : "test"}]

listFind(data[var][list],"name","test2",regex=False)
> [{ "name" : "test2"}]

listFind(data[var][list],"name","^test2",regex=True)
> [{'name': 'test2'}]

listMatch(array,key,value,regex=False)

Iterates a list of dictionaries hunting for a matching key value or a match based on regex within the root directory returning True when a match is found otherwise False is returned

Arguments

Key Description
array Target list
key Dictionary key to use when checking for a match
value Value to match for the given key
regex True for matching key value using regular expression otherwise it is false

Examples

{ "data" : { "var" : { "list" : { "a" : [{ "name" : "test" },{ "name" : "test" },{ "name" : "test2" }] } } }

listMatch(data[var][list],"name","test")
> True

listMatch(data[var][list],"name","test22")
> False

listFind(data[var][list],"name","^test2",regex=True)
> True

listHash(array,key,lowerKey=False)

Iterates a list of dictionaries and convert the list into a dictionary hash table based on the key you provide

Arguments

Key Description
array Target list
key Key to use when building the hash table
lowerKey When True keys will be put into lowercase

Examples

{ "data" : { "var" : { "list" : { "a" : [{ "name" : "test1" },{ "name" : "test2" },{ "name" : "test3" }] } } }

listHash(data[var][list],"name")
> { "test1" : { "name" : "test1" }, "test2 : { "name" : "test2" }, "test3" : {"name" : "test3" } }

listReverse(array)

Reverse the order of the list

Arguments

Key Description
array Target list

Examples

{ "data" : { "var" : { "list" : { "a" : [1,2,3,4] } } }

listReverse(data[var][list])
> [4,3,2,1]

listRange(value)

Create a new list containing counting numbers to the number provided

Arguments

Key Description
value The number of count to when creating the list

Examples

listRange(5)
> [0,1,2,3,4]

listShuffle(array)

Inplace shuffle of a given list.

Arguments

Key Description
array The list you want to shuffle

Examples

listShuffle([1,2,3,4])
> [3,2,1,4]

listIndex(array,start,end)

Return a subset of an array using start and end

Arguments

Key Description
array The list you want to shuffle
start Starting point of the index
end Ending point of the index

Examples

listIndex([1,2,3,4],0,2)
> [1,2,3]

indexSlice(array,start,end,jump)

Return a sliced array using start, end, and jump values

Arguments

Key Description
array The list you want to shuffle
start Starting point of the index
end Ending point of the index
jump Index jump

Examples

indexSlice([1,2,3,4],0,2,1)
> [1,2]

Base64

base64encode(string,encoding="auto")

Encode a string to base64

Arguments

Key Description
string Target string
encoding The encoding to encode with

Examples

base64encode("test string")
> "dGVzdCBzdHJpbmc="


base64decode(base64String,encoding="auto")

Decode a base64 string to plain string

Arguments

Key Description
base64String Target base64 string
encoding The encoding to decode with

Examples

base64decode("dGVzdCBzdHJpbmc=")
> "test string"

Conversion

getType(x)

Get the type of a given variable

Arguments

Key Description
x Target object to get type

Examples

getType("test")
> str


toInt(x) / strToInt(string)

Convert an object to integer

Arguments

Key Description
x Target object to convert

Examples

toInt("10")
> 10


toFloat(x) / strToFloat(string)

Convert an object to float

Arguments

Key Description
x Target object to convert

Examples

toFloat("1.0")
> 1.0


toBool(x) / strToBool(string)

Convert an object to boolean

Arguments

Key Description
x Target object to convert

Examples

toBool("True")
> True

toBool("")
> False

toBool(0)
> False

toStr(x)

Convert an object to string

Arguments

Key Description
x Target object to convert

Examples

toStr(1)
> "1"


strToBytes(string)

Convert an string object to bytes

Arguments

Key Description
string Target string object to convert

Examples

strToBytes("abc")
> [61,62,63]


bytesToStr(bytes)

Convert an string object to bytes

Arguments

Key Description
bytes Target bytes object to convert

Examples

strToBytes([61,62,63])
> "abc"


lower(string)

Lower case a string

Arguments

Key Description
string Target string object to convert

Examples

lower("Test")
> "test"

lower("FALSE")
> "false"


upper(string)

Upper case a string

Arguments

Key Description
string Target string object to convert

Examples

upper("Test")
> "TEST"

upper("false")
> "FALSE"


toJson(string,**kwargs)

Convert a string object to json

Arguments

Key Description
string Target string object to convert
kwargs Options to pass to the json.loads function

Examples

toJson("{ \"name\" : \"test\" }")
> { "name" : "test" }


fromJson(json,indent=False,**kwargs)

Convert a json object to string

Arguments

Key Description
json Target json object
indent When True indents will be used in the output
kwargs Options to pass to the json.dumps function

Examples

fromJson({ "name" : "test" })
> "{ \"name\" : \"test\" }"


jsonToHtml(json,wrap=False)

Convert a json object to HTML

Arguments

Key Description
json Target json object
wrap When True the json object will be wrapped before converting

Examples

jsonToHtml({"test":123,"test2":456})
> <table border="1"><tr><th>test</th><td>123</td></tr><tr><th>test2</th><td>456</td></tr></table>

Date and Time

now(milliseconds=False)

Arguments

Key Description
milliseconds Whether to return in milliseconds (otherwise it will be in seconds)
now()
> 1719931421.5012567

day()

Examples

day()
> "Tuesday"

isWeekDay()

Returns true if the current day is a Weekday.

Examples

isWeekDay()
> True

isWeekend()

Returns true if the current day is a Weekend.

Examples

isWeekend()

year()

Examples

year()
> 2024

month()

Examples

month()
> 7

dt(format="%d-%m-%Y",epoch=None)

Arguments

Key Description
format The format of the date string. Based on https://strftime.org/
epoch A specific time to provide, otherwise uses now

Examples

dt(epoch=978331421.5012567)
> "01-01-2001"

dt(format="%a %m %B", epoch=978331421.5012567)
> "Mon 01 January"


isLastDay(workingDays=False)

Returns True or False depending on whether it is the last day of the month.

Arguments

Key Description
workingDays Whether to return True only if it's the last working day of the month

Examples

isLastDay()
> False

dateBetween(startDateStr, endDateStr, dateStr=None)

Returns True or False depending on whether the provided date is between the start and end date.

Arguments

Key Description
startDateStr The beginning date in %H:%M %d-%m-%y format
endDateStr The ending date in %H:%M %d-%m-%y format
dateStr A date in %H:%M %d-%m-%y format. Defaults to now.

Examples

dateBetween("00:00 01-01-2024","23:59 20-01-2024","12:00 10-01-2024")
> True

dateBetween("00:00 01-01-2024","23:59 20-01-2024","12:00 30-01-2024")
> False

timeBetween(startTimeStr, endTimeStr, timeStr=None)

Similar to dateBetween but only for time.

Arguments

Key Description
startTimeStr The beginning time in %H:%M format
endTimeStr The ending time in %H:%M format
timeStr Time in %H:%M format. Defaults to now

Examples

dateBetween("00:00","12:00","07:30")
> True

dateBetween("00:00","12:00","14:00")
> False

datetimeToEpoch(datetimeStr,format="%Y%m%dT%H%M%S.%fZ")

Returns the epoch value of the provided datetime string

Arguments

Key Description
datetimeStr The datetime string to parse
format The format of the datetime string

Examples

datetimeToEpoch("2024-01-01","%Y-%m-%d")
> 1704067200

timezoneOffset(tz)

Returns the timezone offset vs system time i.e. +0100 for Europe/London when system is UTC and UK is in BST

Arguments

Key Description
tz Timezone value i.e. Europe/London

Examples

timezoneOffset("US/Central")
> "-0500"

timezoneOffset("Europe/London")
> "+0100"

secondsToDays(seconds)

Returns the duration of seconds to Days, Hours, Minutes, Seconds in a string format.

Arguments

Key Description
seconds Seconds to convert

Examples

secondsToDays(123123)
> "1 day, 10:12:03"

adjustTime(timestamp,value,period="seconds")

Adjust a given timestamp by the given period. Can be positive and negative directions.

Arguments

Key Description
timestamp Default is now. Should be epoch value
value Default is 1, can any negative or positive number
period Default is seconds. The time period to adjust with, out of the following list: seconds, minutes, hours, days, and weeks.

Examples

adjustTime(timestamp=1683798007,value=4,period=weeks)
> "1686217207"
adjustTime(timestamp=1683798007,period=days)
> "1683884407"

Dictionary

newDict()

Create a new empty dictionary

Examples

newDict()
> {}

updateDict(dictionary,keys,value)

Update the value of key or nested key within a dictionary

Arguments

Key Description
dictionary The source dictionary to update
keys A list of keys in nested order
value The value to update the innermost key with

Examples

updateDict({"test":{"nestedTest":123},"test2":456,"test3":789},["test2"],"newValue")
> {'test': {'nestedTest': 123}, 'test2': 'newValue', 'test3': 789}

updateDict({"test":{"nestedTest":123},"test2":456,"test3":789},["test","nestedTest"],"newValue")
> {'test': {'nestedTest': 'newValue'}, 'test2': 456, 'test3': 789}

mergeDict(dictionary1,dictionary2)

Merge two dictionaries together. 2nd dictionary takes priority for merging duplicate keys.

Arguments

Key Description
dictionary1 The first dictionary to merge
dictionary2 The second dictionary to merge. Values in this dictionary will take priority over dictionary1.

Examples

mergeDict({"test":123,"test2":456},{"test2":222,"test3":444})
> {'test': 123, 'test2': 222, 'test3': 444}

uniqueDict(dictionary)

Return all unique keys from the dictionary

Arguments

Key Description
dictionary The source dictionary

Examples

uniqueDict({"test":123,"test2":456})
> ['test','test2']

dictKeys(dictionary)

Return all keys from the dictionary

Arguments

Key Description
dictionary The source dictionary

Examples

dictKeys({"test":123,"test2":456})
> ['test','test2']

dictValues(dictionary)

Return all values stored within the dictionary

Arguments

Key Description
dictionary The source dictionary

Examples

dictValues({"test":123,"test2":456})
> [123, 456]

dictClear(dictionary)

Blank the provided dictionary

Arguments

Key Description
dictionary The source dictionary

Examples

dictClear({"test":123,"test2":456})
> {}

DictListSort(array,key,reverse=False)

Return a sorted list of dictionaries based on a particular key

Arguments

Key Description
array An array of dictionaries
key The key to sort on
reverse Reverse the order of sorting. Defaults to ascending.

Examples

DictListSort([{"count":1},{"count":9},{"count":5},{"count":3}],"count")
> [{'count': 1}, {'count': 3}, {'count': 5}, {'count': 9}]

DictListSort([{"count":1},{"count":9},{"count":5},{"count":3}],"count",reverse=True)
> [{'count': 9}, {'count': 5}, {'count': 3}, {'count': 1}]

Encryption

encrypt(string)

Encrypt a string using A-Ops own encryption method.

Arguments

Key Description
string The string to encrypt

Examples

encrypt("dQw4w9WgXcQ")
> "ENC j1 6g8Cjk5GP4QD3j ... 40qUO6g="

Hash

md5(string)

Hash a string with MD5

Arguments

Key Description
string The string to hash

Examples

md5("a-ops")
> fd6ac2b87fa1ad4d15dd9f4a7475671f

sha1(string)

Arguments

Key Description
string The string to hash

Examples

sha1("a-ops")
> 826319d6ca19619d9e0f2976b95db80d5ffae5f0

sha256(string)

Arguments

Key Description
string The string to hash

Examples

sha256("a-ops")
> 0e576ba85db541f2595cabe576d0b6861a5ce11d61455c0814bb6dd88193e0d9

sha512(string)

Arguments

Key Description
string The string to hash

Examples

sha512("a-ops")
> b489f114435bad6c097a96bfeed95481d2e1e9505e43873803efcb9c55a240d1687802ffb397a7f08a1024ecd2593b69deb08f7f05536be07b90ee7aa7f51866

Maths

sum(*args)

Add one or more values together

Arguments

Key Description
args One or more integers

Examples

sum(1,2,3)
> 6

minus(initialValue,*args)

Subtract one or more values from another value

Arguments

Key Description
initialValue Initial value to subtract from
args One or more integers

Examples

minus(10,1,2,3)
> 4

multiply(initialValue,*args)

Multiple a value by one or more values

Arguments

Key Description
initialValue Initial value to multiply
args One or more integers

Examples

multiply(10,10,10)
> 1000

divide(initialValue,*args)

Divide a value by one or more values

Arguments

Key Description
initialValue Initial value to divide
args One or more integers

Examples

divide(1000,10,10)
> 10.0

powerof(initialValue,*args)

Multiply a value to the power of one or more values

Arguments

Key Description
initialValue Initial value to multiply
args One or more integers

Examples

powerof(2,2,2)
> 16

length(var)

Get the length of a string

Arguments

Key Description
var A string

Examples

length("hello")
> 5

roundNum(var)

Round a value to the nearest whole value

Arguments

Key Description
var A float

Examples

roundNum(1.2)
> 1

roundNum(1.8)
> 2

ceil(var)

Round to the biggest whole value

Arguments

Key Description
var A float

Examples

ceil(1.1)
> 2

ceil(1.8)
> 2

floor(var)

Round to the smallest whole value

Arguments

Key Description
var A float

Examples

ceil(1.1)
> 1

ceil(1.8)
> 1

increment(var,by)

Increase a value by another value

Arguments

Key Description
var The original value
by The value to increase by

Examples

increment(10,1)
> 11

decrement(var,by)

Decrease a value by another value

Arguments

Key Description
var The original value
by The value to decrease by

Examples

decrement(10,1)
> 9

rnd(min,max)

Generate a random number between the provided values (inclusive). This is not securely random!

Arguments

Key Description
min The minimum value to include
max The maximum value to include

Examples

rnd(1,100)
> 54

modulus(value,by)

The number of remainders after a division of a provided value by another. Useful for identifying even numbers.

Arguments

Key Description
value The original value
by The number to divide by

Examples

modulus(15,3)
> 0

modulus(15,4)
> 3

Network

cidr(address, addressRange)

Returns True when the address is within the cidr block address range provided

Arguments

Key Description
address The address to check
addressRange The range to check against

Examples

cidr("10.0.0.36","10.0.0.0/8")
> True

cidr("10.0.0.36","10.0.0.0/28")
> False

cidrAddresses(cidr)

Returns a list of IP address members of a cidr block

Arguments

Key Description
cidr The cidr range

Examples

cidrAddresses("10.10.10.0/28")
> ['10.10.10.0', '10.10.10.1', '10.10.10.2', '10.10.10.3', '10.10.10.4', '10.10.10.5', '10.10.10.6', '10.10.10.7', '10.10.10.8', '10.10.10.9', '10.10.10.10', '10.10.10.11', '10.10.10.12', '10.10.10.13', '10.10.10.14', '10.10.10.15']

reverseDNS(IPv4Address)

Identify the hosts associated with an IP address. Uses the currently running worker's DNS.

Arguments

Key Description
IPv4Address The IP address to check

Examples

reverseDNS("8.8.8.8")
> ('dns.google', [], ['8.8.8.8'])

maskTocidr(netmask)

Convert a netmask into a CIDR range

Arguments

Key Description
netmask The netmask in x.x.x.x format

Examples

maskTocidr("255.255.255.0")
> 24

dnsLookup(domain)

Return the list of associated IPs with a DNS entry

Arguments

Key Description
domain The domain to lookup

Examples

dnsLookup("google.com")
> ['142.250.200.14', '2a00:1450:4009:822::200e']

Regex

reReplace(string,match,replacement)

Replace a matching section of a string based on the provided regex

Arguments

Key Description
string The string to match and replace on
match A regex match statement
replacement The content to replace the match with

Examples

reReplace("Your code is A-0123","([A-Z]\-[0-9]{4})","B-0456")
> 'Your code is B-0456'

reExtractURL(string)

Attempts to extract one or more URLs from a given string.

Arguments

Key Description
string A string containing one or more URLs

Examples

reExtractURL("the website is https://secureack.com but if you can't find it you can try going via http://google.com")
> ['https://secureack.com', 'http://google.com']

reExtractIP(string)

Attempts to extract one or more IP addresses from a given string.

Arguments

Key Description
string A string containing one or more IPs

Examples

reExtractIP("the website is https://secureack.com but if you can't find it you can try going via 8.8.8.8")
> ['8.8.8.8']

reExtractDomain(string)

Attempts to extract one or more domain from a given string.

Arguments

Key Description
string A string containing one or more domains

Examples

reExtractDomain("the website is secureack.co.uk but if you can't find it you can try going via google.com")
> ['secureack.co.uk', 'google.com']

reExtractEmail(string)

Attempts to extract one or more email addresses from a given string.

Arguments

Key Description
string A string containing one or more emails

Examples

reExtractEmail("you can email me on automation@aops.com if you'd like")
> ['automation@aops.com']

String

Return True or False depending on if the string contains the provided content

contains(string,contents)

Arguments

Key Description
string The string to search
contents The content to check in the string

Examples

contains("this is a test","test")
> True

contains("this is a test","a-ops")
> False

split(string,splitOn,position=None)

split a string by a certain value

Arguments

Key Description
string The string to split
splitOn The value to split the string on
position Whether to return a specific section of the split

Examples

split("this is a sentence. This is another. This is a third sentence",".")
> ['this is a sentence', ' This is another', ' This is a third sentence']

split("this is a sentence. This is another. This is a third sentence",".",1)
> ' This is another'

splitLines(string,r=False)

Split a string into an array, based on newline (and optionally return) characters.

Arguments

Key Description
string The string to split on
r Whether to split on \r\n instead of just \n

Examples

splitLines("this is a sentence\nThis is another\nThis is a third sentence")
> ['this is a sentence', 'This is another', 'This is a third sentence']

strCount(string,searchString)

Return the number of instances found in a string

Arguments

Key Description
string The string to search on
searchString The string to count

Examples

strCount("this is a sentence. This is another. This is a third sentence","sentence")
> 2

join(stringList,by=None)

Join an array into a single string, using a provided joining string.

Arguments

Key Description
stringList An array of strings. Can support int, bool, dictionaries, etc but these will be flattened
by The joining string

Examples

join(['this is a sentence', ' This is another', ' This is a third sentence'],".")
> 'this is a sentence. This is another. This is a third sentence'

concat(*args)

Combine one or more strings together

Arguments

Key Description
args One or more strings. Other types are supported but will be converted to string.

Examples

concat("this","is","a","test")
> thisisatest

replace(string,match,replacement)

Replace matching text in a string for another. For regex support please see reReplace.

Arguments

Key Description
string The string to replace a section of
match The string to match on
replacement The replacement string to insert

Examples

replace("this is a cat","cat","dog")
> 'this is a dog'

strip(string,stripOn="")

Strip one or more characters from a string.

Arguments

Key Description
string The string to strip
stripOn The character(s) to strip off

Examples

strip("this is a sentence\n")
> 'this is a sentence'

startsWith(string, startswithString)

Returns True if the provided string starts with the other string

Arguments

Key Description
string The string to check
startswithString The value to check against

Examples

startsWith("error: failed to fetch","error")
> True

endsWith(string, endswithString)

Returns True if the provided string ends with the other string

Arguments

Key Description
string The string to check
endswithString The value to check against

Examples

endsWith("error: failed to fetch","fetch")
> True

uuidGenerate()

Generate a UUID.

Examples

uuidGenerate()
> 45dfed5b-b960-4136-8f14-e84eeb82f190

rndString(length)

Generate a random string of ascii letters for a given length

Arguments

Key Description
length The length of string to generate

Examples

rndString(10)
> nONIfvqwJd

API

GET /integration/system/[accessKey]/[token]

Args

Returns

POST /integration/system/[accessKey]/[token]

Args

Returns

Open Source Attributions

SecureAck integration includes the following additional python third-party software/licensing:

----------------
** json-html ( https://github.com/AlexFlipnote/json_html )
MIT

MIT License

Copyright (c) 2023 AlexFlipnote

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

----------------
** netaddr ( https://github.com/netaddr/netaddr )

Here are the licenses applicable to the use of the netaddr library.

-------
netaddr
-------

COPYRIGHT AND LICENSE

Copyright (c) 2008 by David P. D. Moss. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
  notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright 
  notice, this list of conditions and the following disclaimer in the
  documentation and/or other materials provided with the distribution.

* Neither the name of David P. D. Moss nor the names of contributors
  may be used to endorse or promote products derived from this
  software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.