Detect idle device activity from Prey screenshots with Claude Vision
UnknownWhat this workflow does
This workflow has 14 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects Prey (community). It also calls api.anthropic.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Set — Window config (Edit Fields (Set)): sets 5 fields: window_minutes, min_reports, min_span_minutes…
- Code: runs custom JavaScript code
- If: checks a condition and branches into true / false
- Get device reports (Prey): get device reports
- Code: runs custom JavaScript code
- If: checks a condition and branches into true / false
- HTTP — Download screenshot (HTTP Request): calls an HTTP API
- Code: runs custom JavaScript code
- HTTP — Claude vision (Anthropic) (HTTP Request): calls api.anthropic.com (POST)
- Code: runs custom JavaScript code
Services it uses
HTTP calls to: api.anthropic.com
Before you upgrade to n8n 3.0
We can't fully verify this one: it relies on 1 community package, and n8n 3.0 turns unverified community packages off by default (N8N_UNVERIFIED_PACKAGES_ENABLED=false).
- Check that @preyproject/n8n-nodes-prey is verified or supports 3.0 (used in Get device reports).
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (8)
- Manual Trigger
n8n-nodes-base.manualTrigger - Prey
@preyproject/n8n-nodes-prey.prey - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - No Operation, do nothing
n8n-nodes-base.noOp - Webhook
n8n-nodes-base.webhook
From the author
Quick Overview This workflow detects device idleness by sampling recent Prey screenshot reports and analyzing them with Anthropic Claude Vision, returning a JSON verdict (idle true/false plus summary) while enforcing a configurable cooldown and minimum data…