Add or remove tag
How the Add or remove tag action adds or removes a device tag – always, or depending on a condition.
Add or remove tag adds a tag to a device or removes it again – always, or depending on a condition. Use it, for example, to keep a tag that describes a device's state up to date automatically. The device doesn't need to be online.
Configuration fields
The tag condition is not the same as the step's general Condition. The general condition decides whether the step runs at all. If it is not met, the step is skipped and the tag stays as it is. To add a tag only in some cases and otherwise leave it alone, use Add tag with a general condition.
Platform support
The action runs in octoja and works the same on every operating system.
Outputs
Result behaviour
The step only deals with tags that were set by hand. It never removes a tag with the same name that a tag rule applied, and such a tag does not count as present. So the step can add a manual tag next to it. Case does not matter: Maintenance counts as the existing tag maintenance.
You can safely run the step again and again: it only changes the device when the tag really has to change. A variable octoja cannot resolve stays in the tag name as literal text.
Device tags (trigger.deviceTags) in conditions are captured when the run starts. If this step adds or removes a tag, later steps in the same run do not see that change.
See also: Create an automation · Configure Tag Rules
Was this helpful?
More in Actions
Send notificationAsk userDisable user accountCreate user accountStill need help? Ask the team