Using Lookup Table Module in FlowMattic
Overview
The Lookup Table module in FlowMattic is designed to simplify workflows by mapping keys to values using a custom table. This feature is ideal for transforming values such as language codes to full language names, country codes to country names, user roles, and other similar mappings. It eliminates the need for complex conditional steps, making workflows cleaner and more dynamic.
Steps to Configure the Lookup Table Module
Step 1: Add the Lookup Table Action
- Navigate to your workflow in FlowMattic.
- Add a new action and select “Lookup Table” from the list of available modules.
Step 2: Configure the Lookup
🔑 Lookup Key (Required)
- Specify the key to be matched in the table.
- You can input static text or use dynamic tags from previous trigger/action steps.
Examples:
- Static Key:
mr
- Dynamic Key:
{{trigger.language_code}}
🛠️ Fallback Value (Required)
- Provide a fallback value to be used if the lookup key is not found in the table.
Example:
English
📋 Lookup Table
- Define the mapping of keys to values in a table format.
- Example:
Key | Value |
---|---|
en | English |
mr | Marathi |
hi | Hindi |
- Use the “Add More” button to add additional rows.
Example Use Case
Imagine you receive a language code (mr
) in a form submission and need to convert it into the full language name for further processing or integration with another app.
Configuration:
-
Lookup Key:
mr
-
Fallback Value:
English
-
Lookup Table:
Key Value en English mr Marathi hi Hindi
Expected Output:
- If the key
mr
is found, the output will beMarathi
. - If the key is not found, the fallback value
English
will be returned.
Tips for Effective Usage
- Use dynamic tags for keys to make workflows adaptive and responsive.
- Ensure the fallback value is meaningful and aligns with your workflow requirements.
- Regularly update the lookup table to accommodate new keys and values.
Additional Context
The Lookup Table module also provides structured outputs, indicating whether the fallback value was used or the key was successfully matched. This ensures transparency in workflow execution and helps with debugging.
By leveraging this module, you can create workflows that are both efficient and scalable, reducing manual intervention and enhancing automation capabilities.