Search HoldMyTwist

Clean messy text in Make with trim and lower

Remove spaces at the edges of a label and standardise its capitalisation in Make Free. Build a two-module practice workflow, inspect the result and learn what trim leaves unchanged.

Paper strips passing through an alignment machine, with tangled strips on one side and straight strips on the other

A product label copied from a form can arrive with extra spaces or inconsistent capitals. Use Make's trim and lower functions (opens in a new tab) to prepare a consistent label before the next step in your workflow.

Before you start

This exercise uses fictional text and two built-in Tools modules on Make Free. It runs manually and sends nothing to another app. You need a Make account to follow along.

Create your free Make account (opens in a new tab)

Already have an account? Sign in and continue below.

1. Create a label to clean

  1. Open Scenarios, click Create scenario and name it Text cleanup practice.
  2. Select Tools, then Set variable. Enter raw_label in Variable name.
  3. Paste the line below into Variable value. Make turns each space expression into a coloured token. There should be two tokens before BLUE NOTEBOOK and two after it.
  4. Click the module's Save. Keep the scenario Inactive.
Text to copy

{{space}}{{space}}BLUE NOTEBOOK{{space}}{{space}}

The tokens create two spaces at each end. They keep the example reproducible because the editor can remove spaces typed at the edges of a plain-text value.

Full Make editor with raw_label set to BLUE NOTEBOOK surrounded by two space tokens at each end

Full Make editor with raw_label set to BLUE NOTEBOOK surrounded by two space tokens at each end
Open full-size image

2. Apply trim, then lower

  1. Click the plus beside the first module. Add another Tools > Set variable module.
  2. Enter clean_label in Variable name. Paste the formula below into Variable value.
  3. Check that raw_label appears as a coloured mapping token from module 1, inside trim, which is inside lower. Click the module's Save, then the scenario's bottom Save.
Text to copy

{{lower(trim(1.raw_label))}}

The number 1 is the first module's ID in this example. If your ID differs, select its raw_label value from the mapping panel instead. Make's function instructions (opens in a new tab) explain how to insert functions and mapped values.

Full Make editor with clean_label using lower around trim and the mapped raw_label token

Full Make editor with clean_label using lower around trim and the mapped raw_label token
Open full-size image

Watch out

trim removes spaces at the edges. It leaves spaces between words unchanged. lower changes every letter to lowercase, so use it only when that is the format you want. Keep the original value when spelling or capitalisation matters.

3. Run once and read the result

  1. Click Run once. Wait for the run to finish.
  2. Click the small operation bubble above the second Tools module.
  3. Read Output. The clean_label value should be blue notebook.

Full Make editor with the second Tools module output showing clean_label as blue notebook

Full Make editor with the second Tools module output showing clean_label as blue notebook
Open full-size image

Each Tools module used one credit in this exercise, for two credits per run. Free includes 1,000 credits per month. Check Make's current plan limits (opens in a new tab) before budgeting a larger workflow.

4. Check what stays unchanged

  1. Open the first module and replace its Variable value with the line below. It adds two spaces between the words as well.
  2. Click the module's Save, then Run once. Inspect the second module's Output again.
Text to copy

{{space}}{{space}}BLUE{{space}}{{space}}NOTEBOOK{{space}}{{space}}

The result has lowercase letters and still has two spaces between blue and notebook. trim does not collapse that gap.

Full Make editor with clean_label retaining two spaces between blue and notebook after trimming

Full Make editor with clean_label retaining two spaces between blue and notebook after trimming
Open full-size image

For another check, use only {{space}}{{space}} as the first value. The cleaned result is blank; Make displays it as empty. Decide how your real workflow should handle a blank label before passing it on.

If the result looks wrong

  • If the output contains the formula itself, reopen the second module. Check that the functions and raw_label appear as tokens, not plain text.
  • If raw_label is missing, check that the modules are connected in order and that you saved the first module's variable name.
  • If the output is blank, inspect the first module's output. A spaces-only input becomes blank after trimming.

Restore the original label and save when you finish. Leave this practice scenario Inactive. In a real workflow, map the cleaned value into the next module only after checking the result. Use a filter when you need to stop unwanted records.

To try trimming and lowercasing the fictional label, start with Make Free (opens in a new tab). Check the spaces-only case as well as the normal result, then keep the practice scenario inactive.

Sources: Text and binary functions (opens in a new tab), Use functions (opens in a new tab), Scenario variables (opens in a new tab), Make pricing (opens in a new tab).

Share this guide