A discussion was had about creating a workflow to auto tag machines based on location, with the trigger being logon or unlock. There is currently no native support for this type of trigger in ControlUp Workflows. The recommended workaround is to create a scheduled flow that runs every 5-15 minutes to update tags based on IP address and location data. Using controlUp One integration or Windows Event alerts were also suggested as alternative methods.
Read the entire ‘Creating Workflows to Auto Tag Machines Based on Location’ thread below:
Hi,
Just getting into workflows now and have a small question.
What is the easiest way to create a flow that triggers on logon/unlock of a PC ??
We are looking to auto tag machines according to location, and this location can change during the day or from day to day.
At the moment we can have a scheduled flow to run that updates tags based on IP address (and custom location info), but would like this to update on each logon/unlock of the PC
Looking for the flow to trigger on the logon(unlock action and then use the devicename as a variable in the resulting flow in order to set the tag
@member I am not our best with workflows @member @member @member please have some one correct me if i am wrong. But thought i would run tis question through our new AI 🙂 . Plus want to give the AI a challenge
Based on my search of the ControlUp knowledge base, I have some important information to share about your workflow automation requirements:
⚠️ Current Limitation: No Native Logon/Unlock Trigger
Unfortunately, ControlUp Workflows do not currently support native event-based triggers for logon or unlock actions. The current workflow trigger types are:
- Scheduled triggers – Run at specific times/intervals
- Manual triggers – Run on-demand
💡 Recommended Workaround: Scheduled Flow with Tagging
Since you want to auto-tag machines based on IP address/location, here’s the best approach given current capabilities:
Solution: Scheduled Flow
Create a scheduled workflow that runs at regular intervals (e.g., every 5-15 minutes) to update tags based on current IP/location data:
- Schedule: Set to run frequently (every 5-15 minutes depending on your needs)
- Flow logic:
• Query all devices (or filter to specific groups)
• For each device, check current IP address
• Map IP to location (using your custom location logic)
• Update device tags accordingly using the device name as identifier
Using Device Name as Variable
While you won’t have a "logon event trigger," your scheduled flow can:
Use loops/iterations to process multiple devices
• Access device properties including deviceName, public_ip, location, etc.
• Apply tags dynamically based on current data
Alternative: Automated Actions with Alerts
A Windows Event Trigger that fires on:
Event ID 4624 (Logon)
Event ID 4801 (Workstation unlocked)
- A PowerShell script as the follow-up action that:
- Detects the current IP address
- Maps it to a location
- Updates ControlUp tags via API or PowerShell cmdlets
Yeah currently there is no trigger on unlock of device. So you could run it on a schedule but dealing with large amount of device could be problematic there. I think an event based action might be the best way. @member do you have a good idea ?
Thanks for the inputs.
As Chris says, ascheduled workflow is not really optimal since it has to deal with 8000 endpoints and as such may be a bit "sluggish" but a run once or twice per day may be the best option.
The other option I can see at the moment is using the alert function to create an alert based on the eventid of a logon/unlock on the pc and then use the ControlUp One integration to trigger the workflow just like Chris also suggests. The issue here is that I have some problem getting alerts to work with eventId, and also the amount of "noise" in the Event feature of ControlUp.
Just made a quick check and yesterday we had approx 3400 logon events and approx 20000 Session unlock events from 6500 devices
Continue reading and comment on the thread ‘Creating Workflows to Auto Tag Machines Based on Location’. Not a member? Join Here!
Categories: All Archives, ControlUp One Platform, ControlUp Scripts & Triggers, ControlUp Workflows
