Ir al contenido principal

Condiciones de acción

Restringir cuándo se ejecuta una acción utilizando condiciones basadas en el sistema operativo, el tipo de dispositivo, campos personalizados, variables y resultados de acciones anteriores.

Introducción

Las condiciones le permiten controlar si una acción individual se ejecuta realmente durante una ejecución de automatización. Úselas para omitir una acción en ciertos tipos de dispositivos, dirigirse a versiones específicas del sistema operativo, verificar el valor de un campo personalizado o ramificar según lo que hizo una acción anterior.


Cómo funcionan las condiciones de acción

Las condiciones se configuran por acción, no por automatización. Cada acción en su pipeline puede tener su propio conjunto de condiciones independiente.

Cuando una ejecución de automatización alcanza una acción, Level evalúa las condiciones de esa acción contra el dispositivo actual. Si se cumplen todas las condiciones, la acción se ejecuta. Si alguna condición no se cumple, la acción se omite para ese dispositivo.

Múltiples condiciones usan lógica AND - cada condición debe cumplirse para que se ejecute la acción. No hay opción O dentro de una sola acción. Si necesita comportamiento de tipo O, duplique la acción y aplique diferentes condiciones a cada copia.

NOTA: Action conditions are evaluated at runtime, against the specific device being processed. They're not evaluated at trigger time — a device can pass trigger conditions and still have individual actions skipped based on action conditions.


Configurar condiciones

Las condiciones se establecen dentro del panel de configuración de la acción al agregar o editar una acción.

NOTA: Actions are only editable in edit mode. From the pipeline view, click Editar en la esquina superior derecha para entrar en modo de edición. Hacer clic en una acción fuera del modo de edición abre un panel de solo lectura que muestra el historial de ejecución.

  1. Abra el panel de configuración de la acción haciendo clic en una acción existente o agregando una nueva.

  2. Expand the Condiciones sección.

  3. Click the Condición menú desplegable y seleccione un tipo de condición.

  4. Establezca la asociación (si es aplicable), el operador y el valor.

  5. To add another condition, click + Añadir una nueva condición.

  6. To remove a condition, click Eliminar junto a ella.

  7. Click Guardar para aplicar.

Configuring Conditions


Referencia de condiciones

NOTA: OS values are populated dynamically from the OS versions present in your device inventory. If your environment only has Windows devices, only Windows versions will appear. Empty dropdowns mean Level hasn't detected any devices with that attribute yet.


Plataforma

Filtrar por la familia de sistemas operativos del dispositivo.

Operador

Descripción

Igual a

El sistema operativo del dispositivo coincide con una de las plataformas seleccionadas

No es igual a

El sistema operativo del dispositivo no coincide con ninguna de las plataformas seleccionadas

Values: Windows , macOS , Linux . Multiple values can be selected.


Tag

Filter by tags applied to the device.

Operador

Descripción

Igual a

Device has all of the selected tags

No es igual a

Device does not have any of the selected tags

Select one or more tags from your organization's tag list.


Group

Filter by the device group the device belongs to.

Operador

Descripción

Igual a

Device is a member of one of the selected groups

No es igual a

Device is not a member of any of the selected groups

Select one or more groups from your group hierarchy.


Status

Filter by whether the device is currently online or offline.

Operador

Descripción

Igual a

Device status matches the selected value

No es igual a

Device status does not match the selected value

Values: Online , Offline .


Last seen (in days)

Filter by how many days have passed since the device last checked in with Level.

Operador

Descripción

Mayor que

Device was last seen more than N days ago

Mayor que o igual a

Device was last seen N or more days ago

Menor que

Device was last seen fewer than N days ago

Menor que o igual a

Device was last seen N days ago or fewer

Enter a whole number of days as a free-text value.


Architecture

Filter by the device's CPU architecture.

Operador

Descripción

Igual a

Device architecture matches the selected value

No es igual a

Device architecture does not match the selected value

Values: amd64 , arm64 .


Hostname

Filter by the device's hostname.

Operador

Descripción

Igual a

Hostname exactly matches the entered value

No es igual a

Hostname does not match the entered value

Contiene

Hostname includes the entered string

No contiene

Hostname does not include the entered string

Enter the hostname value manually. Matching is case-insensitive.

SUGERENCIA: Use Contiene to target naming conventions — for example, filtering to devices whose hostname includes SRV or a client prefix.


Variable

Filter based on a variable defined in this automation. The association dropdown lists every variable created for the current automation — variables from other automations don't appear here.

Operador

Descripción

Contiene

Variable value includes the entered string

No contiene

Variable value does not include the entered string

Igual a

Variable value exactly matches the entered string

No es igual a

Variable value does not match the entered string

Enter the value to compare against as free text.


Custom field

Filter based on a custom field value on the device.

Select the custom field from the association dropdown. The list shows all custom fields configured in your organization.

Operador

Descripción

Contiene

Field value includes the entered string

No contiene

Field value does not include the entered string

Igual a

Field value exactly matches the entered string

No es igual a

Field value does not match the entered string

Enter the value to compare against as free text.

SUGERENCIA: Custom field conditions are useful for branching automation logic by client or site — for example, running an action only on devices where a specific field is populated, or skipping an action where a field indicates a known incompatibility.


Type

Filter by device type.

Operador

Descripción

Igual a

Device type matches the selected value

No es igual a

Device type does not match the selected value

Values: Workstation, Server .


Sistema operativo

Filter by the device's specific OS version.

Operador

Descripción

Igual a

OS version matches the selected value

No es igual a

OS version does not match the selected value

Values are populated from the OS versions present in your device inventory — examples include Windows 11, Windows Server 2022 , macOS Sonoma , Debian . Your list reflects what's actually enrolled.

NOTA: OS values are specific version names, not OS families. To filter broadly by operating system type (Windows, macOS, Linux), use a Plataforma condition in the trigger instead — or use multiple OS conditions with a separate action copy per platform.


Action status

Filter based on the outcome of a previous action in the same automation run, on the same device. The association dropdown lists all actions that appear before this one in the pipeline.

Operador

Descripción

Igual a

Prior action result matches the selected status

No es igual a

Prior action result does not match the selected status

Value

Descripción

Success

The prior action completed without errors

Falló

The prior action encountered an error

Skipped

The prior action was skipped (its own conditions weren't met)

SUGERENCIA: Action status conditions are the primary tool for building conditional logic in automation pipelines. For example: run a script, then use an Action status = Failed condition on the next action to send a notification or create an alert only if something went wrong.


Preguntas frecuentes

  • Do action conditions evaluate every time the automation runs, or just once? Every time. Conditions are evaluated fresh on each run, against each device being processed. A device that was skipped last run will be evaluated again on the next one.

  • Can I use OR logic between conditions on the same action? No. Multiple conditions on the same action always use AND logic — every condition must be satisfied. To get OR-style behavior, duplicate the action and apply different conditions to each copy.

  • What happens to subsequent actions if this action is skipped? The automation continues to the next action. Skipping an action doesn't halt the run — only a failed action (depending on your error handling settings) would do that.

  • Can I branch my automation based on whether a script succeeded or failed? Yes. Add an Action status condition to the actions that should run conditionally, and set the value to Success o Falló based on the prior Shell action's result.

  • Who can configure action conditions? Technicians with permission to edit automations in the relevant group. See Espacio de trabajo → Permisos for access control configuration.

¿Ha quedado contestada tu pregunta?