Sync Workato Db Table records every 5 minutes
Recipe ToolsMarketingDeveloper ToolData ParserUtilities
What it does
When the clock triggers every 5 minutes, this automation searches the Workato Db Table for records in batches. It collects all results into a query list by repeating the search until no more records remain.
Who it's for
Data and analytics teams who need to sync database records on a regular schedule without manual queries.
How teams use this
Sync database records on schedule
Collect all records from the Workato Db Table every 5 minutes and build a complete list without manual queries. Fresh data is available at regular intervals for reporting.
Export synced records to CSV
Add a CSV export step after the query list is built so records are saved as a file for downstream analysis. Only the output format changes in the flow.
Filter records by date range
Set the Fecha_inicial and fecha_final variables to only sync records within a specific period. Include a condition to check the date before adding items to the query list.
Stop sync when batch is incomplete
Add a condition to check if the batch size is less than 200 and stop the repeat loop early. This reduces unnecessary queries when all records from the Workato Db Table have been retrieved.
How it works
- Run every 5 minutes. The automation starts on a 5-minute interval to keep the Workato Db Table records synchronized with the query list.
- Search records in batches. Query the Workato Db Table and retrieve records in 200-record batches, using a page token to track where the search left off.
- Update pagination and date variables. Set the next page token and date range variables so the search continues through all available records in the Workato Db Table.
- Build query list from batches. Add each batch of records from the Workato Db Table to the query list and format them for downstream use or export.
- Transform synced records. Run a function on the final query list to validate or transform the synced records from the Workato Db Table before completion.