Using Lookup Table
Use lookup table to dynamically select a value from a set of values based on some input data.
For example, let's say you have a Bot that sends you an email when someone fills a Typeform or Google Form. Now, you want to enhance it to send an email to a different members in your team based on whether it is a sales or support inquiry. Or, let's say you wish to add contacts to different lists in your marketing app based on the contact data.
Lookup Table comes in handy in such cases.
We'll look at Lookup Tables as part of an example scenario. The scenario in this case is "When a Google Form is submitted, add the submitter to a mailing list corresponding to the department that they wish to receive updates from".
The entire setup would be:
The bot above triggers every time the selected Google Form is submitted. The Google Form is setup as following:
Depending on the submitter's Department choice, they are added to a mailing list of updates for that particular department. However, the mailing list ID in Mailchimp differs from the List Names as below:
As a result, Lookup Tables are required to map between the Department being chosen and the mailing list ID to be added to. The Department above is the same in both Google Forms and MailChimp Lists. However, the Mailchimp ID in this case is the unique identifier in Mailchimp
Using Lookup Table
If we check the lookup table below as used in the example above, we have the following
- Lookup Key - This is the output value coming from the left side, in this case, from the Department selection from the Google Form
- Lookup Table - These are a list of possible mappings between the values coming from the left hand side o/p field and the accepted values for an input field on the right, in this case the Mailchimp lists
- Fallback Value - This is the default value to be passed in case the Lookup Key does not match any of the Lookup Table values
- Lookup Value - This is the final value to be passed to the input field on the right depending on what value was received in the Lookup Key. If nothing matches, the Fallback Value is passed
You can use the Add Lookup button on dropdown custom values to auto-populate your Lookup Tables like so