How to Use the Extract Values from Text Actions in HappyFox Workflows

By Harinarayanan V 2 views

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:

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


Using Extract values from Text

Setting up the action

  1. Open your workflow in the workflow builder and click + to add a new action step.
     
  2. Search for extract and select Extract values from Text from the results.
     
  3. 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.
     
  4. 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.
     
  5. 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.
  6. 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

  1. Open your workflow in the workflow builder and click + to add a new action step.
  2. Search for extract m and select Extract Multiple Values from Text from the results.
  3. In the Field input, select the source text field you want to extract from. Click + Insert Merge Fields to browse available fields.
  4. Under Patterns, click + to add a pattern card.
  5. In the Pattern field of the card, enter your pattern using {placeholders} as described above.
  6. 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.
  7. 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.
  8. To remove a pattern card, click × in the top-right corner of that card.
  9. 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:

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


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.