tr Skip to content
Black Friday FlowMattic for life, 12 payments of $33.25 Or $399 once. Nothing added for splitting Ends in --Days --Hrs --Min --Sec See the deal

Data Transformer: Hash, Encrypt, Sign and Generate IDs

FlowMattic Data Transformer: a form submission creates a signed HS256 JSON Web Token that is emailed as a time-limited access link.

The Data Transformer is FlowMattic’s toolbox for changing a value’s form without changing its meaning: encode it, hash it, encrypt it, sign it, or generate a fresh ID or code. Seventeen actions cover the jobs that otherwise send people to a PHP snippet, from Base64 and SHA256 to AES-256 encryption, JSON Web Tokens and one-time passwords.

It is for anyone wiring WordPress to APIs and services that expect data in a particular shape: developers signing webhook payloads, store owners generating coupon codes, agencies issuing access links, and teams that need to keep a value private while it moves between steps. FlowMattic 7.3.0 added seven of the seventeen actions.

What is the Data Transformer?

Data Transformer by FlowMattic is a built-in action app in the workflow builder. Each action takes text from the trigger or an earlier step, transforms it, and returns the result in a response field you map into later steps. It runs on your own server, so values never leave your site to be transformed.

How the data transformer works

  1. Add a step and choose Data Transformer by FlowMattic.
  2. Pick the action, for example Create JWT (HS256).
  3. Fill in its fields. Most actions have a required Content field; the newer ones use clearer labels such as Text to Encrypt, Payload (JSON) or Secret (Base32). Map values from earlier steps with dynamic tags.
  4. Test the step and map response, plus any extra fields the action returns, into the next steps.
FlowMattic Data Transformer step set to Create JWT (HS256), showing the Payload (JSON), Secret and Expires In (seconds) fields.
The Create JWT (HS256) action with a JSON payload, a secret from a variable and a one-hour expiry.

All seventeen actions

ActionFieldsWhat it returns
HTML Encode / HTML DecodeContentText with HTML entities encoded, or decoded
Base64 Encode / Base64 DecodeContentBase64 text, or the decoded original. Invalid Base64 is an error.
SHA256, SHA1, SHA512, MD5ContentThe hash as hexadecimal text
HMAC SHA256Content, KeyThe HMAC-SHA256 signature as hexadecimal text
Strip TagsContent, Allowed TagsText with HTML tags removed, except the ones you allow
Generate UUIDNoneA new random version 4 UUID on every run
Generate Random StringLength, CharactersA random string, 1 to 256 characters (default 32)
Encrypt (AES-256)Text to Encrypt, Secret KeyEncrypted text, Base64 encoded
Decrypt (AES-256)Encrypted Text, Secret KeyThe original text
Create JWT (HS256)Payload (JSON), Secret, Expires In (seconds)The signed token, plus expires_at
Verify JWT (HS256)Token, Secretvalid, reason, payload and one payload_<claim> field per claim
Generate TOTP CodeSecret (Base32), Digits, Period (seconds)The current code and seconds_remaining

Random strings

Characters offers six sets: Letters and numbers (the default), Letters only, Uppercase letters and numbers (no look-alikes such as O and 0), Numbers only, Hexadecimal, and Letters, numbers and symbols. The uppercase set suits coupon codes people type; the symbols set suits passwords. Characters are picked with PHP’s cryptographically secure random generator.

AES-256 encryption

Encrypt (AES-256) uses AES-256-GCM. Your Secret Key can be any passphrase; it is turned into a 256-bit key with PBKDF2 and a random salt, and each encryption uses a fresh random IV, so the same text encrypts differently every time. Decrypt needs the same key, and fails with “The key is wrong or the text was changed” if either is off. The server needs the OpenSSL PHP extension.

JSON Web Tokens

Create JWT (HS256) signs a JSON object of claims with a shared secret. It adds iat (issued at) for you, and Expires In (seconds) adds an exp claim, for example 3600 for one hour. Verify JWT (HS256) always completes as a step and reports valid as yes or no with a reason: ok, invalid_signature, expired, not_yet_valid or malformed. That makes it easy to branch on with a Router.

