Text
API actions for the Text integration.
Text
Edit, split, join, search, and check text.
Check end of text
Check whether text ends with specific words or characters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
suffix | string | Yes |
Response
{
"status": "success"
}Extract from text
Pull matches out of text — an email address, web address, number, or your own pattern.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
type | string | Yes | What to pull out of the text. |
pattern | string | No | A regular expression to search for. Used only when Extract is set to Custom pattern. |
all_matches | boolean | No | Return only the first match, or every match as a list. |
Response
{
"status": "success"
}Format text
Change the letter case of text — make it uppercase, lowercase, capitalize the first letter, or use title case.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
case | string | Yes | How the text should be cased. |
Response
{
"status": "success"
}Join list into text
Turn a list into one piece of text.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
items | array | Yes | |
separator | string | Yes | Use empty text to join with nothing. |
Response
{
"status": "success"
}Match keywords
Score text against your keyword lists to see how well it matches. Useful for tagging, filtering, or deciding what should happen next.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
strong_terms | array | Yes | Most important words or phrases. Each match adds 3 points. |
medium_terms | array | No | Fairly important words or phrases. Each match adds 2 points. |
weak_terms | array | No | Minor words or phrases. Each match adds 1 point. |
threshold | number | No | Total points needed to count as a match. Defaults to 3. |
Response
{
"status": "success"
}Replace text
Find text and replace it with something else.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
search | string | Yes | |
replace | string | Yes |
Response
{
"status": "success"
}Split text
Split text into a list.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
delimiter | string | Yes | The text to break at, such as a comma or a space. |
Response
{
"status": "success"
}Check start of text
Check whether text starts with specific words or characters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
prefix | string | Yes |
Response
{
"status": "success"
}Check if text includes
Check whether text includes specific words or characters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
substring | string | Yes |
Response
{
"status": "success"
}Count characters
Count how many characters are in text.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes |
Response
{
"status": "success"
}Trim whitespace
Remove spaces, tabs, and line breaks from the start and end of text.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
mode | string | No | Which ends to trim: both ends, only the start, or only the end. Defaults to both ends. |
Response
{
"status": "success"
}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.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
length | number | Yes | Text longer than this is shortened. |
ellipsis | string | No | Optional ending added when text is shortened, e.g. “…”, counted within the character limit. Leave blank (the default) to shorten without any ending. |
dont_split_words | boolean | No | 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. |
Response
{
"status": "success"
}Validate text
Check whether text is a valid email address, web address, or phone number.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | |
type | string | Yes | What kind of value to check for. |
region | string | No | The country the number should belong to, as a two-letter code. Used only when checking a phone number. Defaults to US. |
Response
{
"status": "success"
}Count words
Count how many words are in text.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes |
Response
{
"status": "success"
}