> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 工作流

> 调度并触发多步骤自动化任务。

## 工作流

### 列出工作流

```typescript theme={null}
const workflows = await theo.workflows();
```

### 创建工作流

```typescript theme={null}
const workflow = await theo.createWorkflow({
  name: "Weekly Pipeline Report",
  triggerType: "schedule",
  triggerConfig: { cron: "0 9 * * 1" },  // Every Monday at 9am
  steps: [
    {
      type: "ai_transform",
      name: "Generate report",
      config: {
        prompt: "Analyze this week's pipeline changes",
        skills: ["data-extraction", "content-writer"],
      },
    },
    {
      type: "notification",
      name: "Send to team",
      config: { channel: "email", to: "team@acme.com" },
    },
  ],
});
```

### 触发工作流

```typescript theme={null}
const run = await theo.triggerWorkflow(workflow.id, {
  overridePrompt: "Focus on enterprise deals this week",
});
```

## 渠道适配器

渠道适配器(Telegram、WhatsApp)部署在你自己的基础设施中,并直接与 REST API 通信。请参阅 [Telegram](/guides/telegram-bot) 和 [WhatsApp](/guides/whatsapp-integration) 指南。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.