Workflow action

Text toolkit

ut_text

Slugs, case conversion, {{placeholder}} templates, truncation, extraction, fuzzy matching, word counts and masking for workflow text.

Officialv1.0.08 functions Pure computation

About

What it does

Text toolkit covers the text clean-up and reshaping that workflows do all the time. Make URL- and file-safe slugs from titles (accents folded, & spelled out), convert between camelCase, snake_case, kebab-case, CONSTANT_CASE, Title Case and Sentence case, fill {{placeholder}} templates from an object with nested paths and fallbacks, shorten text for previews without cutting words in half, and pull values out from between markers.

For messy input there is fuzzy matching: Levenshtein distance, normalised similarity and Jaro-Winkler between two values, or the best match of a typed name in a list of candidates with a threshold, which is useful for matching free-text supplier or customer names to your records. Word count returns words, characters, sentences, paragraphs and reading time, and Mask hides card numbers, account numbers or email addresses before they are logged or sent. Everything runs in the sandbox with no network or data access.

Good for

  • Match a supplier name typed on a form to the closest name in your vendor list
  • Build a notification from a template with the requester's and record's fields
  • Mask account or card numbers before writing them to a log, task or email

After installing

  1. Install the package: the action appears in Extensibility → Workflow actions and in the workflow designer's palette under Custom actions.
  2. Drag Text toolkit onto a workflow, choose the function and map its inputs from variables or form fields.
  3. Use the outputs from the data picker, e.g. {{slug_slug}} or {{match_best_match}}.
  4. Try the included "Text clean-up (sample)" workflow from the API or its start form: it slugs a title, fuzzy-matches a name and masks an account number.

Examples

Real inputs, real outputs

Each example ran in the sandbox when this gallery was built; the outputs are exactly what the step returns.

A slug from a title slugify

Inputs

{
  "text": "Crème brûlée & Café Menu 2026!"
}

Outputs

{
  "slug": "creme-brulee-and-cafe-menu-2026"
}

Best match for a misspelt name similarity

Inputs

{
  "value": "Jon Smyth",
  "candidates": [
    "John Smith",
    "Joan Smythe",
    "Jonas Schmidt"
  ],
  "threshold": 0.85
}

Outputs

{
  "distance": null,
  "similarity": null,
  "jaro_winkler": null,
  "best_match": "Joan Smythe",
  "best_score": 0.9515,
  "best_index": 1,
  "matched": true
}

Fill a message template template

order.ship_date is missing, so its fallback "soon" is used.

Inputs

{
  "template": "Hi {{customer.first_name}}, your order {{order.id}} ships {{order.ship_date | soon}}.",
  "data": {
    "customer": {
      "first_name": "Aroha"
    },
    "order": {
      "id": "SO-1042"
    }
  }
}

Outputs

{
  "result": "Hi Aroha, your order SO-1042 ships soon.",
  "missing": [],
  "replaced": 3
}

Mask a card number mask

Inputs

{
  "value": "4111 1111 1111 1111",
  "mode": "keep_last",
  "keep": 4
}

Outputs

{
  "masked": "**** **** **** 1111"
}

Identifier to camelCase change_case

Inputs

{
  "text": "customer order ID",
  "case": "camel"
}

Outputs

{
  "result": "customerOrderId"
}

Reference

Functions, inputs and outputs

The designer generates each function's input panel from these declarations; outputs appear in the data picker with their types.

Slugify slugify

Turn text into a URL- and file-name-safe slug: accents removed (é → e, ß → ss), & becomes "and", everything else that is not a letter or digit becomes the separator.

Inputs

  • text string · required — The text to turn into a slug.
  • separator string — Placed between words (up to 3 punctuation characters).
  • lowercase boolean — Lowercase the slug.
  • max_length integer — Optional: cut the slug to this many characters, at a word boundary when possible (0 = no limit).

Outputs

  • slug string — For example creme-brulee-and-cafe-menu-2026.

Change case change_case

Convert between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, Sentence case, UPPER and lower. Words are split on spaces, punctuation and case changes (parseHTTPResponse → parse HTTP response).

Inputs

  • text string · required — The text or identifier to convert.
  • case choice · camel / pascal / snake / kebab / constant / title / … — The case to convert to.

Outputs

  • result string

Fill template template

Replace {{name}} placeholders with values from an object. Paths reach nested values ({{customer.name}}, {{items[0].sku}}) and {{name | fallback}} gives a default. Objects and lists are inserted as JSON.

Inputs

  • template text · required — Text with {{placeholders}}.
  • data object — The values, as an object.
  • missing choice · keep / blank / error — Keep the {{placeholder}}, leave it blank, or fail the step.

Outputs

  • result text — The filled-in text.
  • missing list of strings — Placeholder paths that had no value (and no fallback).
  • replaced integer — How many placeholders were filled.

