Use fields functions to extract part of your data

Modified on Wed, 14 Jun 2023 at 04:14 PM

When utilizing data fields in various scenarios such as saving emails to folders or printing emails with fields, it is possible to extract only a portion of the data. This functionality proves useful when dealing with lengthy strings and you only require a specific section, such as an email or an order number.

Example: let's consider a scenario where you want to save an email to a folder using the email's unique ID as part of the folder or filename. However, the ID is quite long, like "%22456464xcvrg4vcv@sgdcv12%". In this case, you can extract only the last 4 digits by using the following function: RIGHT(%EMAIL_ID%, 4).

The following functions are available for your use:

- LEFT(field,X) = extract the X number of characters from the start (for example LEFT("Order received from King of Flowers", 5) return "Order")

- RIGHT(field,X) = extract the X number of characters from the end (for example RIGHT("Order received from King of Flowers", 7) return "Flowers")

- MID(field,X,Y) = extract the Y number of characters from the X position (for example MID("Order received from King of Flowers", 6, 8) return "received")

- REGEX() = use regular expressions to extract data, this function is particular and requires some computer skills. For more information on RegEx please check these sites:

Here some basic examples to use REGEX in the fields:
- Extract all numbers in the email subject field:

- Exclude the characters #: in the attachment filename:

- Exclude some keywords: in the attachment filename:

- Exclude the characters FW: in subject of email:

- Extract text between a word and another:
REGEX(%EMAIL_BODY%,(?<=My words).[^last word]*)

Use right function to extract data

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article