Formatting text is possible using Formatter app in Automate.io. Using Formatter's Format Text action, you can perform some of the below mentioned actions.

  1. Split Text

  2. Replace Text

  3. Trim Text

  4. Cut Text

  5. Extract Number

  6. Extract URL

  7. Extract Email

  8. Extract Text from HTML

  9. Match Regular Expression

  10. Upper Case

  11. Lower Case

  12. Title Case


Where do I find OR How do I use Formatter in my Bot?

You can find Formatter while you are creating a Bot. To use Formatter, first, add a Trigger app to your Bot. Then, select Formatter from the Apps list while specifying the Action to be performed by the Bot.


Let's now understand the Format Text action of Formatter app.

✅ Split Text

This operation splits a given text based on a letter or word or special characters like space, new line, or tabs. Please follow below steps to format the text in your Bot.

  1. Under Operation, select Split Text. You'll see relevant fields below it.

  2. Select the text that you want to split in the Text field.

  3. Under Separator, enter a character or word or a special character on which you want to split the text. By default, [:space:] is the special character.

  4. Under Position, select the segment of the split text you want to use. You can also specify a custom index number using the ‘custom value' option. The text that you want to use gets stored in Split Text in Output Fields.

Let's see when this operation can come in handy.

Example: Say you want to send data from a specific trigger app to a CRM, and the trigger app outputs the customer name only as 'Fullname'. However, every CRM requires the customer name separately as 'First Name' and 'Last Name'.

The above example is a perfect case to make use of Split Text in Formatter. Using Split Text, you can split Fullname into First Name and Last Name, and move them to your CRM without any hassle.


✅ Replace Text

This operation allows you to find text (character, word, phrase) and replace it with any other text.

  1. Under Original Text, select the text field.

  2. Find the text that you want to replace.

  3. Enter the new text that you want to replace the above text with. You can leave this empty if you wish to just remove the above text.

  4. The updated text is stored in Replaced Text under Output Fields.

Example: Original text being 'Automate.io is an amazing product!' - we can use 'amazing' in Find box, and put 'awesome' in Replace with box. The output will be 'Automate.io is an awesome product!'

You can also replace special characters using this operation. Check out the section Codes for Special Characters at the bottom of this article.


✅ Trim Text

Trim Text operation simply removes spaces at the beginning and the end of the text.


✅ Cut Text

Cut Text operation slices and extracts a chunk of text from the given input text.

  1. Under Text, select the text field.

  2. Enter the start index (start position) from where you want the text to be extracted. You can leave this blank if you want the start position to be the beginning of the text.

  3. Enter the end index (end position). You can leave this blank if you want to cut till the end of the text.

  4. The output will be a chunk of text that begins from the Start Position up to but not including the End Position. And it will be stored in Cut Text under Output Fields.

Example: Let's say you want to cut the part, 'wock' from the text, 'Jabberwocky'. The index of the letter 'J' is 0, that of 'a' is 1, that of the first 'b' is 2, second 'b' is 3 and so on. Similarly, the index of the letter 'y' will be 10. To cut 'wock', enter the Start and End positions as 6 and 10 respectively.


✅ Extract Number

Finds the first number in the given text and extracts it.

✅ Extract URL

Finds a URL in the given text and extracts it.

Extract Email

Finds an email address in the given text and extracts it.

Extract Text from HTML

Removes all the HTML tags and leaves just the plain text.


✅ Match Regular Expression

A regular expression allows you to find matches in a text without being specific on the exact text you are looking for.

Example: Say you regularly get emails containing phone numbers, email addresses, or links, and you would like to separate them and use them. You can either do a manual copy & paste work or let Formatter's Match Regular Expression automatically do that for you.

Let's see how to use this operation in your Bot.

  1. Under Regular Expression, give a pattern of text to match, i.e., enter the kind of text that you are searching for here. For example, if you want to search for email addresses, type the regex script, ([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5}). With this, any text that matches this pattern gets returned as output.

  2. Under Text, enter the text or field from which you would like to find a pattern. For example, this field can have the body field of your email from Gmail.

  3. Automate.io finds a match, extracts the text, and saves it in the Matched Text field. You can pass this extracted data to another app in your Bot.

For more information on regular expressions and regex scripts, visit this page.


✅ Upper Case

Converts every letter in a given text field into upper case.

Example: automate ➡️ AUTOMATE

✅ Lower Case

Converts every letter in a given text field into lower case.

Example: AUTOMATE ➡️ automate

✅ Title Case

Capitalizes the first letter of every word.

Example: automate ➡️ Automate


Codes for Special Characters

[:space:] - for spaces (\s)
[:newline:] - for new lines character (\n)
[:tab:] - for tab space character (\t)
[:return:] - for carriage return character (\r)
[:blank:] - for specifying nothing

Did this answer your question?