Text
Built-in step · 39 steps
Edit, split, join, search, and check text.
Steps
| Step | What it does |
|---|---|
| Check end of text | Check whether text ends with specific words or characters. |
| Check if empty | Check whether a value is empty, like a form question someone skipped: blank text, an empty list or nothing at all. |
| Check if text includes | Check whether text includes specific words or characters. |
| Check start of text | Check whether text starts with specific words or characters. |
| Compare text alphabetically | Check whether text comes before or after another in alphabetical order, the way a language's alphabet orders letters, like sending surnames A to M to one person. |
| Convert HTML to Markdown | Turn HTML, like an email's body or a web page, into Markdown that reads as plain text and keeps its headings, lists, links, bold and italic, tables and code: ready for an AI step, a Slack message or a note. |
| Convert JSON to XML | Turn data or JSON text into an XML document, for an API or a service that speaks XML, a feed or a file: each field becomes an element named after it, a list repeats its element, and a field named like @id becomes an attribute. |
| Convert Markdown to HTML | Turn Markdown, like an AI step's answer or a template you write, into plain HTML for a web page, a rich-text field or an app that takes HTML: headings, lists, links, bold and italic, tables and code all come through. |
| Convert to yes or no | Turn a value like Yes, TRUE, 1, on, a ticked box or No into a real true or false, for a checkbox field or an API that needs one. |
| Convert XML to JSON | Turn XML, like an API's response or a feed, into data whose fields later steps can use, the way Read a file reads an XML file: each element is a field named by its tag, a tag that repeats is a list, and attributes are fields too. |
| Count characters | Count how many characters are in text. |
| Count words | Count how many words are in text. |
| Encode or decode text | Make text safe to put in a web address, HTML, JSON, Markdown or a Slack message, encode or decode Base64, or remove accents and emoji. |
| Extract from text | Pull matches out of text: an email address, web address, phone number, domain, number, or your own pattern. |
| Find position in text | Find where a word or character appears in text, counting the first character as 1, like 4 for the @ in ana@example.com. |
| Format phone number | Write a phone number one standard way, however it was typed, like +1 415-555-0123 or +14155550123 for a texting app. |
| Format text | Change the letter case of text: make it uppercase, lowercase, capitalize the first letter, use title or sentence case, or turn it into a slug for a web address. |
| Get character at position | Get one character of text by its position, counting the first as 1 and the last as -1, like the first letter of a name for initials. |
| Get character code | Get the Unicode number of a character, like 65 for A or 233 for é: to tell lookalike characters apart, or for a system that wants the number. |
| Get part of text | Take a piece of text: what comes before or after a word or character, what sits between two, or a number of characters from a position. |
| Join list into text | Turn a list into one piece of text. |
| Look up a value in a table | Turn one value into another with a small table you fill in, like US to United States or a status code to a label, instead of a chain of If steps. |
| Make plain text | Turn HTML, like an email body or a web page, or Markdown into plain text for a sheet, a text message or a plain email: tags and formatting marks removed, paragraphs, line breaks and bullets kept, and each link's address shown after its text. |
| Match keywords | Score text against your keyword lists to see how well it matches. |
| Normalize characters | Write accented letters and symbols one consistent way, so text that looks the same matches: é typed as one character or as e and an accent. |
| Pad text | Make text a set length by adding a character to its start or end, like 42 written as 0042 for an invoice number. |
| Put text in quotes | Wrap text in quote marks for a search or a command, with a backslash before any quote mark inside so it can't end the quote early: Say "hi" becomes "Say "hi"". |
| Query JSON | Pick out part of some data, or of JSON text, with a JMESPath query, like the ids of every open item: items[?status=='open'].id. |
| Read CSV text | Turn CSV written as text, such as an export pasted into an email or returned by an API, into rows keyed by the header row, the way Read a file reads a CSV file. |
| Read JSON text | Turn JSON written as text, like an AI step's answer or a webhook body, into data whose fields later steps can use. |
| Repeat text | Write text a number of times, like a line of 20 dashes to divide an email or a row of stars for a rating. |
| Replace text | Find text and replace it with something else. |
| Shorten text | Shorten text so it fits within a set number of characters. |
| Split text | Split text into a list, at a separator such as a comma, or into pieces no longer than a set number of characters (to fit a message or an AI prompt). |
| Trim whitespace | Remove spaces, tabs, and line breaks from the start and end of text. |
| Use a fallback if empty | Use a value, or a fallback when it is empty, like a first name or "there" when a contact has none. |
| Validate text | Check whether text is a valid email address, web address, phone number, number or domain name, or whether it matches a pattern of your own. |
| Work out country | Work out which country someone typed, however they wrote it (USA, U.S., United States, Deutschland, DE), and give its name, two-letter code and continent, ready to send people from different countries or regions to different places. |
| Write CSV text | Write rows as CSV text, to put in a message or send to an API. |
Check end of text
Check whether text ends with specific words or characters.
Inputs
- Text
texttextRequired - The text to check.
- Ends with
suffixtextRequired - The text it should end with, such as .pdf.
- Case sensitivity
case_sensitivetrue/false - Match upper- and lower-case letters exactly (the default). Turn this off to treat them as the same.Default:
true.
Outputs
Whether the text ends with the text given.
Example output
trueCheck if empty
Check whether a value is empty, like a form question someone skipped: blank text, an empty list or nothing at all. Zero and false count as values.
Inputs
- Value
valuetextRequired - The value to check, like a form's answer or a field from an earlier step.
- Check that it is
checktext - Whether to check that it is empty, or that it isn't.One of:
empty,not_empty(Not empty). Default:empty.
Outputs
Whether the value is empty (or, checked the other way, isn't).
Example output
trueCheck if text includes
Check whether text includes specific words or characters.
Inputs
- Text to search through
texttextRequired - The text to search through.
- Text to find
substringtextRequired - The exact text to look for.
- Case sensitivity
case_sensitivetrue/false - Match upper- and lower-case letters exactly (the default). Turn this off to treat them as the same.Default:
true.
Outputs
Whether the text includes the text searched for.
Example output
trueCheck start of text
Check whether text starts with specific words or characters.
Inputs
- Text
texttextRequired - The text to check.
- Starts with
prefixtextRequired - The text it should start with.
- Case sensitivity
case_sensitivetrue/false - Match upper- and lower-case letters exactly (the default). Turn this off to treat them as the same.Default:
true.
Outputs
Whether the text starts with the text given.
Example output
trueCompare text alphabetically
Check whether text comes before or after another in alphabetical order, the way a language's alphabet orders letters, like sending surnames A to M to one person. Numbers count by their value, so File 2 comes before File 10.
Inputs
- Text
texttextRequired - The text to compare, like a surname.
- Compare with
othertextRequired - The text to compare it with, like N.
- Alphabet
languagetext - The language whose alphabetical order to use. Most sort é with e and ä with a; some put letters like å, ñ or ç in places of their own.One of:
standard(Most languages (English, French, German…)),cs(Czech (č after c, ch after h)),da(Danish (æ, ø, å after z)),es(Spanish (ñ after n)),fi(Finnish (å, ä, ö after z)),no(Norwegian (æ, ø, å after z)),pl(Polish (ą after a, ł after l…)),sv(Swedish (å, ä, ö after z)),tr(Turkish (ç after c, ı before i…)). Default:standard. - Case sensitivity
case_sensitivetrue/false - Match upper- and lower-case letters exactly (the default). Turn this off to treat them as the same.Default:
true.
Outputs
before when the text comes first alphabetically, after when it comes later, same when neither does.
Example output
"before"Convert HTML to Markdown
Turn HTML, like an email's body or a web page, into Markdown that reads as plain text and keeps its headings, lists, links, bold and italic, tables and code: ready for an AI step, a Slack message or a note. Scripts and styles are left out.
Inputs
- HTML
texttextRequired - The HTML to convert, a whole page or a piece of one.
Outputs
The Markdown.
Example output
"# Hello\n\nSome **bold** text."Convert JSON to XML
Turn data or JSON text into an XML document, for an API or a service that speaks XML, a feed or a file: each field becomes an element named after it, a list repeats its element, and a field named like @id becomes an attribute.
Inputs
- Data
datatextRequired - The data to write as XML: a record or a list from an earlier step, or JSON text.
- Root element
roottext - The name of the element that wraps everything, like order or request. Defaults to root.Default:
root.
Outputs
The XML document, indented, with an XML declaration on its first line.
Example output
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<order id=\"1042\">\n <customer>Jordan Lee</customer>\n <total>84.00</total>\n</order>"Convert Markdown to HTML
Turn Markdown, like an AI step's answer or a template you write, into plain HTML for a web page, a rich-text field or an app that takes HTML: headings, lists, links, bold and italic, tables and code all come through. For an email, use HTML's Turn text into HTML, which adds the styles email apps show.
Inputs
- Markdown
texttextRequired - The Markdown to convert. A line break in it is a line break in the HTML, and HTML tags in it pass through.
Outputs
The HTML, without <html> or <body> around it and with no styles, ready to put in a page or a field.
Example output
"<h1>Hello</h1>\n<p>Some <strong>bold</strong> text.</p>"Convert to yes or no
Turn a value like Yes, TRUE, 1, on, a ticked box or No into a real true or false, for a checkbox field or an API that needs one.
Inputs
- Value
valuetextRequired - The value to read as yes or no, like a sheet's checkbox or a form's answer.
- Anything else is
otherwisetext - What to make of text that is neither a yes nor a no, like Pending. Blank is always no.One of:
no(No (false)),yes(Yes (true)). Default:no.
Outputs
True for a yes, false for a no.
Example output
trueConvert XML to JSON
Turn XML, like an API's response or a feed, into data whose fields later steps can use, the way Read a file reads an XML file: each element is a field named by its tag, a tag that repeats is a list, and attributes are fields too.
Inputs
- XML
texttextRequired - The XML to convert.
Outputs
What the outermost element holds: a record of its elements and attributes, or its text when it holds only text. Text stays text, so a number in the XML is text like "3".
Example output
{
"order": [
{
"customer": "Jordan Lee",
"id": "1042",
"total": "84.00"
},
{
"customer": "Sam Rivera",
"id": "1043",
"total": "12.50"
}
]
}Count characters
Count how many characters are in text.
Inputs
- Text
texttextRequired - The text to measure.
Outputs
The number of characters in the text.
Example output
13Count words
Count how many words are in text.
Inputs
- Text
texttextRequired - The text whose words are counted.
Outputs
The number of words in the text.
Example output
9Encode or decode text
Make text safe to put in a web address, HTML, JSON, Markdown or a Slack message, encode or decode Base64, or remove accents and emoji.
Inputs
- Text
texttextRequired - The text to encode or decode.
- Change it to
encodingtextRequired - How to change the text.One of:
url_encode(Safe for a web address (a b → a%20b)),url_decode(Back from a web address (a%20b → a b)),base64_encode(Base64),base64_decode(Back from Base64),html_escape(Safe for HTML (< → <)),html_unescape(Back from HTML (< → <)),json_escape(Safe inside JSON text),plain_ascii(Plain letters, no accents or emoji),markdown_escape(Safe for Markdown (*sale* → \*sale\*)),slack_escape(Safe for a Slack message (< → <)). Default:url_encode.
Outputs
The text, encoded or decoded.
Example output
"Hello%20world"Extract from text
Pull matches out of text: an email address, web address, phone number, domain, number, or your own pattern.
Inputs
- Text
texttextRequired - The text to search, such as the body of an email.
- Extract
typetextRequired - What to pull out of the text.One of:
email(Email address),url(Web address),phone(Phone number (+14155550123)),domain(Domain (example.com)),path(Web address path (/blog/post)),number,pattern(Custom pattern). Default:email. - Custom pattern
patterntext - A regular expression to search for. Used only when Extract is set to Custom pattern.Only when Extract is Custom pattern.
- Return
all_matchestrue/false - Return only the first match, or every match as a list.Default:
false. - Country
regiontext - The country of phone numbers written without a country code. Defaults to the United States.Only when Extract is Phone number (+14155550123). Default:
US.
Outputs
The first match, or a list of every match when all matches are asked for. Numbers come back as numbers, and finding nothing gives empty text, or an empty list.
Example output
1234.5Find position in text
Find where a word or character appears in text, counting the first character as 1, like 4 for the @ in ana@example.com. Gives 0 when it isn't there.
Inputs
- Text
texttextRequired - The text to search.
- Look for
searchtextRequired - The word or characters to find, like @.
- Find the
occurrencetext - Whether to find the first time it appears, or the last.One of:
first(First time it appears),last(Last time it appears). Default:first. - Case sensitivity
case_sensitivetrue/false - Match upper- and lower-case letters exactly (the default). Turn this off to treat them as the same.Default:
true.
Outputs
Where it starts, 1 for the first character; 0 when it isn't there.
Example output
4Format phone number
Write a phone number one standard way, however it was typed, like +1 415-555-0123 or +14155550123 for a texting app.
Inputs
- Phone number
texttextRequired - The phone number, written any way.
- Write it as
styletextRequired - How to write the number.One of:
international(International (+1 415-555-0123)),e164(For apps (+14155550123)),national(National ((415) 555-0123)). Default:international. - Country
regiontext - The country of numbers written without a country code. A number that starts with its own, like +44, is read in that country instead. Defaults to the United States.Default:
US.
Outputs
The phone number, written the chosen way.
Example output
"+1 415-555-0123"Format text
Change the letter case of text: make it uppercase, lowercase, capitalize the first letter, use title or sentence case, or turn it into a slug for a web address.
Inputs
- Text
texttextRequired - The text to change the letter case of.
- Format as
casetextRequired - How the text should be cased.One of:
uppercase(Uppercase (HELLO WORLD)),lowercase(Lowercase (hello world)),capitalize(Capitalize first letter (Hello world)),title(Title case (Hello World)),sentence(Sentence case (Hello world. Bye now.)),slug(Web address slug (hello-world)),snake(Snake case (hello_world)). Default:uppercase. - Language
languagetext - The language whose capital letters to follow. Most languages share the same ones; a few write some letters their own way, like the dotted İ in Turkish.Only when Format as is Uppercase (HELLO WORLD), Lowercase (hello world), Capitalize first letter (Hello world), Title case (Hello World) or Sentence case (Hello world. Bye now.). One of:
standard(Most languages),tr(Turkish (i → İ, I → ı)),az(Azerbaijani (i → İ, I → ı)),el(Greek (capitals without accents)),lt(Lithuanian (keeps the dot on an accented i)),nl(Dutch (ijs → IJs)). Default:standard.
Outputs
The text in the chosen letter case.
Example output
"Hello World"Get character at position
Get one character of text by its position, counting the first as 1 and the last as -1, like the first letter of a name for initials. Gives blank text when the text is shorter.
Inputs
- Text
texttextRequired - The text to take the character from.
- Position
positionnumberRequired - Which character: 1 for the first, 2 for the second, -1 for the last.
Outputs
The character at that position; blank when there is none.
Example output
"A"Get character code
Get the Unicode number of a character, like 65 for A or 233 for é: to tell lookalike characters apart, or for a system that wants the number.
Inputs
- Text
texttextRequired - The text the character is in.
- Position
positionnumber - Which character: 1 for the first (the default), -1 for the last.Default:
1.
Outputs
The character's Unicode number.
Example output
65Get part of text
Take a piece of text: what comes before or after a word or character, what sits between two, or a number of characters from a position. For example, the name before the @ in an email address.
Inputs
- Text
texttextRequired - The text to take a part of.
- Take
parttextRequired - Which part of the text to take.One of:
before(The text before),after(The text after),between(The text between),characters(Characters by position). Default:after. - Look for
markertext - The word or characters to look for, like @ or Order #. Letter case doesn't matter, and the first one found is used.Only when Take is The text before, The text after or The text between.
- Up to
end_markertext - Where the part ends: the next time this appears after the text looked for.Only when Take is The text between.
- From position
startnumber - The first character to take: 1 is the first character, -1 the last, -4 the fourth from the end.Only when Take is Characters by position. Default:
1. - Number of characters
countnumber - How many characters to take. Leave empty for the rest.Only when Take is Characters by position.
Outputs
The part of the text, without spaces around it. Blank text when what was looked for isn't there.
Example output
"ana"Join list into text
Turn a list into one piece of text.
Inputs
- List
itemslistRequired - The list of values to combine into one piece of text.
- Put between items
separatortextRequired - Use empty text to join with nothing.
- Each item as
eachtext - How to write each item, using @item for it, e.g. @item.key: @item.summary. Leave blank to use the items as they are.
Outputs
The list's items as one piece of text, with the separator between each.
Example output
"red, green, blue"Look up a value in a table
Turn one value into another with a small table you fill in, like US to United States or a status code to a label, instead of a chain of If steps.
Inputs
- Value to look up
valuetextRequired - The value to find in the table, like a country code.
- Table
tableobjectRequired - Each value to look for, and what to give back for it. Letter case and spaces around a value don't matter.
- If nothing matches
fallbacktext - What to give back when the value isn't in the table. Leave empty to get a blank.
- Case sensitivity
case_sensitivetrue/false - Match upper- and lower-case letters exactly. Off by default, so us, US and Us all match.Default:
false.
Outputs
What the table gives for the value, the fallback when it isn't there, or a blank without one.
Example output
"United States"Make plain text
Turn HTML, like an email body or a web page, or Markdown into plain text for a sheet, a text message or a plain email: tags and formatting marks removed, paragraphs, line breaks and bullets kept, and each link's address shown after its text.
Inputs
- Text
texttextRequired - The HTML or Markdown to turn into plain text.
- It's written in
sourcetext - What the text is written in.One of:
html(HTML (an email body, a web page)),markdown(Markdown (**bold**, # Heading)). Default:html.
Outputs
The text as a person reads it, without markup.
Example output
"Your order #42 (https://shop.example/o/42) shipped."Match keywords
Score text against your keyword lists to see how well it matches. Useful for tagging, filtering, or deciding what should happen next.
Inputs
- Text
texttextRequired - The text to score. Letter case is ignored.
- Strong keywords
strong_termslistRequired - Most important words or phrases. Each match adds 3 points.
- Medium keywords
medium_termslist - Fairly important words or phrases. Each match adds 2 points.
- Weak keywords
weak_termslist - Minor words or phrases. Each match adds 1 point.
- Score needed to pass
thresholdnumber - Total points needed to count as a match. Defaults to 3.Default:
3.
Outputs
Whether the text matched, its score, and which keywords it contains.
is_matchtrue/false- Whether the score reached the score needed.
matched_termslist- The keywords found, strong ones first, each with the list it came from.
scorenumber- 3 points for each strong keyword found, 2 for each medium one, and 1 for each weak one.
Example output
{
"is_match": true,
"matched_terms": [
{
"term": "we're hiring",
"tier": "strong"
},
{
"term": "join our team",
"tier": "medium"
},
{
"term": "engineer",
"tier": "weak"
}
],
"score": 6
}Normalize characters
Write accented letters and symbols one consistent way, so text that looks the same matches: é typed as one character or as e and an accent. Use it before comparing text from different apps or removing duplicates.
Inputs
- Text
texttextRequired - The text to normalize.
- Write it as
formtext - The Unicode form to write it in. The first is how most apps store text.One of:
nfc(Composed, as most apps store it (NFC)),nfd(Decomposed: é as e and an accent (NFD)),nfkc(Composed, lookalikes made plain: ² as 2 (NFKC)),nfkd(Decomposed, lookalikes made plain (NFKD)). Default:nfc.
Outputs
The text, written in the chosen form.
Example output
"Cr\u00e8me br\u00fbl\u00e9e"Pad text
Make text a set length by adding a character to its start or end, like 42 written as 0042 for an invoice number. Text that is already that long stays as it is.
Inputs
- Text
texttextRequired - The text or number to pad, like 42.
- Length
lengthnumberRequired - How many characters long it should be, like 4.
- Pad with
charactertext - The character to add. Defaults to 0.Default:
0. - Add it to the
sidetext - Which end of the text to add the characters to.One of:
start(Start (42 → 0042)),end(End (42 → 4200)). Default:start.
Outputs
The text, padded to the length.
Example output
"0042"Put text in quotes
Wrap text in quote marks for a search or a command, with a backslash before any quote mark inside so it can't end the quote early: Say "hi" becomes "Say "hi"".
Inputs
- Text
texttextRequired - The text to put in quotes.
- Quote marks
marktext - Which quote marks to use.One of:
double(Double ("text")),single(Single ('text')). Default:double.
Outputs
The text in quote marks.
Example output
"\"Say \\\"hi\\\"\""Query JSON
Pick out part of some data, or of JSON text, with a JMESPath query, like the ids of every open item: items[?status=='open'].id.
Inputs
- Data
valuetextRequired - The data to search, such as an API's response, or JSON written as text.
- Query
querytextRequired - A JMESPath query (jmespath.org), like orders[0].email for the first order's email, or items[?price > `100`].name for the names of items over 100.
Outputs
What the query picked out; blank when it found nothing.
Example output
[
"T-1",
"T-4"
]Read CSV text
Turn CSV written as text, such as an export pasted into an email or returned by an API, into rows keyed by the header row, the way Read a file reads a CSV file.
Inputs
- CSV text
texttextRequired - The CSV, header row first.
- Columns are separated by
separatortext - What separates the columns. Work it out reads the text and picks the one that fits.One of:
auto(Work it out),comma(Commas),semicolon(Semicolons),tab(Tabs),pipe(Pipes (|)). Default:auto. - First row
has_headertrue/false - Whether the first row names the columns. Without one, columns are column_1, column_2 and so on.Default:
true.
Outputs
The rows, keyed by the header row.
countnumber- How many rows.
headerslist- The column names, in order.
rowslist- One record per row, keyed by column name.
Example output
{
"count": 1,
"headers": [
"Name",
"Email"
],
"rows": [
{
"Email": "ana@example.com",
"Name": "Ana"
}
]
}Read JSON text
Turn JSON written as text, like an AI step's answer or a webhook body, into data whose fields later steps can use.
Inputs
- JSON text
texttextRequired - The text holding the JSON. It may be wrapped in a code block or a sentence.
Outputs
The data the JSON holds, usually a record or a list.
Example output
{
"name": "Ana",
"plan": "pro"
}Repeat text
Write text a number of times, like a line of 20 dashes to divide an email or a row of stars for a rating.
Inputs
- Text
texttextRequired - The text to repeat, like - or ★.
- Times
timesnumberRequired - How many times to write it, like 20.
- Between each
separatortext - What to put between each copy, like a comma or a space. Nothing by default.
Outputs
The text, written that many times.
Example output
"\u2605\u2605\u2605"Replace text
Find text and replace it with something else.
Inputs
- Text to search through
texttextRequired - The text to search through.
- Text to find
searchtextRequired - The text to find, or a pattern. Every occurrence is replaced.
- Replace with
replacetextRequired - The text to put in its place.
- Case sensitivity
case_sensitivetrue/false - Match upper- and lower-case letters exactly (the default). Turn this off to treat them as the same.Default:
true. - Find
search_typetext - The exact text, or a pattern (a regular expression). With a pattern, $1 in the replacement puts back what its first group in brackets matched, $2 the second.One of:
text(The exact text),pattern(A pattern (regular expression)). Default:text.
Outputs
The text with every occurrence of the text searched for replaced.
Example output
"Order #123 is shipped"Shorten text
Shorten text so it fits within a set number of characters. By default no ending is added; set an ending like “…” to append one when text is cut. The ending counts toward the limit, so the result never exceeds it.
Inputs
- Text
texttextRequired - The text to shorten.
- Maximum characters
lengthnumberRequired - Text longer than this is shortened.
- Ending
ellipsistext - Optional ending added when text is shortened, e.g. “…”, counted within the character limit. Leave blank (the default) to shorten without any ending.
- Whole words
dont_split_wordstrue/false - Keep whole words instead of cutting one in the middle. When on, the text is shortened at a word boundary, so the result may come out a little shorter than the limit.Default:
false.
Outputs
The text cut to at most the given number of characters, the ending included, or unchanged if it was short enough.
Example output
"The quick brown fox..."Split text
Split text into a list, at a separator such as a comma, or into pieces no longer than a set number of characters (to fit a message or an AI prompt). Spaces around each piece are left out.
Inputs
- Text
texttextRequired - The text to break into pieces.
- Split
bytext - Where the text is broken: at a separator, or into pieces of a set length.One of:
separator(At a separator),length(Into pieces of a set length). Default:separator. - Split at
delimitertext - The text to break at, such as a comma or a space.Only when Split is At a separator.
- Characters per piece
lengthnumber - The most characters a piece can have. Pieces break between paragraphs, sentences or words where they can.Only when Split is Into pieces of a set length.
Outputs
The pieces of the text, between the separators or of the set length.
Example output
[
"red",
"green",
"blue"
]Trim whitespace
Remove spaces, tabs, and line breaks from the start and end of text.
Inputs
- Text
texttextRequired - The text to trim.
- Trim from
modetext - Which ends to trim: both ends, only the start, or only the end. Defaults to both ends.One of:
both(Both ends),left(Start),right(End). Default:both.
Outputs
The text with spaces, tabs and line breaks removed from its start, its end, or both.
Example output
"Hello world"Use a fallback if empty
Use a value, or a fallback when it is empty, like a first name or "there" when a contact has none. Zero and false count as values.
Inputs
- Value
valuetextRequired - The value to use when it isn't empty.
- Fallback
defaulttextRequired - What to use instead when the value is missing, blank, or an empty list.
Outputs
The value, or the fallback when the value is empty.
Example output
"there"Validate text
Check whether text is a valid email address, web address, phone number, number or domain name, or whether it matches a pattern of your own.
Inputs
- Text
texttextRequired - The text to check, such as an email address, web address or phone number.
- Validate as
typetextRequired - What kind of value to check for.One of:
email(Email address),url(Web address),phone(Phone number),number(Number (12.50, 1,200, $5)),domain(Domain name (example.com)),pattern(Matches my own pattern). Default:email. - Country
regiontext - The country of numbers written without a country code. A number that starts with its own, like +44, is checked against that country instead. Defaults to the United States.Only when Validate as is Phone number. Default:
US. - Pattern
patterntext - A regular expression the text must contain a match of, like ^INV-\d{4}$ for an invoice number. Start it with ^ and end it with $ to test the whole text.Only when Validate as is Matches my own pattern.
Outputs
Whether the text is a valid email address, web address, phone number, number or domain name, or matches the pattern, whichever was chosen.
Example output
trueWork out country
Work out which country someone typed, however they wrote it (USA, U.S., United States, Deutschland, DE), and give its name, two-letter code and continent, ready to send people from different countries or regions to different places.
Inputs
- Country
countrytextRequired - The country as it was typed: a name in English or its own language, or a two- or three-letter code. Capital letters, accents and dots don't matter.
Outputs
The country's name, two-letter code and continent, and whether it was recognized.
codetext- The country's two-letter code, like DE, US or GB. Empty when it isn't recognized.
continenttext- Africa, Antarctica, Asia, Europe, North America (which includes Mexico, Central America and the Caribbean), Oceania or South America. Russia counts as Europe, and Turkey as Asia. Empty when the country isn't recognized.
foundtrue/false- Whether the text was recognized as a country.
nametext- The country's name in English, like Germany. The text as it was typed when it isn't recognized.
Example output
{
"code": "DE",
"continent": "Europe",
"found": true,
"name": "Germany"
}Write CSV text
Write rows as CSV text, to put in a message or send to an API. A list of records gets a header row of their fields. To attach a CSV file, use Create a file instead.
Inputs
- Rows
rowslistRequired - The rows to write, such as the rows a sheet returned or a list of records.
- Separate columns with
separatortext - What goes between the columns.One of:
comma(Commas),semicolon(Semicolons),tab(Tabs),pipe(Pipes (|)). Default:comma.
Outputs
The rows as CSV text, header row first.
Example output
"Name,Email\r\nAna,ana@example.com\r\n"