{ "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "For_each": { "actions": { "Condition": { "actions": {}, "expression": { "and": [ { "less": [ "@float(body('Parse_JSON')?['healthscore'])", "@float(0.5)" ] } ] }, "runAfter": { "Parse_JSON": [ "Succeeded" ] }, "type": "If" }, "Parse_JSON": { "inputs": { "content": "@items('For_each')", "schema": { "properties": { "datetime": { "type": "string" }, "healthscore": { "type": "number" }, "turbo_id": { "type": "integer" } }, "type": "object" } }, "runAfter": {}, "type": "ParseJson" } }, "foreach": "@body('Query_documents_V3')?['value']", "runAfter": { "Query_documents_V3": [ "Succeeded" ] }, "type": "Foreach" }, "Query_documents_V3": { "inputs": { "host": { "connection": { "name": "@parameters('$connections')['documentdb']['connectionId']" } }, "method": "get", "path": "/v3/dbs/@{encodeURIComponent('aztruconnect')}/colls/@{encodeURIComponent('turbo_health')}/query", "queries": { "queryText": "select c.healthscore,c.turbo_id,c.datetime from c" } }, "runAfter": {}, "type": "ApiConnection" } }, "contentVersion": "1.0.0.0", "outputs": {}, "parameters": { "$connections": { "defaultValue": {}, "type": "Object" } }, "triggers": { "Recurrence": { "recurrence": { "frequency": "Minute", "interval": 3 }, "type": "recurrence" } } }, "parameters": { "$connections": { "value": { "documentdb": { "connectionId": "/subscriptions/xxxxx/resourceGroups/xxxx/providers/Microsoft.Web/connections/documentdb", "connectionName": "documentdb", "id": "/subscriptions/xxxxxx/providers/Microsoft.Web/locations/westus/managedApis/documentdb" } } } } }