# GoClaw Automation Guides

GoClaw runs workflows on a schedule, when you start them, or when an outside system calls one of its webhooks (GitLab, Graylog, or anything that can send an HTTP POST).

## Guides

- **[Standard Operating Procedures (SOPs)](sop.md)**: JSON-defined, state-machine based workflows with automated failovers and validations.
- **[Upgrading existing SOPs](sop-migration-prompt.md)**: A prompt that has an agent audit and upgrade the SOPs it owns to the step data-handoff model.
- **[Scheduled Tasks (Cron Jobs)](cron-jobs.md)**: SQLite-backed cron manager using robfig/cron for simple recurring executions.
- **[GitLab Integration](gitlab-webhook.md)**: Handling push, MR, and pipeline alerts from GitLab repositories securely. Set it up by asking the agent, which creates the project webhook in GitLab and the route in GoClaw (`gitlab_hook`), with the `goclaw gitlab hook` wizard, or by hand.
- **[Graylog Alerts That Run a SOP](graylog-alerts.md)**: A Graylog → GoClaw webhook. Graylog watches the logs, and each alert calls the gateway's hook (`/goclaw/hook/graylog/<key>`) and runs a SOP. Set it up by asking the agent, which registers the alert in Graylog and the route in GoClaw, or [by hand](graylog-alerts.md#connecting-graylog-without-the-agent): a Graylog route on the Webhooks page and an HTTP notification in Graylog.
- **[SonarQube Quality Gates That Run a SOP](sonarqube-hooks.md)**: SonarQube calls the gateway after each analysis (`/goclaw/hook/sonarqube/<key>`) and a failed quality gate (or every analysis) runs a SOP. Set it up by asking the agent, which makes the webhook in SonarQube and the route in GoClaw, or by hand.
- **[Zabbix Problems That Run a SOP](zabbix-alerts.md)**: A Zabbix action sends problems on the host groups you choose, at or above a severity, to a webhook media type that calls the gateway (`/goclaw/hook/zabbix/<key>`), and each runs a SOP. Set it up by asking the agent, which makes the media type, a user and group of its own and the action in Zabbix and the route in GoClaw, or by hand.
- **[Uptrace Monitors That Run a SOP](uptrace-monitors.md)**: An Uptrace metric monitor's webhook channel calls the gateway (`/goclaw/hook/uptrace/<key>?token=…`) when an alert opens, and runs a SOP. Set it up by asking the agent, which makes the monitor and its channel in Uptrace and the route in GoClaw, or by hand.
- **[Wazuh Alerts That Run a SOP](wazuh-alerts.md)**: An alerting monitor in the Wazuh indexer searches Wazuh's alerts every few minutes and, through a webhook channel, calls the gateway (`/goclaw/hook/wazuh/<key>`) with what it found, which runs a SOP. Nothing changes on the manager. Set it up by asking the agent, which makes the monitor and its channel in the indexer and the route in GoClaw, or by hand.
- **[Grafana Alert Rules That Run a SOP](grafana-alert-rules.md)**: A Grafana alert rule's webhook contact point calls the gateway (`/goclaw/hook/grafana/<key>`) when the rule fires, and runs a SOP. Set it up by asking the agent, which makes the rule, its contact point and the route in GoClaw, or by hand.

Any other system that can POST JSON reaches an agent the same way, through a webhook route: see [Webhook Routes](../configuration.md#webhook-routes). A route can run a SOP for each event, or gather a window of events into one run.
