Introduction
Cet article vous guide dans la construction d'une automation à partir de zéro. L'exemple est une automation de patching Windows qui s'exécute selon un calendrier, installe les mises à jour Windows, met à niveau les applications tierces et crée une alerte pour chaque type d'échec.
Chaque concept ici s'applique à toute automation que vous créez — remplacez par un déclencheur différent, des actions différentes et des conditions différentes pour votre propre cas d'utilisation.
Planifiez avant de construire
Before clicking + Créer automation, clou bas trois choses:
Qu'est-ce qui le déclenche?Un calendrier, un événement d'appareil, un changement d'étiquette, un webhook? Cette automation utilise un calendrier récurrent pour le patching sans intervention.
Quels appareils cible-t-il?Les conditions de déclencheur limitent l'exécution — par plateforme, type d'appareil, groupe, version du système d'exploitation ou autres attributs. Ici, une condition Plateforme = Windows sur le déclencheur programmé la limite aux appareils Windows.
Que se passe-t-il en cas d'échec?Le pipeline doit-il s'arrêter ou continuer? Quelqu'un doit-il être notifié? Cette automation capture la sortie d'action dans des variables et utilise des alertes conditionnelles afin que les échecs remontent sans arrêter l'ensemble de l'exécution.
Construire une automation de patching
Étape 1: Créer l'automation
Navigate to Automatisations in the sidebar.
Click + Créer automationdans le coin supérieur droit.
Name it Patching Windows.
Click Create.
L'automation s'ouvre dansView modeavec un pipeline vide. Rien ne s'exécute jusqu'à ce que vous ajoutiez un déclencheur. Basculez versEdit mode by clicking Modifierdans le coin supérieur droit.
Étape 2: Ajouter l'action Installer les mises à jour Windows
Dans la zone des actions, cliquez sur+ Ajouter une action.
Browse to Sécurité → Installer les mises à jour Windows, ou cherchez-la.
Configurez les paramètres de délai de mise à jour:
Update type | Setting |
Mises à jour critiques | Délai de 7 jours |
Mises à jour de sécurité | Mettre à jour immédiatement |
Mises à jour des définitions | Mettre à jour immédiatement |
Update rollups | Délai de 7 jours |
Service packs | 14 day delay |
Tools | Délai de 7 jours |
Feature packs | 14 day delay |
Updates | Délai de 7 jours |
Upgrades | Délai de 7 jours |
Drivers | Délai de 7 jours |
Leave Redémarrer après les mises à jour (si nécessaire) défini sur No.
Leave Boucler jusqu'à complétion défini sur No.
Maintenant, configurez la gestion des échecs et la variable de sortie sousOptions supplémentaires:
Set En cas d'échec d'action to Supprimer et continuer.
Set Tentatives to 2.
In the Output variablechamp, créé une variable appelée
PatchingStatus.Click Enregistrer.
Pourquoi ces paramètres:Supprimer et continuer signifie qu'un échec de patching sur un appareil n'arrête pas le pipeline — les actions ultérieures s'exécutent toujours. La variable de sortie capture le résultat de cette étape afin qu'une action Créer une alerte ultérieure puisse vérifier si elle a échoué. Deux tentatives donnent aux pannes transitoires une chance de se rétablir avant que l'étape ne soit marquée comme échouée.
Étape 3: Ajouter l'action Mettre à niveau les applications tierces
Click + Ajouter une action.
Browse to Gestion des applications → Mettre à niveau le paquet winget.
Leave Packages défini sur Tous les paquets disponibles et Paquets exclus défini sur Aucun paquet exclu.
Cette action utilise winget pour mettre à niveau les logiciels tiers. Cela n'a de sens que sur les stations de travail — ajoutez une condition pour le restreindre:
In the Conditionssection, ajouter une condition pourType, définir l'opérateur surÉgal à, and select Workstation.
In the Options supplémentaires section:
Set On failure to Supprimer et continuer.
Set Tentatives to 2.
In the Output variablechamp, créer une variable
WingetPatchStatus.Click Enregistrer.
REMARQUE : Devices where Type ≠ Workstation skip this action entirely and show Skipped in the run history — that's expected, not a failure.Step 4: Add the Windows Patching Failed Alert
Add a Create Alert action that only fires when the Install Windows Updates step failed.
Click
+ Ajouter une action.Select
Level → Create alert.Configure the alert:
Title:
Description:
Windows Patching FailedSeverity:
Level was unable to patch endpoint after multiple attempts.WarningCustom payload:
The
##{{PatchingStatus}}
variable attaches the output from the Install Windows Updates step to the alert. When you review the alert later, the payload shows what actually happened on that device.##{{PatchingStatus}}In the
Conditions section, add a condition:Step:
Install Windows UpdatesOperator:
Égal àValue:
ÉchouéLeave
On failure as Échouer le pipeline et Tentatives at 0.Click
Enregistrer.This action now only fires on devices where patching failed. Every other device skips it.
Step 5: Add the Windows 3rd Party Patching Failed Alert
Same pattern as Step 5, but for the winget step.
Click
+ Ajouter une action.Select
Level → Create alert.Configure the alert:
Title:
Description:
Windows 3rd Party Patching FailedSeverity:
Level was unable to patch some 3rd party software on this endpoint after multiple attempts.WarningCustom payload:
In
##{{WingetPatchStatus}}
Conditions, add: Step Upgrade 3rd Party Applications status Égal àÉchoué .Leave
On failure as Échouer le pipeline et Tentatives at 0.Click
Enregistrer.Step 6: Add Triggers
Every automation can be run manually. Add a scheduled trigger to also run it automatically on a cadence.
Add the Weekly Trigger
Click
+ Add a trigger again.Select
Scheduled → Weekly.Set the schedule to
Monday and Friday at 12:00 AM.Click
Enregistrer.Now scope the scheduled trigger to Windows devices only:
Click the
Scheduled → Weekly trigger to open its detail panel.In the
Conditions section, add a condition.Select
Plateforme, set the operator to Égal à, and select Windows.Click
Enregistrer.Once a trigger has a condition applied, its pipeline card shows an orange
IF badge. An orange (x) badge on any step means that step is using a variable. You'll see both appear as you build.Step 7: Exit Edit Mode
Click
Done in the top right to exit edit mode.The automation is now
Active — the Weekly trigger is live and will fire next on its scheduled day. The status badge in the header updates to Active.How the Pipeline Runs
When the scheduled trigger fires on Monday or Friday at 12 AM:
Level evaluates the trigger condition — Windows devices only
Matching devices enter the pipeline
Install Windows Updates
runs with up to 2 retries on failure; output is captured in Upgrade 3rd Party Applications
PatchingStatusruns next; non-workstation devices skip this step; output is captured in Windows Patching Failed
WingetPatchStatusevaluates its condition — fires only on devices where Install Windows Updates failed, attaching the PatchingStatus output to the alertWindows 3rd Party Patching Failed
does the same for the winget stepEvery device runs through all four steps. The conditional logic on each action determines what actually happens per device.
CONSEIL :
After a run, open the Historique tab and click any device row to see per-step outcomes (Success, Skipped, Failed) and duration. Click the > caret on any step to expand its output inline, or the → arrow to navigate to the full run detail.FAQDoes the scheduled trigger run on devices that are offline at 12 AM?
Yes — offline devices are queued and the run starts when they come back online. Add a
Status = Online condition to the Weekly trigger if you want to skip offline devices entirely.Can I run this automation on demand without waiting for the scheduled day? Yes — every automation supports manual runs. From the automation's pipeline view, click
+ Add a device to run it immediately against specific devices, or use the Actions menu on the device listing to run any automation against a device directly.Why does Upgrade 3rd Party Applications have a Type = Workstation condition? Winget is a Windows package manager typically found on workstations. The condition prevents it from running on servers where winget packages aren't expected, which avoids spurious failures on those devices.
The alert actions have "On failure: Fail pipeline" — won't that stop the run? Only after the alert step, which is the last meaningful action in the pipeline. The two patching steps use Suppress and continue so their failures don't block the alert steps from running. If the Create Alert action itself fails, you'd want that flagged — so Fail pipeline is the right setting there.
Can I adjust the update delay settings later? Yes. In view mode, click the
Install Windows Updates action to open its detail panel, then click Edit act. to reopen the configuration. Adjust and save.Who can run this automation manually? Any technician with access to the devices being targeted. Group-level permissions control which technicians can manage which device groups. See
Espace de travail → Autorisations for details.Workspace → Permissions for details.









