Welcome to Albato Help

Data Cropping Tool


IN THIS ARTICLE

The Data Cropping tool extracts part of a text value. Use it to keep a section from the beginning or end of a string, or a section in the middle, such as the third through fifth characters.

The first example extracts an identifier from a URL.

An InSales online store sends a URL containing a Google click identifier (GCLID), such as http://www.site.com/?gclid=1234. Use Data cropping to extract 1234 and send it to Google Sheets.

Watch our video guide to learn how to use this tool.

 

Step 1. Adding the Tool

Open your automation, click the plus sign (+) between the steps, and select Tool.

datacropping1.png

Select Data cropping.

datacropping3.png

 

Step 2. Configuring the Tool

Configure the following six fields.

datacropping2.png

  1. Create a name for the dataset that will be formatted.

  2. Choose a value for data processing. In this example, select “URL from where they went to the website” from the InSales trigger.

  3. Select the data cropping direction, that is, choose where the clipping will start: from the beginning or from the end. In this example, start from the beginning to process the value from left to right. If we choose the “from the end” option, the algorithm will be mirrored and run from right to left.

  4. Choose the data cropping type. There are 2 types: “By a number of characters” and “By a specified character”. In our case, we will select the type “By a specified character”. Next, we configure the data-slicing algorithm itself.

  5. In “what character to start cropping from”, specify the start marker for the data to extract. For this InSales – Google Sheets example, enter “d=” to extract 1234.

  6. Leave “Up to what character to crop” empty and select “Crop to the end”. This extracts the data from the position specified in item 5 to the end of the string.

To stop extraction before the end of the string, enter an end marker in “Up to what character to crop”.

 

How to Split a Full Name into Separate Parameters

In the next example, we will split a full name into two separate values (First name and Last name) with the Data Cropping tool. We will use the tool twice, because each Data Cropping step extracts only one part of the string.

Example input: Michael Johnson.

Our goal is to extract:

  • Michael → first name.
  • Johnson → last name.

The automation consists of the following steps.

 

Step 1. Create the Automation

  • Trigger: Google Sheets: watch for cell change and send the row;
  • Tool: Data Cropping (first parameter);
  • Tool: Data Cropping (second parameter);
  • Action: any app where you need the separated values.

exampledatacropping1.png

Important: To split a string into multiple parameters, you need to add the Data Cropping tool as many times as needed, one tool per parameter.

 

Step 2. Extract the First Parameter (First Name)

exampledatacropping2.png

In this step, we extract everything before the first space.

  1. In the Value for processing field, select the Full name value from the trigger (for example, a Google Sheets column).
  2. Set the Data cropping type to Cropping data by a specified character.
  3. Enable Crop from the beginning.
  4. Then enter a space in the Up to what character to crop field to extract the first name.

The tool returns: Michael

 

Step 3. Extract the Second Parameter (Last Name)

Now we extract everything after the last space. When extracting the last value from a string, use Crop from the end of the row together with Up to what character to crop. The tool will search for the specified character from the end and return everything that comes after it.

exampledatacropping3.png

  1. In the Value for processing field, select the same Full name value from the trigger.
  2. Set the Data cropping direction to Crop from the end of the row.
  3. Keep Crop from the beginning enabled (this option defines which part is removed, not the cropping direction), then enter a space in the Up to what character to crop field to extract the last name.

The tool returns: Johnson

 

Step 4. Add an Action

After configuring the Data Cropping tool, add an action step where the extracted values (first name and last name) will be sent, for example, to a CRM field, a Google Sheets column, or any other connected app.

You can use the same approach to extract other parameters as well, such as middle names, phone codes, order numbers, IDs, or any values separated by spaces or other characters (commas, dashes, or symbols).

Did this answer your question?