I have a workflow which makes a web request to our MDM’s API. The MDM returns back a JSON list.
"
{
"device_id": "11111111-4498-4a16-b495-dd6ced251606",
"device_name": "C01234567890-user1",
"model": "MacBook Pro (16-inch, 2019)",
"serial_number": "C01234567890",
"platform": "Mac",
"os_version": "14.0",
"supplemental_build_version": "23A344",
"supplemental_os_version_extra": "",
"last_check_in": "2023-11-07T15:03:37.309525Z",
"user": {
"email": "user1@nuna.com",
"name": "User 1",
"id": 5,
"is_archived": false
},
"asset_tag": "10000809",
"blueprint_id": "11111111-4a1d-4d11-8cf3-53ab707b6336",
"mdm_enabled": true,
"agent_installed": true,
"is_missing": false,
"is_removed": false,
"agent_version": "4.2.9 (4570)",
"first_enrollment": "2021-05-21 16:36:45.787997+00:00",
"last_enrollment": "2023-10-30 03:46:59.102587+00:00",
"blueprint_name": "IT - Sonoma",
"lost_mode_status": ""
},
{
"device_id": "11111111-caea-4d25-a7b4-8e5d1d392530",
"device_name": "987654321-user1",
"model": "MacBook Pro (14-inch, 2021)",
"serial_number": "987654321",
"platform": "Mac",
"os_version": "13.6",
"supplemental_build_version": "22G120",
"supplemental_os_version_extra": "",
"last_check_in": "2023-11-22T04:47:35.872763Z",
"user": {
"email": "user1@nuna.com",
"name": "User 1",
"id": 5,
"is_archived": false
},
"asset_tag": "10001000",
"blueprint_id": "11111111-8127-475f-8a1c-0a64122b1458",
"mdm_enabled": true,
"agent_installed": true,
"is_missing": false,
"is_removed": false,
"agent_version": "4.2.10 (4592)",
"first_enrollment": "2022-02-17 21:49:56.252660+00:00",
"last_enrollment": "2022-10-14 15:41:09.638548+00:00",
"blueprint_name": "IT 2023 (Current)",
"lost_mode_status": ""
}
]
I want to specifically get the device_id from the object where asset_tag = 10001000.
Is there any way to do this purely in workflow automation?
I would normally do this with a simple FOR loop, but there doesn’t seem to be anything like that in the workflow options.