Coze Workflow Development
Platform Introduction
Coze is a powerful AI workflow development platform. Through this tutorial, you will learn how to build a complete AI-driven workflow.
🎥 Watch the video walkthrough
The three-part Coze workflow video series has moved to the centralized Video Tutorials page so you can find every video for this programme in one place.
Learning Objectives
Through this tutorial, you will master:
- Creating complete Coze workflows
- Implementing automatic webpage content retrieval
- Using AI to generate high-quality summaries
- Saving data to Notion
Environment Preparation
Notion Configuration
1. Create Integration
- Create Integration
- Page Authorization
- Visit Notion Developers
- Click "Create new integration"
- Fill in integration information:
- Name: Article Summary
- Associated workspace: Select your workspace
- Save the generated Integration Token
- Create a new Notion page
- Click Share button in top right
- Select and add your integration
2. Get Page ID
// Notion page URL format
https://notion.so/workspace/page-title-32-character-string
// Extract 32-character string as page_id
const pageId = url.match(/[a-f\d]{32}/)[0];
Coze Configuration
1. Create Project
- Visit Coze website and login
- Create new workflow project
- Configure basic project information
2. Required Nodes
- Browse Node - Web scraping
- LLM Node - Generate summaries
- Text Processing Node - Text processing
- Write Page Node - Notion integration
Workflow Construction
1. Browse Node Configuration
Node Function
- Visit specified URL
- Extract webpage content
- Handle different types of webpages
Parameter Settings
// url parameter configuration
{
"url": "{{input}}",
"enforce_crawl": true
}
Output Structure
{
"code": 200,
"message": "success",
"plugin_observation": {
"observation": "Actual webpage content",
"natural_language_desc": "Content description information"
}
}
2. LLM Node Configuration
System Prompt
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]
User Prompt
Please provide a summary of the following article:
{{browse.plugin_observation.observation}}
3. Text Processing Node Configuration
Input Parameters
{
"String1": "{{llm.output.output}}"
}
Text Template
=========================================
Article Summary
=========================================
{{String1}}
=========================================
4. Write Page Node Configuration
Notion Parameters
{
"page_id": "Your Notion page ID",
"text": "{{Text Processing.output}}"
}
Optimization Strategies
Prompt Optimization
- Prompt Tips
- Quality Assurance
- Use clear role definitions
- Set specific output requirements
- Maintain prompt consistency
- Regularly update and optimize prompts
- Establish quality evaluation criteria
- Conduct A/B testing comparisons
- Collect user feedback
- Continuous optimization improvement
Performance Monitoring
Response Time Monitoring
const metrics = {
browse_time: 'Scraping time',
llm_time: 'AI processing time',
storage_time: 'Storage time',
total_time: 'Total time'
};
Optimization Goals
- Web scraping < 3 seconds
- AI processing < 5 seconds
- Data storage < 2 seconds
Common Issues
Network Issues
- URL Inaccessible: Check URL format and network connection
- Incomplete Content Retrieval: Adjust enforce_crawl settings
- Authorization Verification Failed: Check Token validity
Processing Issues
- Format Parsing Error: Optimize prompt settings
- Character Encoding Issue: Adjust text processing parameters
- Content Truncation Error: Increase text length limit
Testing and Optimization
Functional Testing
Input Validation
- Test different URL formats
- Verify special character handling
- Check error handling mechanisms
- Test boundary conditions
Process Validation
- Node connection correctness
- Data transfer completeness
- Exception handling effectiveness
- Output format standardization
Performance Testing
Concurrency Testing
- Multiple URL simultaneous processing
- Batch task execution
- High-frequency request handling
Resource Monitoring
- Memory usage
- CPU utilization
- API call frequency
Best Practices
Daily Maintenance
- Regularly check functional completeness
- Monitor error logs
- Update and optimize prompts
- Adjust processing strategies
Continuous Optimization
- Collect user feedback
- Analyze usage data
- Optimize processing flow
- Expand feature capabilities
Development Process
Workflow Features
- Automated article summary generation
- Structured data storage solution
- Scalable system architecture
- Efficient processing flow
Through this Coze workflow project, you will master how to build a complete AI-driven workflow, from web scraping to intelligent summary generation, to data storage - the full development process.