Zum Hauptinhalt springen

Automatisierungen erstellen

Eine Schritt-für-Schritt-Anleitung zum Erstellen einer Automatisierung von Grund auf, using eines Windows-Patch-Workflows als Beispiel.

Heute aktualisiert

Einführung

Dieser Artikel führt Sie durch die Erstellung einer Automatisierung von Grund auf. Das Beispiel ist eine Windows-Patch-Automatisierung, die nach Zeitplan läuft, Windows-Updates installiert, Anwendungen von Drittanbietern aktualisiert und für jeden Fehlertyp eine Benachrichtigung erstellt.

Jedes Konzept hier gilt für jede Automatisierung, die Sie erstellen — ersetzen Sie einen anderen Trigger, andere Aktionen und andere Bedingungen für Ihren eigenen Anwendungsfall.


Vor dem Bauen planen

Before clicking + Automatisierung erstellen, nagel drei Dinge fest:

  1. Was löst es aus?Ein Zeitplan, ein Geräteereignis, eine Tag-Änderung, ein Webhook? Diese Automatisierung verwendet einen wiederkehrenden Zeitplan für Patching ohne Handgriffe.

  2. Welche Geräte zielt es an?Trigger-Bedingungen begrenzen den Durchlauf — nach Plattform, Gerätetyp, Gruppe, Betriebssystemversion oder anderen Attributen. Hier beschränkt eine Bedingung Plattform = Windows auf dem geplanten Trigger sie auf Windows-Geräte.

  3. Was passiert, wenn etwas fehlschlägt?Sollte die Pipeline stoppen oder weitergehen? Sollte jemand benachrichtigt werden? Diese Automatisierung erfasst Aktionsausgaben in Variablen und verwendet bedingte Benachrichtigungen, damit Fehler erscheinen, ohne den gesamten Durchlauf zu stoppen.


Patch-Automatisierung erstellen

Schritt 1: Automatisierung erstellen

  1. Navigate to Automatisierungen in the sidebar.

  2. Click + Automatisierung erstellenin der oberen rechten Ecke.

  3. Name it Windows-Patching.

  4. Click Create.

Windows Patching

Die Automatisierung öffnet sich inView modemit einer leeren Pipeline. Nichts wird ausgeführt, bis Sie einen Trigger hinzufügen. Wechseln Sie zuEdit mode by clicking Bearbeitenin der oberen rechten Ecke.


Schritt 2: Aktion Windows-Updates installieren hinzufügen

  1. Klicken Sie im Aktionsbereich auf+ Eine Aktion hinzufügen.

  2. Browse to Sicherheit → Windows-Updates installieren, oder suchen Sie danach.

  3. Konfigurieren Sie die Einstellungen für die Update-Verzögerung:

Update type

Setting

Kritische Updates

7-Tage-Verzögerung

Sicherheitsupdates

Sofort aktualisieren

Definitionsupdates

Sofort aktualisieren

Update rollups

7-Tage-Verzögerung

Service packs

14 day delay

Tools

7-Tage-Verzögerung

Feature packs

14 day delay

Updates

7-Tage-Verzögerung

Upgrades

7-Tage-Verzögerung

Drivers

7-Tage-Verzögerung

  1. Leave Nach Updates neu starten (falls erforderlich) auf No.

  2. Leave Schleife bis zum Abschluss auf No.

Konfigurieren Sie jetzt die Fehlerbehandlung und die Ausgabevariable unterZusätzliche Optionen:

  1. Set Bei Aktionsfehler to Unterdrücken und fortfahren.

  2. Set Wiederholungen to 2.

  3. In the Output variableFeld, eine Variable namensPatchingStatus.

  4. Click Speichern.

Windows Update Action Configuration

