Extract and log the last array value
Recipe ToolsMarketingData ParserUtilitiesDatabase
What it does
When a schedule triggers every 5 minutes, this automation parses a JSON document to extract the last value from an array. It logs that value to the job report so someone can monitor the result.
Who it's for
Data and analytics teams who need to extract and track specific array values from JSON on a regular schedule.
How teams use this
Monitor the latest data point
Extract and log the most recent value from a JSON array every 5 minutes to track changes. The team sees each result in the job report without manual checks.
Route high values to a notification
Add a condition to check if the extracted value exceeds a threshold, then send an alert when it does. Only values that match the condition trigger the notification.
Store results in a database
Include a database insert step so each extracted value is saved as a record. The automation keeps a historical record of every array value over time.
How it works
- Run on a 5-minute schedule. This automation runs every 5 minutes to check and process the JSON document on a regular cadence.
- Extract the last array value. Json Parser parses the JSON document and uses Ruby to output a single dimension array, then retrieves the last value by calculating list size minus 1.
- Log the result to the report. Workato Smart List logs the extracted last array value to the job report so the result is visible and tracked.