Text functions

When you're building workflows in Tines, you'll often need to work with text data. Maybe you need to combine a first name and last name, clean up extra spaces from a form submission, or extract specific information from a longer piece of text. Text functions help you manipulate and transform text data to get it exactly how you need it.

Think of text functions as your text editing tools. They help you clean, combine, format, and extract information from text without having to do it manually.

Tines gives you powerful text functions to handle common text manipulation tasks. We'll take a look at these specifically in this section:

  • UPCASE - Converts text to all uppercase letters.

  • STRIP - Removes extra whitespace from the beginning and end of text.

  • REGEX_EXTRACT - Extracts specific patterns from text.

  • REGEX_REPLACE - Finds and replaces patterns in text.

UPCASE: Make text uppercase 

The UPCASE function converts all letters in your text to uppercase. This is useful when you need consistent formatting or want to make text stand out.

Basic syntax 

UPCASE(text)

Example 

We want to capitalize the value of an employee's department key (from a "Get Employee" upstream action):

{
  "name": "Jane Smith",
  "email": "jsmith@company.com",
  "department": "marketing"
}

UPCASE formula:

UPCASE(get_employee.department)

Output:

MARKETING

STRIP: Remove extra whitespace 

The STRIP function removes whitespace (spaces, tabs, and newlines) from the beginning and end of text. This is incredibly useful for cleaning up data from pages or external systems.

Basic syntax 

STRIP(text)

Example 

We received some input data from a user on a survey, but when they provided their email address, they accidentally included whitespace around the value:

{
  "name": "Angelo Pratt",
  "survey_score": "8",
  "email": "  apratt@company.com "
}

Let's clean up that data using a STRIP formula in a subsequent, connected action:

STRIP(intake_form.email)

Output:

apratt@company.com

REGEX_EXTRACT: Extract patterns from text 

The REGEX_EXTRACT function finds and extracts specific patterns from text using regular expressions (regex). This is powerful for pulling out specific information like email addresses, phone numbers, or codes from longer text.

Basic syntax 

REGEX_EXTRACT(text, pattern)

🪄Tip

REGEX_REPLACE: Find and replace text patterns 

The REGEX_REPLACE function searches for patterns in text and replaces them with something else. This is useful for cleaning data, formatting text, or removing unwanted characters.

Basic syntax 

REGEX_REPLACE(text, pattern, replacement)

🪄Tip

Was this lesson helpful?

Built by you,
powered by Tines

Already have an account? Log in.