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

Lookup Table Automation: Map One Value to Another in a Step

FlowMattic Lookup Table module: an order's country code DE is looked up in a table of pairs and Germany is returned for the invoice.

Lookup table automation solves a small problem that shows up in almost every workflow: the trigger sends one value, and the next app needs another. A country code has to become a country name, a plan ID has to become a plan name, a form’s department choice has to become a Slack channel. FlowMattic’s Lookup Table module maps one to the other inside a single step.

You type the pairs once, in the step itself. Every run looks up the incoming value, returns the match, and falls back to a default when there is none. No spreadsheet, no database query, no chain of conditions.

What is the Lookup Table module?

Lookup Table is a built-in action app in the FlowMattic workflow builder with one action, also called Lookup Table: “Lookup a value in a custom data table and return the corresponding value.” In the app picker it sits with the utilities, described as “Match a value against a table of pairs.” The site groups it with Counter and Variables as values you reuse.

How lookup table automation works

  1. Add a step after your trigger and choose Lookup Table.
  2. In Lookup Key, map the incoming value, for example the country code from a WooCommerce order.
  3. In Fallback Value, enter what to return when the key is not in the table, such as Other.
  4. Under Lookup Table, add one row per pair: the key on the left, the value on the right. Use Add More for more rows.
  5. Test the step and map lookup_value into the steps that follow.
FlowMattic workflow builder showing the Lookup Table step with the Lookup Key, Fallback Value and Lookup Table rows.
The Lookup Table step with a mapped Lookup Key, a Fallback Value and key and value rows.

The value side of each row accepts dynamic tags, so a match can return data from an earlier step, not only fixed text.

Fields and output

FieldWhat it does
Lookup KeyThe value to look up. Required; an empty key stops the step with “Lookup key is required.”
Fallback ValueReturned when the key is not in the table.
Lookup TableKey and value rows. An empty table stops the step with “Lookup table is empty.”

The step returns four fields:

  • status: success when the lookup ran.
  • lookup_key: the key that was looked up.
  • lookup_value: the matched value, or the fallback.
  • fallback_used: true when no row matched, false when one did.

Use cases

Print full country names on orders

WooCommerce stores billing countries as two-letter codes. Map DE to Germany and FR to France so the packing slip and the welcome email read naturally.

WooCommerce: new order → Lookup Table → PDF Template → Email

Turn a plan ID into a plan name and role

A SaaS checkout sends a price ID. Two Lookup Table steps turn it into a readable plan name for the CRM and the WordPress role the customer should get.

Webhook (payment) → Lookup Table (plan name) → Lookup Table (role) → WordPress: update user

Send each enquiry to the right team

A contact form asks for a department. Look up the team inbox for Sales, Billing or Support and send the message there, with a general inbox as the fallback.

Form submission → Lookup Table → Send email to lookup_value

Pick a warehouse by product category

Map product category slugs to the warehouse that ships them, then send the order to that warehouse’s webhook. A new category falls back to the main warehouse until you add a row.

WooCommerce: order paid → Lookup Table → Webhook Outgoing

Name a lead source for marketing reports

UTM values such as fb, li and nl become Facebook, LinkedIn and Newsletter before the lead lands in the CRM, so reports group cleanly.

Form submission → Lookup Table → CRM: create contact

Set ticket priority from an AI label

An AI agent classifies each support email as billing, bug or question. A lookup turns that label into a priority and an assignee for the helpdesk.

Email trigger → AI Agent: classify → Lookup Table → Helpdesk: create ticket

Assign leads in turn

Pair the Lookup Table with the Counter. The counter cycles through 1, 2 and 3; the lookup maps each number to a sales rep such as Priya Sharma, Yuki Tanaka or Amelia Okafor.

Form submission → Counter → Lookup Table → CRM: assign owner

Tips and gotchas

  • Matches are exact. US, us and US with a trailing space are three different keys. Clean the incoming value first with the Text Formatter (trim, change case) if the source is inconsistent.
  • Check fallback_used. A Filter or Router on this field lets you alert someone when a value has no row yet, instead of quietly sending the fallback.
  • Fallback can be empty. The field is marked Required, but if you leave it blank an unmatched key returns an empty lookup_value.
  • One value per key. A key can appear once; if you need several outputs for one key, add one Lookup Table step per output.
  • Big or changing lists belong in a table. The pairs live inside the step, so editing them means editing the workflow. For hundreds of rows, or values your team updates, keep them in WP Tables and find the record in a step.
  • Lookup or Router? Use a Lookup Table when only a value changes. Use a Router when different inputs need different steps.

Related features

  • Counter: produce the rotating number a lookup turns into a person or template.
  • Router: branch the run when the path, not just a value, depends on the input.
  • WP Tables: store larger mapping lists your team can edit without opening the workflow.

FAQ

What is a lookup table in automation?

It is a list of key and value pairs that a workflow uses to translate one value into another. In FlowMattic, the Lookup Table step holds the pairs and returns the value that matches the incoming key.

Is the lookup case-sensitive?

Yes. The key must match a row exactly, including case and spaces. Normalise the value with the Text Formatter before the lookup if it can arrive in different forms.

What happens when no row matches?

The step still succeeds. It returns your Fallback Value as lookup_value and sets fallback_used to true, so later steps can react to the miss.

Can the returned value come from another step?

Yes. The value side of each row accepts dynamic tags, so a match can return data mapped from the trigger or an earlier step.

Lookup table automation is one of many small steps that keep FlowMattic workflows tidy. See the plans and map your first values today.

More from the blog