With a lookup table, you can automatically match data from one app with the corresponding data needed by another app. This is useful if two apps treat the same object differently. Lookup tables can only be used in a Zap action, not in a trigger.
If your trigger app sends the customer's name but your action app needs a customer ID, you can create a lookup table to match the name to the correct ID, and use the result in an action step.
- Lookup Key: the data you want to search for within your lookup table.
- Lookup Table: this table consists of two columns. The left column is where the Zap will search for the value that appears in the Lookup Key. The right column is what the Zap will output if the lookup key matches the value.
- Fallback Value: if the lookup key does not match any values in the lookup table, you can use this field to return a backup value.
If the mapped field for the lookup key has no value, nothing will be sent by the lookup table. The fallback value is only used for existing values that do not match any table row.
1. Add a formatter step
- In the Zap editor, click the plus + icon to add an action step.
- Click Format.
- Click the Event dropdown menu and select Utilities.
- Click Continue.
- Click the Transform dropdown menu and select Lookup Table.
2. Select the lookup key
In the Lookup Key field, select data from the trigger or a previous action step. The Zap will use this value to search the lookup table for the correct row.
3. Fill out the table
In the Lookup Table fields, enter the original values (sent by the trigger or another action step) in the left column (the keys), and the matching values in the right column (the values).
The key column is case sensitive and expects an exact match with the information in the Lookup Key field.
To find the values you need for the right column, look at the options in the field that will receive these values in the other app's Zap step. The value will be written in gray underneath the name of the option.
Lookup tables can only have one field as the lookup key, but can find multiple values if they're line items within the same field.
4. Map the output to another step
Next, map the output of the lookup table to the field in your action step that requires that value:
- Click the field in your action step to map the output to.
- In the dropdown menu, click the Custom tab.
- Select Utilities, then select the field.
Once you’ve set up your lookup table and mapped the output to another action, you’re ready to continue setting up the rest of your Zap.