Skip to main content

Text

Combine, change, search and measure text.

Combine texts​

Joins multiple texts end-to-end.

Inputs

NameTypeRequiredDetails
ValuesList of TextYesThe texts to combine.

Outputs

NameTypeDetails
ResultTextThe combined text.

Format text template​

Replaces {placeholder} tokens in a template using a lookup table.

Inputs

NameTypeRequiredDetails
TemplateTextYesTemplate text with {placeholder} tokens.
ValuesLookup table of Text to TextYesLookup table of placeholder names to values.

Outputs

NameTypeDetails
ResultTextThe interpolated text.

Replace in text​

Replaces occurrences of a piece of text with another value.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to search in.
SearchTextYesThe piece of text to look for.
ReplacementTextYesWhat to replace matches with.
Replace allYes/NoNoReplace every occurrence (true) or just the first (false). Default: Yes.

Outputs

NameTypeDetails
ResultTextThe resulting text.

Extract with regex​

Matches the text against a regular expression and returns the requested capture group (0 = the whole match), or empty when there is no match.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to search.
PatternTextYesThe regular-expression pattern.
FlagsTextNoOptional regex flags (e.g. "i" for case-insensitive).
GroupWhole numberNoCapture-group index to return (0 = the whole match). Minimum: 0. Default: 0.

Outputs

NameTypeDetails
ResultTextThe matched group, or empty when there is no match. May be empty.

Escape Discord markdown​

Escapes Discord markdown in the text so formatting (bold, italics, code, spoilers, headings, lists, masked links) renders as literal characters. Optionally also neutralizes @everyone/@here and user, role and channel mentions so the text can never ping.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to escape.
Escape mentionsYes/NoNoAlso neutralize @everyone/@here and user, role and channel mentions so they can't ping (on by default). Default: Yes.

Outputs

NameTypeDetails
TextTextThe escaped text, safe to send as plain content.

To uppercase​

Converts a text to uppercase.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to convert.

Outputs

NameTypeDetails
ResultTextThe uppercased text.

To lowercase​

Converts a text to lowercase.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to convert.

Outputs

NameTypeDetails
ResultTextThe lowercased text.

Title case​

Capitalizes the first letter of each word in the text.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to convert.

Outputs

NameTypeDetails
ResultTextThe title-cased text.

Trim text​

Removes leading and trailing whitespace.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to trim.

Outputs

NameTypeDetails
ResultTextThe trimmed text.

Split text​

Splits a text into a list using a separator.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to split.
SeparatorTextYesThe separator to split on.

Outputs

NameTypeDetails
ResultList of TextThe resulting list of texts.

Text length​

Returns the number of characters in a text.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to measure.

Outputs

NameTypeDetails
LengthWhole numberThe length of the text.

Starts with​

Checks whether a text starts with the given prefix.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to check.
PrefixTextYesThe prefix to look for.

Outputs

NameTypeDetails
ResultYes/NoTrue if the text starts with the prefix.

Ends with​

Checks whether a text ends with the given suffix.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to check.
SuffixTextYesThe suffix to look for.

Outputs

NameTypeDetails
ResultYes/NoTrue if the text ends with the suffix.

Contains text​

Checks whether a text contains the given part.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to search in.
NeedleTextYesThe piece of text to search for.

Outputs

NameTypeDetails
ResultYes/NoTrue if the piece of text is found.

Part of text​

Extracts a portion of a text starting at an index.

Inputs

NameTypeRequiredDetails
TextTextYesThe source text.
StartWhole numberYesZero-based starting index. Minimum: 0.
LengthWhole numberNoNumber of characters to extract; leave empty for the rest of the text. Minimum: 0.

Outputs

NameTypeDetails
ResultTextThe extracted part.

Pad text left​

Pads a text on the left until it reaches the desired length.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to pad.
LengthWhole numberYesThe target total length. Minimum: 0.
Pad charTextYesSingle character used to pad. Length: 1 to 1 characters.

Outputs

NameTypeDetails
ResultTextThe padded text.

Pad text right​

