Coze工作流开发
平台介绍
Coze是一个强大的AI工作流开发平台,通过本教程,你将学会如何构建一个完整的AI驱动工作流。
观看视频演示
Coze 工作流三部曲视频已迁移到本期项目的视频教程总页,方便你在一个地方找到所有教学视频。
学习目标
通过本教程,你将掌握:
- 创建完整的Coze工作流
- 实现网页内容的自动获取
- 使用AI生成高质量摘要
- 将数据保存到Notion
环境准备
Notion配置
1. 创建集成
- 创建集成
- 页面授权
- 访问 Notion Developers
- 点击 "Create new integration"
- 填写集成信息:
- Name: Article Summary
- Associated workspace: 选择你的工作区
- 保存生成的Integration Token
- 创建新的Notion页面
- 点击右上角Share按钮
- 选择并添加你的集成
2. 获取页面ID
// Notion页面URL格式
https://notion.so/workspace/page-title-32-character-string
// 提取32位字符串作为page_id
const pageId = url.match(/[a-f\d]{32}/)[0];
Coze配置
1. 创建项目
- 访问Coze官网并登录
- 创建新的工作流项目
- 配置项目基本信息
2. 必要节点
- Browse节点 - 网页抓取
- LLM节点 - 生成摘要
- Text Processing节点 - 文本处理
- Write Page节点 - Notion集成
工作流构建
1. Browse节点配置
节点功能
- 访问指定URL
- 提取网页内容
- 处理不同类型网页
参数设置
// url参数配置
{
"url": "{{input}}",
"enforce_crawl": true
}
输出结构
{
"code": 200,
"message": "success",
"plugin_observation": {
"observation": "网页实际内容",
"natural_language_desc": "内容描述信息"
}
}
2. LLM节点配置
系统提示词
You are a professional article summarizer. Your task is to read the provided article and create a CONCISE summary that:
- Captures only the most essential points (max 2-3 key points)
- Uses very concise language
- Keeps the total output under 1500 characters
- Maintains clarity while being brief
- Includes a short title
Format your response as:
Title: [Short Article Title]
Summary: [Your concise summary in 1-2 paragraphs]
Key Points:
- [Point 1]
- [Point 2]
- [Point 3]
用户提示词
Please provide a summary of the following article:
{{browse.plugin_observation.observation}}