String nodes

String nodes build, test, and split text, and read values out of JSON. See how nodes work for how to read the diagrams below.

Format String

Builds text from a template with numbered placeholders.

Format StringExecuteArg 0Arg 1Arg 2Arg 3DoneResult
Inputs
ExecuteFlow
Arg 0 … Arg NAny
Fills the matching placeholder: Arg 0 fills {0}, Arg 1 fills {1}, and so on.
Outputs
DoneFlow
ResultString
Properties
Template
Text with {0}, {1}, … placeholders. Can span several lines. Default Value: {0}.
Argument Count
Number of Arg inputs, 1 to 20. Default 4.
Output Format
None, To Uppercase, or To Lowercase. Default None.

For example, the template {0} redeemed {1} with Arg 0 set to Alex and Arg 1 set to Shock gives Alex redeemed Shock. Unconnected arguments are left blank. If the template is invalid, for example it uses {5} with only four arguments, Result is the template unchanged.

Regex Match

Tests text against a regular expression.

Regex MatchExecuteInputDoneMatchesFirst MatchGroup 1
Inputs
ExecuteFlow
InputString
Outputs
DoneFlow
MatchesBoolean
First MatchString
The text of the first match.
Group 1String
The first capture group of the first match.
Properties
Pattern
A .NET regular expression. Default .*
Ignore Case
Default off.

An invalid pattern, or one that takes longer than a second to run, gives Matches false.

String Compare

Compares two pieces of text.

String CompareExecuteString AString BDoneResult
Inputs
ExecuteFlow
String AString
String BString
Outputs
DoneFlow
ResultBoolean
Properties
Mode
Equals, Contains, Starts With, or Ends With. Default Equals.
Ignore Case
Default on.

Contains, Starts With, and Ends With check both directions: Contains is true if A contains B or B contains A. Because every text contains empty text, these modes also return true when either input is empty.

String Split

Splits text into a list wherever a delimiter appears.

String SplitExecuteInput StringDelimiterDoneResult
Inputs
ExecuteFlow
Input StringString
DelimiterString
Overrides the property when connected.
Outputs
DoneFlow
ResultArray
The parts, in order.
Properties
Delimiter
Default , (comma).
Ignore Case
Default on.

With Ignore Case on, the input is lowercased before splitting, so the parts in Result are lowercase too. Turn it off to keep the original capitalization. Empty parts and spaces around parts are kept. An empty delimiter returns the whole input as a single item.

JSON Parse

Turns JSON text into a value other nodes can read.

JSON ParseExecuteJSON InputSuccessFailedValueErrorIs ObjectIs Array
Inputs
ExecuteFlow
JSON InputString
Outputs
SuccessFlow
Runs when the input was parsed.
FailedFlow
Runs when the input is empty or not valid JSON.
ValueAny
The parsed value.
ErrorString
Why parsing failed.
Is ObjectBoolean
Is ArrayBoolean
Properties
Allow Non-String Input
Pass values that are not text straight through to Value instead of failing. Default on.

Use JSON Path Get to read a field from the parsed value.

JSON Path Get

Reads one value out of JSON using a path.

JSON Path GetExecuteJSONPathFoundMissingErrorValueExistsError
Inputs
ExecuteFlow
JSONAny
JSON text, or a value from JSON Parse.
PathString
Overrides the property when connected and not empty.
Outputs
FoundFlow
Runs when the path exists.
MissingFlow
Runs when the path does not exist.
ErrorFlow
Runs when the JSON cannot be read.
ValueAny
ExistsBoolean
ErrorString
Why the path is missing or the JSON could not be read.
Properties
Path
Default $, the whole value.
Default Value
Sent to Value when the path is missing. Numbers, true/false, and JSON are converted.

Paths use dots for fields and brackets for list positions, for example $.user.name or items[0].id. The leading $ is optional. Text, numbers, and true/false come out as plain values; objects and lists stay as JSON, so you can chain another JSON Path Get to read deeper.

Contributors

Thank you to everyone who has helped improve this documentation.