Workflow action
Crypto & IDs
ut_crypto
UUID v4/v7 and ULIDs, SHA hashes, HMAC webhook signatures with a stored secret, base64/hex/URL encoding, random and one-time codes, and HS256 JWTs.
About
What it does
Crypto & IDs gives workflows identifiers and cryptography from the server's secure random generator. Generate random UUID v4s or time-ordered UUID v7s and ULIDs that sort by creation time, unbiased random codes from alphabets without look-alike characters (grouped like ABCD-EFGH), and numeric one-time codes with an expiry time and a hash to store instead of the code. Hash text with SHA-256, SHA-512, SHA-384 or SHA-1 and encode or decode base64, base64url, hex and URL percent-encoding.
For integrations, HMAC signs a message with a key that an administrator stores once (hmac_key): the host computes the signature, so the key never reaches workflow builders or the action's code, and a received webhook signature is compared in constant time. Sign token and Verify token issue and check compact HS256 JSON Web Tokens with token_secret: expiry, not-before, issuer and audience are enforced, and invalid tokens come back with a reason instead of failing the workflow.
Good for
- Verify the HMAC signature of an incoming webhook before processing it
- Issue a signed, expiring link token for an external approver and check it when they respond
- Generate voucher or reference codes and time-ordered IDs for new records
After installing
- Install the package: the action appears in Extensibility → Workflow actions and in the workflow designer's palette under Custom actions.
- For HMAC: in Extensibility → Workflow actions, open Crypto & IDs and set the hmac_key secret (e.g. your webhook provider's signing secret). For tokens: set token_secret to a long random value.
- Drag Crypto & IDs onto a workflow and choose the function. For webhooks, map Message to the raw request body and Signature to check to the signature header, then branch on {{prefix_matches}}.
- Try the included "Signed approval link (sample)" workflow from the API or its start form after setting token_secret: it signs a token for an approver, verifies it and hashes the request reference.
Examples
Real inputs, real outputs
Each example ran in the sandbox when this gallery was built; the outputs are exactly what the step returns.
SHA-256 of "abc" hash
Inputs
{
"text": "abc",
"algorithm": "SHA-256"
}Outputs
{
"hash": "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad",
"algorithm": "SHA-256"
}Check a webhook signature hmac
Signed with the hmac_key secret (the example uses the value "example-secret").
Inputs
{
"message": "{\"event\":\"invoice.paid\",\"id\":\"evt_1042\"}",
"expected": "sha256=1c1b1b59b8b80733797d06dae9234186bd3e41395f81d2773aa87f70daeaa4b3"
}Outputs
{
"signature": "1c1b1b59b8b80733797d06dae9234186bd3e41395f81d2773aa87f70daeaa4b3",
"matches": true
}Verify a signed token verify_token
Signed with token_secret = "example-secret".
Inputs
{
"issuer": "usertasks",
"audience": "approvals",
"jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJ1c2VyLTQyIiwicm9sZSI6ImFwcHJvdmVyIiwiaXNzIjoidXNlcnRhc2tzIiwiYXVkIjoiYXBwcm92YWxzIn0.ViY7aLGdekI4TR6SYbUEvxrBc4VtgmtpczNL4qmy6YU"
}Outputs
{
"valid": true,
"reason": "",
"claims": {
"sub": "user-42",
"role": "approver",
"iss": "usertasks",
"aud": "approvals"
},
"expires_at": null
}Base64 of UTF-8 text encode
Inputs
{
"text": "Hello, Wörld & friends",
"format": "base64"
}Outputs
{
"result": "SGVsbG8sIFfDtnJsZCAmIGZyaWVuZHM="
}Decode a URL parameter decode
Inputs
{
"text": "name%3DAroha%20Smith%26role%3Dapprover",
"format": "url"
}Outputs
{
"result": "name=Aroha Smith&role=approver"
}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.
UUID uuid
Generate UUIDs: v4 (random) or v7 (time-ordered: sorts by creation time, good for database keys). v7 IDs from one call are strictly increasing.
Inputs
versionchoice · v4 / v7 — v4 random, or v7 time-ordered.countinteger — Number of UUIDs to generate (1–1000).uppercaseboolean — Upper-case hex digits.
Outputs
uuidstring — The first (or only) UUID.uuidslist of strings — Every UUID generated.
ULID ulid
Generate ULIDs: 26-character, time-ordered, URL-safe IDs (Crockford base32). ULIDs from one call are strictly increasing.
Inputs
countinteger — Number of ULIDs to generate (1–1000).
Outputs
ulidstring — The first (or only) ULID.ulidslist of strings — Every ULID generated.
Hash hash
The SHA-256, SHA-512, SHA-384 or SHA-1 digest of a text (UTF-8), as hex, base64 or base64url. For fingerprints, de-duplication and integrity checks; do not use plain hashes for passwords.
Inputs
texttext — The text to hash (UTF-8; empty text has a hash too).algorithmchoice · SHA-256 / SHA-512 / SHA-384 / SHA-1 — Digest algorithm.encodingchoice · hex / base64 / base64url — How the digest is written.
Outputs
hashstringalgorithmstring
HMAC signature hmac
Sign a message with HMAC using the hmac_key secret, or check a received signature (e.g. a webhook's X-Signature header) in constant time. The secret never enters the action's code.
Inputs
messagetext · required — The exact text to sign, e.g. the raw webhook body.algorithmchoice · SHA-256 / SHA-512 / SHA-384 / SHA-1 — HMAC hash.encodingchoice · hex / base64 / base64url — How the signature is written (match what the sender uses).expectedstring — Optional: a received signature to compare with (a sha256= prefix is ignored).
Outputs
signaturestringmatchesboolean — Whether Signature to check equals the computed signature (empty when none was given).
Encode encode
Encode text (UTF-8) as base64, base64url, hex or URL percent-encoding.
Inputs
texttext · required — The text to encode.formatchoice · base64 / base64url / hex / url — Encoding.
Outputs
resulttext
Decode decode
Decode base64, base64url, hex or URL percent-encoding back to text (UTF-8). Invalid input fails with a clear message.
Inputs
texttext · required — The text to decode (whitespace is ignored for base64 and hex).formatchoice · base64 / base64url / hex / url — Encoding.plus_as_spaceboolean — URL format: decode + as a space (HTML form encoding).
Outputs
resulttext
Random code random_code
Generate unbiased random codes from an alphabet: digits, letters and digits, hex, or no look-alikes (no 0/O, 1/I/L) for codes people read and type. Optional grouping such as XXXX-XXXX.
Inputs
lengthinteger — Characters per code, not counting separators (1–256).alphabetchoice · no_lookalikes / digits / alphanumeric / alphanumeric_upper / letters_upper / hex / … — Which characters to use.custom_alphabetstring — With Alphabet = Custom: the characters to use (at least 2).countinteger — Number of codes to generate (1–1000).group_sizeinteger — Insert the separator every N characters (0 = no grouping).separatorstring — Placed between groups.
Outputs
codestring — The first (or only) code.codeslist of strings — Every code generated.
One-time code otp
A numeric one-time code (e.g. for email or SMS verification) with its expiry time and SHA-256 hash: store the hash, not the code, and compare hashes when the user types it.
Inputs
digitsinteger — 4–10 digits.expires_minutesinteger — How long the code is valid.
Outputs
codestring — The code (keeps leading zeros).expires_atdate & time — UTC instant.code_hashstring — SHA-256 hex of the code.
Sign token (JWT) sign_token
Create a compact HS256 JSON Web Token signed with the token_secret secret: your claims plus iat, exp (from Expires in), optional iss / aud / sub and a unique jti.
Inputs
claimsobject — The token's data, e.g. { "role": "approver", "request_id": "REQ-1042" }.expires_minutesinteger — Lifetime of the token; 0 for no expiry.issuerstring — Optional issuer claim.audiencestring — Optional audience claim.subjectstring — Optional subject claim, e.g. a user id.
Outputs
jwtstring — header.payload.signatureexpires_atdate & time — UTC instant (empty without expiry).claimsobject — Every claim in the token.
Verify token (JWT) verify_token
Check an HS256 token signed with token_secret: the signature (constant-time), expiry (exp) and not-before (nbf) with a leeway, and optionally the issuer and audience. Invalid tokens return valid = false and a reason instead of failing the step.
Inputs
jwtstring · required — The token (a "Bearer " prefix is ignored).issuerstring — Optional: iss must equal this.audiencestring — Optional: aud must equal or contain this.leeway_secondsinteger — Tolerance for exp and nbf.
Outputs
validbooleanreasonstring — Why the token is not valid: malformed, unsupported algorithm, bad signature, expired, not yet valid, issuer or audience does not match (empty when valid).claimsobject — The token's claims when the signature is valid (also when expired), else empty.expires_atdate & time — From exp (empty without expiry).
Network
None. The action cannot make requests.
Data and files
None. It only sees its inputs.
Secrets
Declared: secret://hmac_keysecret://token_secret— set once in Extensibility, stored encrypted, never shown again.
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
- Open Extensibility → Workflow actions → Browse gallery and choose Install on Crypto & IDs. Or download workflow-action-crypto-ids-1.0.0.utpkg and drag it onto Automations → Packages.
- The wizard verifies the checksum, every file hash and the signature, and shows what it adds.
- In Extensibility → Workflow actions → Manage → Access, set hmac_key and token_secret for the functions that need them.
- In the workflow designer, drag Crypto & IDs from Custom actions, pick a function and fill its inputs. Save & Test shows the typed outputs.
With the CLI
curl -fLO https://usertasks.com/gallery/workflow-action-crypto-ids-1.0.0.utpkg
usertasks packages install workflow-action-crypto-ids-1.0.0.utpkg
usertasks activities test ut_crypto -f '{"operation":"uuid"}'Verify the download
- File SHA-256
- b55b65f891b59019f04a64a34615c8c2e3ea588c2450ec0a209124e0a2b0c4be
- Package checksum (what is signed)
- sha256:86f9a2ef35eda492850d4f4328c8df1d30f9313ebed3364baa26e20f5c2e062d
- Module SHA-256
- 23f2ecd97ba497b8a995a59f48345697550e24b5be1ac923d2c9dc8e642e437d
- Signer
- UserTasks Gallery · 49:f3:04:90:47:02:4d:07:28:61:3d:dc:bb:aa:db:11
More workflow actions
All actionsData transform
ut_data
Select by JSON path, map, filter, sort, group and aggregate, pivot, de-duplicate and join lists of records, and convert CSV to JSON and back.
Select (JSON path) · Map fields · Filter · Sort · Group & aggregate · Pivot · +5 more
11 functions Pure computation
Dates & business calendar
ut_dates
Business days around holidays, SLA due times in working hours across time zones and DST, durations and ages, recurring schedules and fiscal periods.
Add business days · SLA due time · Duration / age · Convert time zone · Next occurrences · Fiscal period
6 functions Pure computation
Math & statistics
ut_math
Safe formulas with variables, exact rounding, statistics and percentiles, compound interest, loan schedules and unit conversion in one workflow step.
Evaluate formula · Round · Statistics · Percentile · Compound interest · Loan schedule · +1 more
7 functions Pure computation