工作流
列出工作流
const workflows = await theo.workflows();
创建工作流
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" },
},
],
});
触发工作流
const run = await theo.triggerWorkflow(workflow.id, {
overridePrompt: "Focus on enterprise deals this week",
});
