Workflows
Official workflow actions
The six official custom workflow actions in the gallery — Math & statistics, Text toolkit, Dates & business calendar, Data transform, Validation & formatting, Crypto & IDs: every function with its inputs and outputs.
The gallery has six official workflow actions: custom workflow actions built, tested and signed by the UserTasks team. Each offers several functions; pick one on the node and the input panel and outputs follow it.
They run in the same QuickJS WebAssembly sandbox as your own actions. Five need no capabilities at all — no network, data, files or secrets — so they are safe to enable everywhere; Crypto & IDs declares two secrets, used only by its HMAC and token functions and never visible to the code.
Install
- In the app: Extensibility → Workflow actions → Browse gallery, or Packages → Browse gallery on the Workflow actions tab. Install verifies the package (checksum, file hashes, signature) and adds the action enabled; its versions show Signed package with the gallery key's fingerprint.
- From the website: open the action's page under /gallery/actions and download the package, then drag it onto Automations → Packages or run
usertasks packages install <file>.utpkg.
Then find it in the workflow designer's palette under Custom actions. For Crypto & IDs, set the hmac_key and token_secret secrets on the action before using HMAC, Sign token or Verify token.
Reference
Math & statistics
ut_math — Safe formulas with variables, decimal-exact rounding, descriptive statistics and percentiles, compound interest, loan schedules and unit conversion. Gallery page.
Capabilities: none.
| Function | What it does | Key inputs | Outputs |
|---|---|---|---|
Evaluate formula (evaluate) | Evaluates an arithmetic formula (+ - * / % ^, parentheses, abs, round, sqrt, min, max, pow, log, sin… and pi, e) with a real parser, never eval. | expression, variables (object), decimals | result |
Round (round) | Rounds to a number of decimals with an explicit mode (half up, half even, floor, ceiling…); 1.005 rounds to 1.01. | value, decimals, mode | result |
Statistics (stats) | Count, sum, mean, min, max, median, mode, variance, standard deviation and range of a list of numbers (or a field of a list of rows). | values, field, variance_type | count, sum, mean, median, stddev, … |
Percentile (percentile) | The p-th percentile with linear interpolation (the same as Excel PERCENTILE.INC). | values, field, p | value, count |
Compound interest (compound_interest) | Future value with compounding and optional regular contributions, plus a year-by-year schedule. | principal, annual_rate, years, compounds_per_year, contribution | future_value, interest_earned, schedule |
Loan schedule (loan_schedule) | Monthly amortisation of a fixed-rate loan: payment, interest and principal per period, totals and payoff date; extra payments shorten it. | principal, annual_rate, term_months, start_date, extra_payment | payment, total_interest, payoff_date, schedule |
Convert units (convert_units) | Converts length, mass, volume, temperature, area, speed, data size and time. | value, from, to | result, category |
Text toolkit
ut_text — Slugs, case conversion, templates, truncation, extraction, fuzzy matching, word counts and masking. Gallery page.
Capabilities: none.
| Function | What it does | Key inputs | Outputs |
|---|---|---|---|
Slugify (slugify) | A URL- and file-name-safe slug: accents removed, & becomes "and", everything else the separator. | text, separator, lowercase, max_length | slug |
Change case (change_case) | camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, Sentence case, UPPER, lower. | text, case | result |
Fill template (template) | Replaces {{name}} placeholders (with paths and fallbacks) from an object. | template, data, missing | result, missing, replaced |
Truncate (truncate) | Shortens text to N characters or words with an ellipsis, without cutting words when it can avoid it. | text, length, by, ellipsis | result, truncated |
Extract between (extract_between) | The text between a start and an end marker: the first match or all of them. | text, start, end, all | value, matches, count, found |
Similarity / fuzzy match (similarity) | Levenshtein distance, similarity 0–1 and Jaro-Winkler, or the best fuzzy match in a list above a threshold. | value, compare_to, candidates, threshold | similarity, best_match, matched, … |
Word count (word_count) | Words, characters, sentences, paragraphs and reading time. | text, words_per_minute | words, characters, reading_minutes, … |
Mask (mask) | Hides part of a sensitive value: keep the last or first N characters, mask all, or mask an email address. | value, mode, keep, mask_char | masked |
Dates & business calendar
ut_dates — Business days with holidays, SLA due times in working hours, durations and ages, time zone conversion, recurring schedules and fiscal periods. Gallery page.
Capabilities: none (time zones through ctx.intl).
| Function | What it does | Key inputs | Outputs |
|---|---|---|---|
Add business days (add_business_days) | Adds or subtracts business days, skipping weekends and holidays. | date, days, weekend_days, holidays | date, weekday, calendar_days |
SLA due time (sla_due) | When N working hours after a start run out, in a time zone, skipping holidays (daylight saving handled). | start, hours, working_hours, working_days, time_zone, holidays | due, due_local, due_date |
Duration / age (duration) | Calendar and business days, hours, a readable text and the age in years, months and days between two dates. | from, to, time_zone | days, business_days, hours, human, age_years, … |
Convert time zone (convert_timezone) | A moment in another time zone: local date-time with its offset, date, time and weekday. | datetime, from_zone, to_zone | iso, local, offset, … |
Next occurrences (next_occurrence) | The next dates of a daily, weekly, monthly (day or nth weekday) or yearly schedule at a time of day in a time zone. | frequency, interval, days_of_week, time, time_zone, count | next, occurrences |
Fiscal period (fiscal_period) | Fiscal year, quarter and period of a date for a year starting in any month, with start and end dates and a label (FY2027 Q2). | date, start_month, year_naming | fiscal_year, quarter, period, label, … |
Data transform
ut_data — Reshape JSON and lists of records without a chain of loops: JSON paths, field mapping, filter, sort, group, pivot and unpivot, dedupe, join and CSV conversion. Gallery page.
Capabilities: none.
| Function | What it does | Key inputs | Outputs |
|---|---|---|---|
Select (JSON path) (select) | Reads a value by path (a.b[0].c, items[-1], items[*].name for every item). | data, path | value, values, found, count |
Map fields (map) | Picks, renames and nests fields of every item ("customer.name as customer"), with defaults. | items, fields, keep_other_fields | items, count |
Filter (filter) | Keeps the items that match conditions (eq, gt, contains, in, empty…; all or any), comparing numbers and dates as such. | items, conditions, combine | items, count, removed |
Sort (sort) | Stable sort by one or more keys as numbers, text or dates; empty values last. | items, keys | items, count |
Group & aggregate (group) | Groups by fields with count, count_distinct, sum, avg, min, max, first, last or list per group. | items, group_by, aggregates | groups, count |
Pivot (pivot) | Turns the values of one field into columns, aggregating a value field. | items, rows, column, value, aggregate | items, columns, count |
Unpivot (unpivot) | Turns columns into rows of name and value, keeping identifier fields. | items, keep_fields, columns | items, count |
Remove duplicates (dedupe) | Removes duplicates by chosen fields (or whole items), keeping the first or the last. | items, fields, keep | items, count, removed |
Join (join) | Combines two lists on matching keys (inner, left, right or full outer). | left, right, left_key, right_key, type | items, count, unmatched_left, unmatched_right |
CSV to JSON (csv_to_json) | Parses RFC 4180 CSV (quotes, line breaks in quotes) into objects, inferring numbers and booleans. | csv, delimiter, header, infer_types | items, columns, count |
JSON to CSV (json_to_csv) | Writes objects as CSV with chosen columns; text a spreadsheet would run as a formula is escaped. | items, columns, delimiter, escape_formulas | csv, columns, count |
Validation & formatting
ut_validate — Check IBANs, BICs, card numbers, emails, phone numbers, postcodes and national IDs, and format or parse numbers, currencies and phone numbers by locale. Gallery page.
Capabilities: none (formatting through ctx.intl).
| Function | What it does | Key inputs | Outputs |
|---|---|---|---|
Validate (validate) | Checks one value — IBAN, BIC, card (Luhn), email, phone, postcode or national ID — with the normalised value, the reason it fails and details (card issuer, IBAN country…). | type, value, country, id_type | valid, normalized, reason, details |
Validate many (validate_many) | Checks a list of { type, value } entries at once, one result each plus whether all are valid. | items, country | results, all_valid, valid_count, invalid_count |
Format number (format_number) | Formats a number for a locale: grouping, decimals, percent, currency or compact notation. | value, locale, style, notation | formatted |
Format currency (format_currency) | Formats money for a locale and currency with its usual decimals, as symbol, code or name. | value, currency, locale, display | formatted, currency |
Parse number (parse_number) | Reads a number written the way a locale writes it ("1.234,56" in de-DE), with currency, percent and brackets. | text, locale | value, valid, decimal_separator, group_separator |
Format phone (format_phone) | Normalises a phone number to E.164, or formats it in international or national style. | value, country, format | formatted, e164, valid, reason |
Crypto & IDs
ut_crypto — UUIDs and ULIDs, hashes and HMACs, encodings, random codes, one-time codes and signed tokens. Gallery page.
Capabilities: secrets hmac_key (for HMAC) and token_secret (for tokens).
| Function | What it does | Key inputs | Outputs |
|---|---|---|---|
UUID (uuid) | Random UUID v4 or time-ordered v7 (strictly increasing within a run). | version, count, uppercase | uuid, uuids |
ULID (ulid) | Sortable, time-ordered ULIDs (Crockford base32). | count | ulid, ulids |
Hash (hash) | SHA-256, SHA-512, SHA-384 or SHA-1 of text, in hex, base64 or base64url. | text, algorithm, encoding | hash, algorithm |
HMAC signature (hmac) | HMAC of a message with the hmac_key secret (computed on the host), optionally compared in constant time with a received signature. | message, algorithm, encoding, expected | signature, matches |
Encode (encode) | Text to base64, base64url, hex or URL percent-encoding. | text, format | result |
Decode (decode) | base64, base64url, hex or URL-encoded text back to text. | text, format, plus_as_space | result |
Random code (random_code) | Unbiased random codes from an alphabet (no look-alikes, digits, letters, hex or custom), optionally grouped. | length, alphabet, custom_alphabet, count, group_size, separator | code, codes |
One-time code (otp) | A numeric one-time code with its expiry time and SHA-256 hash. | digits, expires_minutes | code, expires_at, code_hash |
Sign token (JWT) (sign_token) | An HS256 JWT with your claims, iat, exp, optional iss / aud / sub and a jti, signed with the token_secret secret. | claims, expires_minutes, issuer, audience, subject | token, expires_at, claims |
Verify token (JWT) (verify_token) | Checks an HS256 JWT's signature (constant time), exp / nbf with leeway and optional issuer / audience; invalid tokens return a reason. | token, issuer, audience, leeway_seconds | valid, reason, claims, expires_at |
Sources
The sources are in the repository's gallery/actions folder — one folder per action with manifest.json, src/, tests and the built dist/action.js. They follow the same contract as the starter kit, so they are also worked examples.