String#
String.base64Decode()#
Description: Converts plain text to a base64-encoded string
Syntax: String.base64Encode()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.base64Encode()#
Description: Converts a base64-encoded string to plain text
Syntax: String.base64Encode()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.concat()#
Description: Joins one or more strings onto the end of the base string. Alternatively, use the + operator (see examples).
Syntax: String.concat(string1, string2?, ..., stringN?)
Returns: String
Source: JavaScript function
Parameters:
string1(String) - The first string to appendstring2(String) - optional - The second string to appendstringN(String) - optional - The Nth string to append
Examples:
1 2 | |
1 | |
String.extractDomain()#
Description: If the string is an email address or URL, returns its domain (or undefined if nothing found).
If the string also contains other content, try using extractEmail() or extractUrl() first.
Syntax: String.extractDomain()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
String.extractEmail()#
Description: Extracts the first email found in the string. Returns undefined if none is found.
Syntax: String.extractEmail()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.extractUrl()#
Description: Extracts the first URL found in the string. Returns undefined if none is found. Only recognizes full URLs, e.g. those starting with http.
Syntax: String.extractUrl()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.extractUrlPath()#
Description: Returns the part of a URL after the domain, or undefined if no URL found.
If the string also contains other content, try using extractUrl() first.
Syntax: String.extractUrlPath()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
1 | |
String.hash()#
Description: Returns the string hashed with the given algorithm. Defaults to md5 if not specified.
Syntax: String.hash(algo?)
Returns: String
Source: Custom n8n functionality
Parameters:
algo(String) - optional - The hashing algorithm to use. One ofmd5,base64,sha1,sha224,sha256,sha384,sha512,sha3,ripemd160
Examples:
1 | |
String.includes()#
Description: Returns true if the string contains the searchString. Case-sensitive.
Syntax: String.includes(searchString, start?)
Returns: Boolean
Source: JavaScript function
Parameters:
searchString(String) - The text to search forstart(Number) - optional - The position (index) to start searching from
Examples:
1 2 | |
1 2 3 | |
String.indexOf()#
Description: Returns the index (position) of the first occurrence of searchString within the base string, or -1 if not found. Case-sensitive.
Syntax: String.indexOf(searchString, start?)
Returns: Number
Source: JavaScript function
Parameters:
searchString(String) - The text to search forstart(Number) - optional - The position (index) to start searching from
Examples:
1 2 | |
1 2 3 | |
String.isDomain()#
Description: Returns true if the string is a domain
Syntax: String.isDomain()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
String.isEmail()#
Description: Returns true if the string is an email
Syntax: String.isEmail()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
String.isEmpty()#
Description: Returns true if the string has no characters or is null
Syntax: String.isEmpty()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 | |
1 | |
String.isNotEmpty()#
Description: Returns true if the string has at least one character
Syntax: String.isNotEmpty()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 | |
1 | |
String.isNumeric()#
Description: Returns true if the string represents a number
Syntax: String.isNumeric()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
String.isUrl()#
Description: Returns true if the string is a valid URL
Syntax: String.isUrl()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
String.length#
Description: The number of characters in the string
Syntax: String.length
Returns: Number
Source: JavaScript function
Examples:
1 | |
String.match()#
Description: Matches the string against a regular expression. Returns an array containing the first match, or all matches if the g flag is set in the regular expression. Returns null if no matches are found.
For checking whether text is present, consider includes() instead.
Syntax: String.match(regexp)
Returns: Array
Source: JavaScript function
Parameters:
regexp(RegExp) - A regular expression with the pattern to look for. Will look for multiple matches if thegflag is present (see examples).
Examples:
1 2 | |
1 2 | |
1 2 | |
String.parseJson()#
Description: Returns the JavaScript Object or value represented by the string, or undefined if the string isn’t valid JSON. Single-quoted JSON is not supported.
Syntax: String.parseJson()
Returns: any
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
String.quote()#
Description: Wraps a string in quotation marks, and escapes any quotation marks already in the string. Useful when constructing JSON, SQL, etc.
Syntax: String.quote(mark?)
Returns: String
Source: Custom n8n functionality
Parameters:
mark(String) - optional - The type of quotation mark to use
Examples:
1 | |
String.removeMarkdown()#
Description: Removes any Markdown formatting from the string. Also removes HTML tags.
Syntax: String.removeMarkdown()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.removeTags()#
Description: Removes tags, such as HTML or XML, from the string
Syntax: String.removeTags()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.replace()#
Description: Returns a string with the first occurrence of pattern replaced by replacement.
To replace all occurrences, use replaceAll() instead.
Syntax: String.replace(pattern, replacement)
Returns: String
Source: JavaScript function
Parameters:
pattern(String|RegExp) - The pattern in the string to replace. Can be a string to match or a regular expression.replacement(String) - The new text to replace with
Examples:
1 | |
1 2 3 | |
1 2 3 4 5 | |
String.replaceAll()#
Description: Returns a string with all occurrences of pattern replaced by replacement
Syntax: String.replaceAll(pattern, replacement)
Returns: String
Source: JavaScript function
Parameters:
pattern(String|RegExp) - The pattern in the string to replace. Can be a string to match or a regular expression.replacement(String|function) - The new text to replace with. Can be a string or a function that returns a string (see examples).
Examples:
1 | |
1 2 3 4 5 6 7 8 | |
String.replaceSpecialChars()#
Description: Replaces special characters in the string with the closest ASCII character
Syntax: String.replaceSpecialChars()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.search()#
Description: Returns the index (position) of the first occurrence of a pattern within the string, or -1 if not found. The pattern is specified using a regular expression. To use text instead, see indexOf().
Syntax: String.search(regexp)
Returns: Number
Source: JavaScript function
Parameters:
regexp(RegExp) - A regular expression with the pattern to look for
Examples:
1 2 | |
1 2 3 | |
String.slice()#
Description: Extracts a fragment of the string at the given position. For more advanced extraction, see match().
Syntax: String.slice(start, end?)
Returns: String
Source: JavaScript function
Parameters:
start(Number) - The position to start from. Positions start at 0. Negative numbers count back from the end of the string.end(String) - optional - The position to select up to. The character at the end position is not included. Negative numbers select from the end of the string. If omitted, will extract to the end of the string.
Examples:
1 | |
1 | |
1 | |
String.split()#
Description: Splits the string into an array of substrings. Each split is made at the separator, and the separator isn’t included in the output.
The opposite of using join() on an array.
Syntax: String.split(separator?, limit?)
Returns: Array
Source: JavaScript function
Parameters:
separator(String) - optional - The string (or regular expression) to use for splitting. If omitted, an array with the original string is returned.limit(Number) - optional - The max number of array elements to return. Returns all elements if omitted.
Examples:
1 | |
1 | |
1 2 | |
String.startsWith()#
Description: Returns true if the string starts with searchString. Case-sensitive.
Syntax: String.startsWith(searchString, start?)
Returns: Boolean
Source: JavaScript function
Parameters:
searchString(String) - The text to check against the start of the base stringstart(Number) - optional - The position (index) to start searching from
Examples:
1 2 | |
1 2 | |
String.substring()#
Description: Extracts a fragment of the string at the given position. For more advanced extraction, see match().
Syntax: String.substring(start, end?)
Returns: String
Source: JavaScript function
Parameters:
start(Number) - The position to start from. Positions start at 0.end(String) - optional - The position to select up to. The character at the end position is not included. If omitted, will extract to the end of the string.
Examples:
1 | |
1 | |
String.toBoolean()#
Description: Converts the string to a boolean value. 0, false and no resolve to false, everything else to true. Case-insensitive.
Syntax: String.toBoolean()
Returns: Boolean
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
1 | |
String.toDateTime()#
Description: Converts the string to a DateTime. Useful for further transformation. Supported formats for the string are ISO 8601, HTTP, RFC2822, SQL and Unix timestamp in milliseconds.
To parse other formats, use DateTime.fromFormat().
Syntax: String.toDateTime()
Returns: DateTime
Source: Custom n8n functionality
Examples:
1 | |
1 | |
1 | |
1 | |
String.toJsonString()#
Description: Prepares the string to be inserted into a JSON object. Escapes any quotes and special characters (e.g. new lines), and wraps the string in quotes.
The same as JavaScript’s JSON.stringify().
Syntax: String.toJsonString()
Returns: String
Source: Custom n8n functionality
Examples:
1 2 | |
String.toLowerCase()#
Description: Converts all letters in the string to lower case
Syntax: String.toLowerCase()
Returns: String
Source: JavaScript function
Examples:
1 | |
String.toNumber()#
Description: Converts a string representing a number to a number. Throws an error if the string doesn’t start with a valid number.
Syntax: String.toNumber()
Returns: Number
Source: Custom n8n functionality
Examples:
1 | |
1 | |
String.toSentenceCase()#
Description: Changes the capitalization of the string to sentence case. The first letter of each sentence is capitalized and all others are lowercased.
Syntax: String.toSentenceCase()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.toSnakeCase()#
Description: Changes the format of the string to snake case. Spaces and dashes are replaced by _, symbols are removed and all letters are lowercased.
Syntax: String.toSnakeCase()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.toTitleCase()#
Description: Changes the capitalization of the string to title case. The first letter of each word is capitalized and the others left unchanged. Short prepositions and conjunctions aren’t capitalized (e.g. ‘a’, ‘the’).
Syntax: String.toTitleCase()
Returns: String
Source: Custom n8n functionality
Examples:
1 | |
String.toUpperCase()#
Description: Converts all letters in the string to upper case (capitals)
Syntax: String.toUpperCase()
Source: JavaScript function
Examples:
1 | |
String.trim()#
Description: Removes whitespace from both ends of the string. Whitespace includes new lines, tabs, spaces, etc.
Syntax: String.trim()
Returns: String
Source: JavaScript function
Examples:
1 | |
String.urlDecode()#
Description: Decodes a URL-encoded string. Replaces any character codes in the form of %XX with their corresponding characters.
Syntax: String.urlDecode(allChars?)
Returns: String
Source: Custom n8n functionality
Parameters:
allChars(Boolean) - optional - Whether to decode characters that are part of the URI syntax (e.g.=,?)
Examples:
1 | |
1 | |
String.urlEncode()#
Description: Encodes the string so that it can be used in a URL. Spaces and special characters are replaced with codes of the form %XX.
Syntax: String.urlEncode(allChars?)
Returns: String
Source: Custom n8n functionality
Parameters:
allChars(Boolean) - optional - Whether to encode characters that are part of the URI syntax (e.g.=,?)
Examples:
1 | |
1 | |