Before
An administrator likely retrieved the mobile-device inventory and reviewed devices one by one to find records with last-sync dates older than three months. They then manually deleted qualifying devices, recorded details such as the owner and model, and prepared a separate team notification.
How it works
- Receive the inventory event and retrieve the account's user-owned mobile devices.
- Compare each device's last-sync month with the current month and select devices more than three months out of date.
- Delete the qualifying devices, compile their details, and post one removal report to Slack.
Workflow details
- Trigger and inventory: The workflow starts when an emailhook event is received, then retrieves the account's user-owned mobile devices for review.
- Staleness evaluation: Each device is processed individually. The workflow extracts the current month and the device's last-sync month, calculates the month difference, and continues only when the device is more than three months out of date.
- Device removal: Devices that meet the stale-device condition are deleted from the mobile-device inventory. The workflow records each removed device's owner, model, and last-sync value for reporting.
- Consolidated reporting: After the device review is complete, the recorded results are assembled into a summary describing the mobile devices removed because they had not synchronized for more than three months.
- Team notification: The final summary is posted to a designated Slack channel so the relevant team can see which devices were removed without manually compiling the results.
What changed
The stale-device check and deletion now occur automatically for every device in the incoming inventory. Instead of separate device-level reviews and follow-up reporting, the process creates one consolidated Slack handoff containing the devices removed and their relevant details.
Work removed
Manually retrieving the mobile-device list, reviewing each last-sync date, calculating whether the device exceeds the three-month threshold, deleting qualifying devices, copying owner and model details, maintaining a removal list, and composing the Slack notification.
Expected outcome
Each qualifying device is removed during one automated review pass and included in one consolidated notification, replacing multiple manual review, deletion, and reporting actions per run.

