Kanorio

云端基础设施

自动化

基于触发条件的自动化功能,支持条件判断、分支、延迟、重试、自定义触发条件与 HTTP 动作。

可用

自动化功能会在特定事件发生时执行步骤:例如订单已支付、表单已提交、特定日期到达,或是您的系统报告了某个事件。发送电子邮件只是众多动作中的其中一种。

核心对象

  • 触发条件与动作: 一个包含每个触发条件数据与每个动作输入之 JSON schema 的目录。
  • 自动化: 在后台或通过 API 创建的条件、分支、延迟与速率限制。
  • 执行记录: 每次执行的详细步骤,包含重试机制、失败细节以及重新执行的选项。
  • 自定义触发条件: 使用 POST /sites/{id}/automations/events 报告您自己的事件以启动自动化。

API 如何运作

  • 使用 Management API 读取目录、创建与编辑自动化、进行测试,以及读取并重试执行记录。
  • automations.run.failed Webhook 会在执行失败时通知您。

API 开放的范围

  • Automation engine: trigger/action catalog, owner-built flows, per-step runs, custom triggers可用
    API
    Management API (REST/MCP) automations.catalog.get, automations.templates.list, automations.flows.* (list/get/validate/create/update/set_status/archive/delete/test), automations.runs.* (list/get/rerun), automations.events.report/cancel, automations.triggers.*, automations.secrets.*; preinstalled toggles via automations.list/set_action_enabled; signed inbound endpoint POST /api/webhooks/automations/<token> (Standard Webhooks)
    托管网站
    /automations, /automations/settings
    Webhooks
    Every trigger in the catalog is also a subscribable webhook event; custom triggers accept signed inbound webhooks (planned)

API 参考

Webhook 事件

  • automations.run.failed · Fired when a run of an owner-built automation ends in FAILED after retries (compensation already applied). Not fired for test runs or platform-default automations; at most once per automation revision every 30 days.
  • automations.flow.paused · Fired when Kanorio turns an owner-built automation off automatically because its current revision ran more than 20 times in the past 7 days and 95% or more of those runs failed.