One-time passwords

Generate TOTP Code follows RFC 6238, the standard authenticator apps use. Give it the Base32 secret shown when two-factor login is set up (spaces and dashes are ignored), choose 6 or 8 Digits, and set Period (seconds) if the service uses something other than 30.

Use cases

Unique coupon codes for repeat customers

When an order completes, Acme generates a ten-character uppercase code with no look-alike characters, creates the coupon, and emails it to the customer.

Flow: WooCommerce Order Status Set to Completed → Generate Random String → WooCommerce Create Coupon → Send Email

Signed webhooks to a partner

A SaaS partner checks an HMAC signature on every request. The workflow signs the payload with the shared key and sends the signature as a header on the API call.

Flow: Webhook → HMAC SHA256 → API by FlowMattic POST

Time-limited access links

An agency sends clients a link to a private report. The workflow creates a JWT with the client’s ID and a one-day expiry; a second workflow verifies the token when the link is opened and routes on valid.

Flow: Form Builder New Form Submission → Create JWT (HS256) → Send Email; Webhook → Verify JWT (HS256) → Router

Store sensitive answers encrypted

A clinic’s intake form collects a field the team should not read in a table view. The workflow encrypts it before saving the row, and a staff-only workflow decrypts it on request.

Flow: Form Builder New Form Submission → Encrypt (AES-256) → WP Tables New Record

Idempotency keys for API calls

Many payment and shipping APIs accept an idempotency key so a resent request is not processed twice. A fresh UUID per run, sent as a header, does the job.

Flow: WooCommerce New Order Created → Generate UUID → API by FlowMattic POST

Log in to your own two-factor service account

An operations team’s reporting service requires a one-time code for its API login. A scheduled workflow generates the current code from the account’s secret and logs in.

Flow: Schedule Every Day → Generate TOTP Code → API by FlowMattic POST

Clean text before an AI agent reads it

Post content arrives full of markup. Strip Tags removes it, keeping only the tags you list, so the AI agent works on readable text and spends fewer tokens.

Flow: WordPress New Post → Strip Tags → AI Agent Execute Agent

Tips and gotchas

  • Keep keys in a variable. Store secrets in a FlowMattic variable and map it in, so one change updates every workflow.
  • Secrets are masked, mostly. The AES, JWT and TOTP actions record their secret as ******** in the inputs Task History shows. HMAC SHA256 records its Key as entered, so limit who can view Task History.
  • Always set the HMAC Key. The signature is only as good as the key you give it.
  • Hashes are one way. SHA and MD5 cannot be reversed; use Encrypt (AES-256) when you need the original back.
  • The payload must be an object. Create JWT needs a JSON object such as {"sub":"1042","role":"member"}, not a list or plain text.
  • Content is required. Every action except Generate UUID and Generate Random String fails with “Content field is required.” when its main field is empty.
  • Encryption here is for your data. These actions transform values inside a workflow; they do not change how FlowMattic stores connection credentials.

Related features

FAQ

How do I generate a UUID in a WordPress workflow?

Add a Data Transformer step with the Generate UUID action. It needs no settings and returns a new random version 4 UUID in the response field every time it runs.

Which encryption does Encrypt (AES-256) use?

AES-256-GCM with a key derived from your passphrase (PBKDF2 with a random salt) and a random IV per encryption. Decrypt (AES-256) reverses it with the same key and detects text that was changed.

Can FlowMattic create and verify JWTs?

Yes, HS256 tokens with a shared secret. Create JWT (HS256) adds an issued-at time and an optional expiry; Verify JWT (HS256) checks the signature, expiry and not-before time and returns each claim as a field.

Is there a limit on random string length?

Generate Random String accepts 1 to 256 characters. Leave Length empty and you get 32.

It is one of FlowMattic’s built-in data tools, and it costs nothing per run. See FlowMattic pricing to start transforming data inside your workflows.

More from the blog