Jump to a Section
  • At

    Return the single character at a specified position in a text input, where 0 is the first position. To get a whole segement rather than a single character, use the Text Segment function. To search for a single character, use Find.

    Input Fields

    • text: The input text.
    • position: The location of the character, where 0 is the first position.

    Output Fields

    • character: The character at the specified location in the input text.

    Examples

    If text is Hello, World!
    If position is 0 then character is H
    If position is 1 then character is e
    If position is 5 then character is ,
    If position is 12 then character is !

  • Base64

    Returns the base64 encoding of a string. For example, input “Hello”, would return “SGVsbG8=”. What is base64?

    Input Fields

    • text: the word/text that will be converted into base64.

    Output Fields

    • output: returns the base64 encoding of the input text.
  • Base64 Decode

    Returns base64 decoded text. For example, the input “SGVsbG8=” would decode to “Hello”.

    Input Fields

    • text: base64 encoded text.

    Output Fields

    • output: returns the decoded version of the text.
  • Compose

    Combine text you type and fields you drag and drop in. At runtime, all of the text is combined with the values of the fields to generate a single text output.

    For instance, you might compose an email by starting with the following text:

    Dear ,

    This is a reminder to please pay the following bill:

    Invoice number:
    Date:
    Amount:

    Thank you.

    And then you can insert fields from earlier in your Flow that have the appropriate values for name, invoice number, date, and amount. Drag and drop each field to where the cursor is directly over the position in the text where you want to insert the field. The function will generate a single output that, for this example, you can pass directly into the action that sends an email.

    After fields have been inserted, you can click and drag to move them. To delete a field, click to the right of the field and then use Delete or Backspace.

    ADVANCED USER TIP:  The Compose function is good at “cleaning up” text fields that may be typed incorrectly. For example, if you do a HTTP Get from an API that sometimes returns text and sometimes returns numbers, then that output field can lead to runtime errors in your Flow. If you pass a field into Compose that was incorrectly typed, the Compose function will convert it to text without error.

    Input Fields

    The function has one large input area that accepts a combination of text you type and fields you drag/drop in.

    Output Fields

    output - the result of combining the text with the values of the fields

  • Concatenate

    Takes the inputs and combines them, without spaces, into a single text output. You can also do this using Compose.

    Input Fields

    • text1: the starting text
    • text2: the text that will follow
    • The more text you want to combine, the more input fields you can add one at a time.

    Output Fields

    • output: all of the input fields combined into a single text

    Example

    If you have two fields from a previous step in your Flow: first name and last name, you can create a single name output using Concatenate. To do this:

    • Add a third input.
    • Map first name to the first input
    • Enter a single space in the second output
    • Map last name to the third input
    • When the Flow runs, the output will combine all three, turning “John”, “ “, “Smith” into “John Smith”
  • Find

    Finds the first instance of a string within another string. To do a more complex search, such as looking for a string that matches a pattern, use the Find Pattern function instead.

    Input Fields

    • look in is the text you want to search inside.
    • look for is the text you want to search for.

    Output Fields

    • position is the position of the first match, where 0 is the first position. Returns -1 if it is not found.

    Examples

    If look in is “This is a test”:

    • If _look for_ is “T” then position is 0 (first position, where counting starts with 0).
    • If _look for_ is “test” then position is 10 (11th position).
    • If _look for_ is “hello” then position is -1 (no instance found).
  • Find Email

    Find and return the first instance of a valid email address in text.  For example, if the input is ”You can reach me at fred@example.com or support@example.com”, the output will be “fred@example.com”.

    Input Fields

    • text: the text to search for an email

    Output Fields

    • email: the first email found, if any; if the input text does not contain a valid email address, the output field is empty

    Usage Examples

    • Validate Email Submissions: Used in combination with Return Error If, Continue IfIf/Else, or other functions, the Find Email action can be used to validate email field submissions and take appropriate actions. For example, in the below screenshot, if the email submission is not a valid email, an error will be thrown by the Return Error If action.

      screen-shot-2016-09-30-at-11-34-14-am

  • Find Last

    Search for the last match inside text. Returns the position number or -1 if not found.

    Input Fields

    • look in (text): the text to search inside
    • look for (text): the text that will be searched for
    • right-most position (number): optional - the right-most position to search, where 0 is the first position

    Output Fields

    • position (number): the position of the last match, where 0 is the first position. Returns -1 if there is no match.

    Examples:

    If look in is “Mississippi”:

    • If look for is “ss” and right-most position is not provided, then position is 5. (the position of second “ss”)
    • If look for is “ss” and right-most position is 4, then position is 2. (searches only “Missi” - stops at position 4)
    • If look for is “abc”, then position is -1. (not found)
  • Find Pattern

    Search text for the first match of a pattern.

    Input Fields

    • look in is the text you want to search inside.
    • look for is the text you want to search for and/or pattern to match. Patterns must follow a standard pattern format called a regular expression (see details below).

    Output Fields

    • position is the position where the first match begins, where 0 denotes the very beginning. Returns -1 if there is no match.

    Pattern Options

    Unlike the Find function, Find Pattern also supports regular expressions. Examples of regular expressions include:

    • \w - finds any alphanumeric character (e.g. a letter or number)
    • \s - finds any whitespace character (e.g. a blank or tab)
    • \d - finds any digit
    • [1-5] - finds a number between 1 and 5
    • [aeiou] - finds a, e, i, o, or u
    • hello|test - finds “hello” or “test”
    • colou?r - finds “color” or “colour” (the ? signifies that there can be zero or one of the preceding element)
    • \d{5} - finds five consecutive digits (the {number} signifies a number of consecutive instances of the preceding element)
    • [^\w] - finds any character that is not an alphanumeric character. You can add the not operator ^ before any other pattern, e.g. [^a] to find anything other than a or [^\d{3}] to find anything that is not 3 digits in a row

    Many characters have special meaning in regular expressions, such as ., +, *, \ and more. To search for any of those characters you need to place a \ before the character. For instance: * \. - finds a period

    You can combine any of the above patterns and fixed text. For instance: * test\.\d{3} - finds the word “test” followed by a period followed by 3 consecutive digits

    Examples:

    For simple searches, Find Pattern works the same as Find.

    If look in testing_123:

    • look for test -> position 0 (found at very beginning)
    • look for ing -> position 4 (4 means it comes after the 4th, starts in the 5th position)
    • look for hello -> position -1 (no match found)
    • look for \d -> position 8 (first digit)
    • look for \w_\d -> position 6 (any character then underline then any digit)
    • look for esting_\d{3} -> position 1 (“esting_” followed by any 3 digits)

    Find Pattern is often used in combination with Text Segment to get the text that matched the pattern.

  • Length

    Returns the length of text, in number of characters.

    Input Fields

    • text

    Output Fields

    • Returns the number of the letters/characters in the text.

    Examples

    The length of “test” is 4
    The length of “test-1” is 6
    The length of “test 1” is also 6 (a blank also counts as a character)

  • Random

    Returns random text of a specified length.

    Input Fields

    • length (number): the length of the desired text.

    Output Fields

    • output: randomly generated text, of the specified length, composed of both numbers and letters of varying case.

    e.g.: input length “5” could return “ynt6N”.

  • Replace

    Search and replace text.

    Input Fields

    • look in is the full text to start with.
    • look for is the text to search for, or can be a pattern to match using a format called regular expressions. (For more details on search patterns, see Find Pattern.
    • replace with is the text you want to replace it with.
    • all instances - set to True to replace all instances of look for with replace with, or False to replace just the first instance that is found.
    • case sensitive - set to True if the case of look for must be an exact match. If False, then Test would match test, TEST, and tEsT.

    Output Fields

    • result text is the resulting text after any replacements are made. If no instances of look for are found, then result text is the same as the input look in you started with.

    Examples:

    • If look in is Hello world, look for is Hello, and replace with is Goodbye, then result text is Goodbye world
    • If look in is (206) 555-1234, look for is \d (regular expression for any digit), and replace with is #, and all instances is True, then result text is (###) ###-####
    • If look in is Visa 123456780123, look for is \d{8} (regular expression for 8 digits in a row), and replace with is ########, then result text is Visa ########0123
    • If look in is A*B@C+D, look for is [^\w] (regular expression ^ for not combined with \w for any alphanumeric character), replace with is left empty, and all instances is True, then result text is ABCD
  • Replace Patterns

    Find and replace any of multiple patterns with a single value. For any find and replace that looks for a single text or pattern, use Replace instead.

    Input Fields

    • look in is the full text to start with.
    • replace with is the text to replace any instances found, or leave it empty if you want to remove them (i.e. replace them with nothing).
    • all instances - set to True to replace all matches, or False to replace just the first instance that is found.
    • case sensitive - set to True if the case of any pattern must be an exact match. If False, then Test would match test, TEST, and tEsT.
    • patterns - unlike the Replace function that searches for a single text or pattern, patterns allows you to add multiple texts or patterns to search for – all to be replaced with the same replace with text. Add a new input to the patterns section for each additional pattern you want to search. The name of each input is ignored.

    Output Fields

    • result text is the resulting text after any replacements are made. If no instances of the _patterns_ are found, then result text is the same as the input look in.

    Example Usage:

    You could use this function to strip out a set of characters from a larger look in text. To do this, add fields in the patterns section, one for each string you want to strip out, and leave replacement blank.

    You could use this function to obscure certain characters in text by replacing them with an asterisk.

    Pattern Options

    Each Pattern can be simple text to search for or can be a more complex pattern, using a standard pattern format called regular expressions. Examples of regular expressions include:

    • \w - finds any alphanumeric character (e.g. a letter or number)
    • \s - finds any whitespace character (e.g. a blank or tab)
    • \d - finds any digit
    • [1-5] - finds a number between 1 and 5
    • [aeiou] - finds a, e, i, o, or u
    • hello|test - finds “hello” or “test”
    • colou?r - finds “color” or “colour” (the ? signifies that there can be zero or one of the preceding element)
    • \d{5} - finds five consecutive digits (the {number} signifies a number of consecutive instances of the preceding element)
    • [^\w] - finds any character that is not an alphanumeric character. You can add the not operator ^ before any other pattern, e.g. [^a] to find anything other than a or [^\d{3}] to find anything that is not 3 digits in a row

    Many characters have special meaning in regular expressions, such as ., +, *, \ and more. To search for any of those characters you need to place a \ before the character. For instance:

    • \. - finds a period

    You can combine any of the above patterns and fixed text. For instance:

    • test\.\d{3} - finds the word “test” followed by a period followed by 3 consecutive digits

    See Find Pattern for more pattern examples.

  • Split

    Split text into a list of text segments separated by commas or other specified delimiter. 

    Input Fields

    • text: The text that will be split up (e.g. one,two,three).
    • separator: The sequence of one or more characters in the input text that indicator where to break it up. The separator can be a single character like a comma, a sequence of characters like as a comma followed by a space, or even include a line break (just type the “Enter” key while typing a value into the separator input).

    Output Fields

    • result list: A list of text (e.g. if splitting one,two,three using separator ,, then result list is a list of three texts: one, two, and three.)

    Tip: If there are spaces in between words separated by a comma such as This, is, an, example, then be sure to include a space after the comma as the separator so the result doesn’t include spaces at the beginning of words. If the spaces are only there sometimes, you can use Trim to get rid of them.

  • Text Segment

    Return a portion of text (formerly called “Substring”).

    Input Fields

    • text: The text containing the segement you want to extract.
    • start at: The position of the first character you want to extract in ‘text’ where 0 is the first character, 1 is the second, and so on.
    • end before: The position one greater than the last character you want to extract. If left blank or the number is greater than or equal to the length, it will extract all the way to the end. If end before is less than start at, the arguments are swapped.

    Output Fields

    • segment: The extracted text segement as specified

    Examples:

    If ‘text’ is Example:

    • start at 0 and end before 2 -> segment Ex
    • start at 2 and end before left empty -> segment ample
    • start at 3 and end before 5 -> segment mp
  • To Lower Case

    Converts all letters in text to lowercase.

    Input Fields

    • text: The start text.

    Output Fields

    • output: The text with all letters in lowercase.

    Example:

    JohnDoe@CompanyName.Com –> johndoe@companyname.com

  • To Upper Case

    Converts all letters in text to UPPERCASE.

    Input Fields

    • text: The start text.

    Output Fields

    • output: The text with all letters in uppercase.

    Examples:

    aBcdeFg –> ABCDEFG
    This is a test. –> THIS IS A TEST.

  • Trim

    Remove leading and trailing blank space from text.

    Input Fields

    • text: The text you want to remove white space from the start and end, such as         Hello, World  .

    Output Fields

    • output: The text with the space removed. For the above example, would be Hello, World.
  • Unique ID

    Returns a random universally unique identifier (UUID), sometimes called a globally unique identified (GUID). It is represented as 32 hexadecimal (base 16) digits displayed in five groups separated by hyphens.

    For example: e83bbc57-1991-417f-8203-3affb47636cf.

    Use this when you need to assign a unique ID, such as a tracking number for a transaction. This is the same algorithm we use to assign unique IDs to each Flow execution and to each new row in a table.

    The algorithm to generate the random UUID is RFC 4122 version 4. According Wikipedia, “the probability to find a duplicate within 103 trillion version 4 UUIDs is one in a billion.”

    Output Fields

    • unique ID: A randomly generated UUID in the format shown above.