Sync lookup table rows via Rest API
Recipe ToolsDeveloper ToolAPI IntegrationData ParserMarketingUtilities
What it does
When someone calls this automation as a function, it fetches rows from a lookup table via Rest API and stores them in a CSV file. The automation loops through each item, composes the data, and appends it to file storage so the table stays current.
Who it's for
Data and analytics teams who need to sync lookup table data to a file without manual exports.
How teams use this
Sync reference data on a schedule
Call this function from a scheduled workflow to refresh lookup table data in file storage every hour. The file stays current without manual intervention and other workflows can read it.
Populate a dropdown in a form
Invoke this function when a form loads so the lookup table rows appear as options in a dropdown. The data is fresh each time someone opens the form.
Filter results by a condition
Add a condition in the loop to only append rows that match a status or category. This automation then stores only the relevant subset of the lookup table in the file.
How it works
- Call the lookup table function. Invoke this automation as a function from another workflow or application to start the lookup table sync.
- Set up the file in storage. Create a CSV file in file storage to hold the lookup table data so it persists and remains accessible across multiple runs.
- Fetch rows via Rest API. Call the Rest API endpoint to retrieve all rows from the lookup table, then loop through each item in the response data.
- Compose and append CSV data. Format each row as CSV using the parser and append it to the file in storage so the lookup table remains complete and current.
- Return the synced list. Pass the populated list back to the calling workflow so downstream steps can use the current lookup table data.