Pads a text on the right until it reaches the desired length.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to pad.
LengthWhole numberYesThe target total length. Minimum: 0.
Pad charTextYesSingle character used to pad. Length: 1 to 1 characters.

Outputs

NameTypeDetails
ResultTextThe padded text.

Repeat text​

Repeats a text a given number of times. The result is capped at 4096 characters.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to repeat.
CountWhole numberYesHow many times to repeat the text. Minimum: 0.

Outputs

NameTypeDetails
ResultTextThe repeated text.

Pluralize​

Selects the correct word form for a number using the locale's plural rules. You provide the forms (singular, plural and any extra forms a language needs); this action picks which one applies. Use %count% inside a form to insert the number.

Inputs

NameTypeRequiredDetails
CountDecimal numberYesThe number the word form is chosen for.
Singular formTextYesForm for the "one" category, e.g. "%count% item".
Plural formTextYesForm for the "other" category (the general plural), e.g. "%count% items". Also used as the fallback when a needed form is not provided.
Zero formTextNoOptional form for the "zero" category (used by some locales).
Two formTextNoOptional form for the "two" category (used by some locales).
Few formTextNoOptional form for the "few" category (used by some locales).
Many formTextNoOptional form for the "many" category (used by some locales).
LocaleTextNoLocale whose plural rules are used, e.g. "en" or "de". Defaults to the server's language.

Outputs

NameTypeDetails
TextTextThe chosen word form with %count% replaced by the number.

Ordinal​

Formats a number as a locale-correct ordinal, e.g. 1st, 2nd, 3rd (English) or 1., 2., 3. (German). Other locales return the number unchanged.

Inputs

NameTypeRequiredDetails
NumberWhole numberYesThe number to format as an ordinal.
LocaleTextNoLocale whose ordinal rules are used, e.g. "en" or "de". Defaults to the server's language.

Outputs

NameTypeDetails
TextTextThe number with its ordinal suffix, e.g. "1st" or "1.".

Truncate text​

Shortens text to a maximum length, appending an ellipsis when it is cut. The result never exceeds the maximum length and is never split inside a character.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to shorten.
Maximum lengthWhole numberYesLongest allowed result, including the ellipsis. Value: 1 to 100000.
EllipsisTextNoText appended when the input is cut (defaults to a single ellipsis character). Maximum length: 32 characters. Default: ….

Outputs

NameTypeDetails
ResultTextThe shortened text.

Replace with regex​

Replaces matches of a regular expression in the text with a replacement text. Add the "g" flag to replace every match instead of only the first.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to search.
PatternTextYesThe regular-expression pattern.
ReplacementTextYesThe text each match is replaced with (supports 1,1, 2 group references).
FlagsTextNoOptional regex flags (e.g. "g" for all matches, "i" for case-insensitive).

Outputs

NameTypeDetails
ResultTextThe text after replacement.

Test with regex​

Returns whether the text matches a regular expression.

Inputs

NameTypeRequiredDetails
TextTextYesThe text to test.
PatternTextYesThe regular-expression pattern.
FlagsTextNoOptional regex flags (e.g. "i" for case-insensitive).

Outputs

NameTypeDetails
ResultYes/NoTrue when the text matches the pattern.

Random text​

Generates a random text of the given length from the chosen character set. Not for security-sensitive secrets.

Inputs

NameTypeRequiredDetails
LengthWhole numberYesNumber of characters to generate (1-4096). Value: 1 to 4096.
Character setCharacter setNoWhich characters may appear in the result. Default: Letters and digits.

Outputs

NameTypeDetails
ResultTextThe generated random text.

Text similarity​

Compares two texts and returns how similar they are, from 0 (completely different) to 1 (identical), based on edit distance.

Inputs

NameTypeRequiredDetails
First textTextYesThe first text to compare. Maximum length: 1000 characters.
Second textTextYesThe second text to compare. Maximum length: 1000 characters.

Outputs

NameTypeDetails
SimilarityDecimal numberSimilarity score from 0 to 1.
Need more help?
Can't find what you're looking for? Our team is happy to help.