String Functions

ascii (text; [remove diacritics])

Removes all non-ascii characters from a text string.

ascii(Iěnštčeřgžrýoámíaét)
= Integromat
ascii(ěščřž;true)
= escrz

base64 (text)

Transforms text to base64.

base64(integromat)
= aW50ZWdyb21hdA==

Hint: combine the toBinary() and toString() functions to transform base64 encoded text to plain text:

toString(toBinary(aW50ZWdyb21hdA==;base64))
= integromat

You can also use this function to encode binary data.

capitalize (text)

Converts the first character in a text string to uppercase.

capitalize(integromat)
= Integromat

contains (text; search string)

Verifies if text contains the search string.

contains(Hello World;Hello)
= true
contains(Hello World;Bye)
= false

decodeURL (text)

Decodes special characters in URL to text.

decodeURL(Automate%20your%20workflow)
= Automate your workflow

encodeURL (text)

Encodes special characters in a text to a valid URL address.

escapeHTML (text)

Escapes all HTML tags in text.

escapeHTML(<b>Hello</b>)
= &lt;b&gt;Hello&lt;/b&gt;

indexOf (string; value; [start])

Returns the position of the first occurrence of a specified value in a string. This method returns '-1' if the value searched for never occurs.

indexOf(Integromat;t)
= 2
indexOf(Integromat;x)
= -1
indexOf(Integromat;t;3)
= 9

length (text or buffer)

Returns the length of text string (number of characters) or binary buffer (buffer size in bytes).

length(hello)
= 5

lower (text)

Converts all alphabetical characters in a text string to lowercase.

lower(Hello)
= hello

md5 (text)

Calculates the md5 hash of a string.

md5(integromat)
= d155951844a40fb856108d803d4de33e

replace (text;search string; replacement string)

Replaces the search string with the new string.

replace(Hello World;Hello;Hi)
= Hi World

Regular expressions (enclosed in /.../) can be used as search string with a combination of flags (like gim) appended:

= All these numbers X X X X will be replaced with X

The replacement string can include the following special replacement patterns:

$&Inserts the matched substring.
$nWhere n is a positive integer less than 100, inserts the nth parenthesized submatch string. Note that this is 1-indexed.

= Phone number is +420777111222

= Phone number: +420777111222
Do not use named capture groups like / is (?<number>\d+)/ in the replacement string argument as this will throw an error.

See Text parser's documentation for further information on regular expressions.

sha1 (text; [encoding]; [key])

Calculates the sha1 hash of a string. If the key argument is specified, sha1 HMAC hash is returned instead. Supported encodings: `hex` (default), `base64` or `latin1`.

sha1(integromat)
= 5572e727b5822e06d7d13c69f51b3addbfa5390f

sha256 (text; [encoding]; [key])

Calculates the sha256 hash of a string. If the key argument is specified, sha256 HMAC hash is returned instead. Supported encodings: `hex` (default), `base64` or `latin1`.

sha256(integromat)
= 17722b391d8f2004020cc7445685451bc42bf8f6621d7866ba96e8ffa42b68aa

sha512 (text; [output encoding]; [key]; [key encoding])

Calculates the sha512 hash of a string. If the key argument is specified, sha512 HMAC hash is returned instead. Supported encodings: `hex` (default), `base64` or `latin1`. Supported key encodings: `text` (default), `hex`, `base64` or `binary`. When using `binary` key encoding, a key must be a buffer, not a string.

sha512(integromat)
= dbb0c7d5aa108aca5d2476d00885a98aef9f9ed9ad1c4635abaf9c104793844b7dc52e0dfab43c893c55ff4a9db5d69b8be479716ee53149337456694f7aed7c

split (text; separator)

Splits a string into an array of strings by separating the string into substrings.

split(John, George, Paul;,)

startcase (text)

Capitalizes the first letter of every word and lower cases all other letters.

startcase(hello WORLD)
= Hello World

stripHTML (text)

Removes all HTML tags from text.

stripHTML(<b>Hello</b>)
= Hello

substring (text; start;end)

Returns a portion of a text string between the "start" position and "the end" position.

substring(Hello;0;3)
= Hel
substring(Hello;1;3)
= el

toBinary (value)

Converts any value to binary data. You can also specify encoding as a second argument to apply binary conversions from hex or base64 to binary data.

toBinary(Integromat)
= 496e746567726f6d6174
toBinary(SW50ZWdyb21hdA==;base64)
= 496e746567726f6d6174

toString (value)

Converts any value to a string.

trim (text)

Removes space characters at the start or end of the text.

upper (text)

Converts all alphabetical characters in a text string to uppercase.

upper(Hello)
= HELLO

Popular use cases from our blog

automated-data-collection-crm-illustration

How to Automate Data Collection - Part 5: CRM Systems

automated-data-collection-chatbot-marketing-illustration

How to Automate Data Collection - Part 4: Chatbot Marketing

automated-data-collection-paid-ads-illustration

How to Automate Data Collection - Part 3: Paid Ads

automated-data-collection-email-illustration

How to Automate Data Collection - Part 2: Email Marketing Segmentation

personalized-customer-experience-illustration-integromat

5 Automated Solutions to Personalize Customer Experience

data-collection-automation-forms-pt-1

How to Automate Data Collection - Part 1: Online Forms

Didn’t find what you were looking for?

Expert

Find an expert

We feature a network of 450+ certified partners across the globe who are ready to help

Find an expert

Automate any workflow in your business

Sign up for a free account today. No credit card required, no time limits on free plan.