Working with Variable JSON Responses

While integrating an event app in Workato, I faced a challenge: each event had unique keys, making it impossible to use datapills directly. Instead of using standard names, the app generated keys with random strings. For example, “Tradeshow Name” appeared as “text0745285851” for one event and “text5295746837” for another.

Solution: Lookup Table

I resolved this by creating a lookup table with three columns:

Workato lookup table with fields for Workato Field, Event Key, and Event ID

Implementation

With this setup, I used inline lookup formulas within the app’s field mappings. Here’s how it works: in the field where I needed a value, I used the Values key as a datapill, accessing nested objects through an inline lookup.

Using inline lookup table formula in Workato field mappings with conditional checks

In this setup, “Event Fields” is the lookup table name, and the formula checks if the Event ID has a corresponding key. If found, it maps the key’s value, making this solution scalable across multiple events without duplicating recipes.