Clawdbot 自动化

使用定时任务、webhooks 和计划任务自动化您的 Clawdbot AI 助手。了解如何设置自动化工作流。

Clawdbot 自动化概述

Clawdbot 提供强大的自动化功能,用于计划任务、与外部服务集成和创建自动化工作流。

自动化功能

定时任务

安排定期任务:

{
  "cron": {
    "jobs": [
      {
        "id": "morning-greeting",
        "schedule": "0 8 * * *",
        "action": "send_message"
      }
    ]
  }
}

了解更多关于定时任务

Webhooks

与外部服务集成:

{
  "webhooks": {
    "incoming": {
      "enabled": true,
      "port": 3011
    }
  }
}

了解更多关于 Webhooks

快速开始

启用自动化

# 启动带自动化功能的网关
clawdbot gateway start --cron --webhooks

创建您的第一个任务

# 添加每日提醒
clawdbot cron add \
  --id daily-standup \
  --schedule "0 9 * * 1-5" \
  --action send_message \
  --channel whatsapp \
  --peer "+15551234567" \
  --message "站会时间到!"

自动化工具

工具描述
cron计划任务管理
gateway网关自动化控制

用例

每日报告

自动生成和发送报告:

{
  "cron": {
    "jobs": [
      {
        "id": "daily-report",
        "schedule": "0 18 * * 1-5",
        "action": "run_agent",
        "prompt": "生成每日摘要"
      }
    ]
  }
}

告警集成

转发监控系统的告警:

{
  "webhooks": {
    "handlers": [
      {
        "id": "alerts",
        "path": "/alerts",
        "action": "send_message",
        "channel": "telegram"
      }
    ]
  }
}

CI/CD 通知

接收构建通知:

{
  "webhooks": {
    "handlers": [
      {
        "id": "github",
        "path": "/github",
        "action": "send_message",
        "template": "构建 {{status}}: {{repository}}"
      }
    ]
  }
}

配置

全局设置

{
  "automation": {
    "enabled": true,
    "timezone": "Asia/Shanghai",
    "logging": {
      "level": "info"
    }
  }
}

下一步