This article explains how to use the Extract values from Text and Extract Multiple Values from Text actions to pull named values out of a text field and pass them as variables to later steps in your workflow.
Applicable Plans: Available on all plans.
What these actions do
HappyFox Workflows includes two actions for extracting structured data from unstructured text fields:
- Extract values from Text — extracts named values from a text field using one primary pattern, with optional alternate patterns tried as fallbacks if the primary does not match.
- Extract Multiple Values from Text — extracts named values using multiple independent patterns in a single action step. Each pattern card can be marked as required or optional.
Both actions use a template-style pattern syntax. You write the pattern to look like the text you expect, with {placeholders} marking the values you want to capture. The name inside the braces — for example, {domain} or {ticket_id} — becomes the variable name in the action's output, available as a merge field in every subsequent step.
Use Extract values from Text when you have one reliable pattern with one or more fallback alternatives. Use Extract Multiple Values from Text when you need to capture values across several different patterns in a single step, and want independent control over which patterns must match.
Prerequisites
- A workflow must already exist with at least one trigger configured. See How to Build Your First Workflow if you have not set one up yet.
- The text field you want to extract from must be available as a merge field at the point in the workflow where you add this action.
Using Extract values from Text
Setting up the action
- Open your workflow in the workflow builder and click + to add a new action step.
- Search for extract and select Extract values from Text from the results.
- In the Field input, select the source text field you want to extract from. Click + Insert Merge Fields to browse available fields from the trigger and earlier steps.
- In the Pattern field, enter your pattern using {placeholders} to mark the values you want to capture. The text surrounding each placeholder must match the field value exactly — it acts as the match context.
Note: Placeholder names must be continuous text with no spaces. Letters, numbers, and underscores are permitted — for example, {domain}, {ticket_id}, {ref2}. The placeholder name becomes the output variable name exactly as written.
Example: To extract the subdomain from a URL like https://acme.happyfox.com, enter: https://{domain}.happyfox.com
After a successful test, the Data Out tab shows Domain with the matched value.
- Optionally, click + next to Alternate Patterns to add fallback patterns. Alternate patterns are tried in order if the primary pattern does not match. There is no limit on the number of alternate patterns.
- Click Save & Test to validate the configuration against a recent workflow run.
Warning: If no pattern matches — including all alternate patterns — the action fails and the workflow stops at that step. Any downstream steps that reference an output variable from this action will also fail. Use alternate patterns to account for variations in the source field, and use Run History to diagnose mismatches.
Using Extract Multiple Values from Text
Setting up the action
- Open your workflow in the workflow builder and click + to add a new action step.
- Search for extract m and select Extract Multiple Values from Text from the results.
- In the Field input, select the source text field you want to extract from. Click + Insert Merge Fields to browse available fields.
- Under Patterns, click + to add a pattern card.
- In the Pattern field of the card, enter your pattern using {placeholders} as described above.
- Check Is Required if this pattern must match for the action to proceed. Leave it unchecked if a non-match is acceptable — the action will continue silently and simply produce no output for that pattern's variables.
- Repeat steps 4–6 to add additional pattern cards. Each pattern is evaluated against the source field independently. There is no limit on the number of pattern cards.
- To remove a pattern card, click × in the top-right corner of that card.
- Click Save & Test to validate the configuration.
Warning: If a pattern marked Is Required does not match, the entire action fails and the workflow stops. Patterns not marked Is Required that do not match are skipped silently — no output variable is produced for them, and no error is raised.
Note: Each {placeholder} name must be unique across all pattern cards within the same action. If two cards both use {domain}, only one value will appear in the output. Use distinct names for each value you want to capture — for example, {primary_domain} and {secondary_domain}.
Reading the test results
After a successful test, the Test Results panel opens on the right side of the action panel with two tabs:
- Data In — the raw value of the source field at the time of the test.
- Data Out — each matched placeholder displayed as a labelled output with its extracted value.
The output variables shown in Data Out are available as merge fields in every subsequent action step. Click + Insert Merge Fields in any downstream action to see and insert them.
What to check when extraction produces no output
- The surrounding text in the pattern does not match the field value exactly. A single character difference — a trailing slash, a different protocol prefix, extra whitespace — prevents a match. Open Run History and check the Data In tab to see the exact value the field contained at runtime.
- The source field was empty at runtime. If the trigger ticket did not populate the field you selected, the action receives an empty string and cannot match any pattern. Verify the field is populated on the ticket used for testing.
- A placeholder name contains a space or unsupported character. Use only letters, numbers, and underscores with no spaces.
- A required pattern did not match. In Extract Multiple Values from Text, any pattern marked Is Required must match or the action fails. Review the pattern and test it against a known field value using the Run Test button.
Next steps
The values extracted by this action are now available as merge fields in every subsequent step. Next, use them in a downstream action — such as Send Email, Add Reply, or Create Ticket — by clicking + Insert Merge Fields and selecting the extracted variable by name.