Truncate truncate

Shorten text to a number of characters or words and add an ellipsis. In character mode the result, ellipsis included, fits the length and does not cut a word in half when it can avoid it.

Inputs

  • text text · required — The text to shorten.
  • length integer · required — Maximum characters (or words).
  • by choice · chars / words — Count characters or words.
  • ellipsis string — Added when the text is cut; enter none for no ellipsis.
  • preserve_words boolean — In character mode, cut at the last space instead of mid-word.

Outputs

  • result text
  • truncated boolean — Whether the text was shortened.

Extract between extract_between

Find the text between a start and an end marker (the first match or all of them). Leave the start empty to read from the beginning, or the end empty to read to the end.

Inputs

  • text text · required — The text to search.
  • start string — Text just before the value.
  • end string — Text just after the value.
  • all boolean — Return every match instead of the first.
  • include_markers boolean — Keep the start and end markers in the result.
  • case_sensitive boolean — Match the markers exactly (off: ignore case).
  • trim boolean — Trim spaces around each match.

Outputs

  • value string — The first match (empty when none).
  • matches list of strings — Every match (one when All matches is off).
  • count integer
  • found boolean

Similarity / fuzzy match similarity

Compare a value with another (Levenshtein distance, normalised similarity 0–1 and Jaro-Winkler) and/or find its best fuzzy match in a list of candidates, with a threshold.

Inputs

  • value string · required — The text to compare or look up.
  • compare_to string — Optional: a second text to compare with.
  • candidates list — Optional: a list of texts to find the best match in.
  • threshold number — Score (0–1) at or above which it counts as a match.
  • method choice · jaro_winkler / levenshtein — Score used for the candidate list and the threshold.
  • case_sensitive boolean — Off: compare ignoring case (spaces are always normalised).

Outputs

  • distance integer — Levenshtein distance between Value and Compare to (empty without Compare to).
  • similarity number — 1 − distance / longer length (0–1).
  • jaro_winkler number — Jaro-Winkler score (0–1).
  • best_match string — The candidate with the highest score (empty without candidates).
  • best_score number
  • best_index integer — Position of the best match in the list (from 0; −1 when none).
  • matched boolean — Whether the score reaches the threshold.

Word count word_count

Count words, characters (with and without spaces), sentences and paragraphs, and estimate the reading time.

Inputs

  • text text — The text to count (empty text counts as 0).
  • words_per_minute integer — Words per minute for the reading time.

Outputs

  • words integer
  • characters integer
  • characters_no_spaces integer
  • sentences integer
  • paragraphs integer
  • reading_minutes integer — Rounded up; 0 for empty text.

Mask mask

Hide part of a sensitive value: keep the last or first N characters, mask everything, or mask an email address (a***@example.com). Spaces and dashes can stay visible so the shape remains readable.

Inputs

  • value string · required — The value to mask.
  • mode choice · keep_last / keep_first / email / all — What to keep visible.
  • keep integer — N for Keep the last / first N (never more than half of the value is shown).
  • mask_char string — The character that replaces hidden ones.
  • preserve_separators boolean — Leave spaces, dashes, dots, slashes, + and brackets unmasked.

Outputs

  • masked string

Network

None. The action cannot make requests.

Data and files

None. It only sees its inputs.

Secrets

None.

Install

Install it in your workspace

Works on UserTasks cloud and any self-hosted instance. The action lands in Extensibility → Workflow actions, enabled, with its sample workflow.

In the app

  1. Open Extensibility → Workflow actions → Browse gallery and choose Install on Text toolkit. Or download workflow-action-text-toolkit-1.0.0.utpkg and drag it onto Automations → Packages.
  2. The wizard verifies the checksum, every file hash and the signature, and shows what it adds.
  3. In the workflow designer, drag Text toolkit from Custom actions, pick a function and fill its inputs. Save & Test shows the typed outputs.

With the CLI

shell
curl -fLO https://usertasks.com/gallery/workflow-action-text-toolkit-1.0.0.utpkg
usertasks packages install workflow-action-text-toolkit-1.0.0.utpkg
usertasks activities test ut_text -f '{"operation":"slugify"}'

Verify the download

File SHA-256
aaaa3b20dfd3e1166f441f30ae62b19dda7df50c77cab177c74cfe3d5477010e
Package checksum (what is signed)
sha256:9c16b3fc932b8552c4aa4ed8857cea5f961922266d7e358a1bd9261f4ffe9556
Module SHA-256
393bb9c0379ccfa3d8b0871b041a32cdf7ca72f39fc37566022d39c300883b4e
Signer
UserTasks Gallery · 49:f3:04:90:47:02:4d:07:28:61:3d:dc:bb:aa:db:11

More workflow actions

All actions