Warum diese Einstellungen:Unterdrücken und Fortfahren bedeutet, dass ein Patch-Fehler auf einem Gerät die Pipeline nicht stoppt — nachfolgende Aktionen werden immer noch ausgeführt. Die Ausgabevariable erfasst das Ergebnis dieses Schritts, damit eine spätere Benachrichtigungsaktion überprüfen kann, ob sie fehlgeschlagen ist. Zwei Wiederholungen geben vorübergehenden Fehlern eine Chance, sich zu erholen, bevor der Schritt als fehlgeschlagen gekennzeichnet wird.


Schritt 3: Aktion Upgrade-Anwendungen von Drittanbietern hinzufügen

  1. Click + Eine Aktion hinzufügen.

  2. Browse to App-Verwaltung → Winget-Paket aktualisieren.

  3. Leave Packages auf Alle verfügbaren Pakete und Ausgeschlossene Pakete auf Keine ausgeschlossenen Pakete.

Diese Aktion verwendet winget zum Aktualisieren von Drittanbieter-Software. Sie macht nur auf Arbeitsstationen Sinn — fügen Sie eine Bedingung hinzu, um sie einzuschränken:

  • In the BedingungenAbschnitt, eine Bedingung für hinzufügenType, den Operator auf setzenGleich wie, and select Workstation.

Winget Conditions

In the Zusätzliche Optionen section:

  1. Set On failure to Unterdrücken und fortfahren.

  2. Set Wiederholungen to 2.

  3. In the Output variableFeld, eine Variable erstellenWingetPatchStatus.

  4. Click Speichern.

Winget Additional Options

HINWEIS: 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

  1. + Eine Aktion hinzufügen.Select

  2. Level → Create alert.Configure the alert:

  3. Title:

    • Description: Windows Patching Failed

    • Severity: 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

Windows Patching Alert

  1. Bedingungen section, add a condition:Step:

    • Install Windows UpdatesOperator:

    • Gleich wieValue:

    • FehlgeschlagenLeave

  2. On failure as Pipeline fehlschlagen und Wiederholungen at 0.Click

  3. Speichern.This action now only fires on devices where patching failed. Every other device skips it.

Create Alert on Failure

Step 5: Add the Windows 3rd Party Patching Failed Alert


Same pattern as Step 5, but for the winget step.

Click

  1. + Eine Aktion hinzufügen.Select

  2. Level → Create alert.Configure the alert:

  3. Title:

    • Description: Windows 3rd Party Patching Failed

    • Severity: Level was unable to patch some 3rd party software on this endpoint after multiple attempts.

    • WarningCustom payload:

    • In ##{{WingetPatchStatus}}

  4. Bedingungen, add: Step Upgrade 3rd Party Applications status Gleich wieFehlgeschlagen .Leave

  5. On failure as Pipeline fehlschlagen und Wiederholungen at 0.Click

  6. Speichern.Step 6: Add Triggers

Winget Create Alert Configuration


Every automation can be run manually. Add a scheduled trigger to also run it automatically on a cadence.

Add the Weekly Trigger

Click

  1. + Add a trigger again.Select

  2. Scheduled → Weekly.Set the schedule to

  3. Monday and Friday at 12:00 AM.Click

  4. Speichern.Now scope the scheduled trigger to Windows devices only:

Weekly Schedule Trigger

Click the

  1. Scheduled → Weekly trigger to open its detail panel.In the

  2. Bedingungen section, add a condition.Select

  3. Plattform, set the operator to Gleich wie, and select Windows.Click

  4. Speichern.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

Action Variables / Conditions


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

  1. Matching devices enter the pipeline

  2. Install Windows Updates

  3. runs with up to 2 retries on failure; output is captured in Upgrade 3rd Party ApplicationsPatchingStatus

  4. runs next; non-workstation devices skip this step; output is captured in Windows Patching FailedWingetPatchStatus

  5. evaluates its condition — fires only on devices where Install Windows Updates failed, attaching the PatchingStatus output to the alertWindows 3rd Party Patching Failed

  6. 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.

TIPP:

After a run, open the Verlauf 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 Aktionen 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

  • Arbeitsbereich → Berechtigungen for details.Workspace → Permissions for details.

Hat dies deine Frage beantwortet?