Loading...
Loading...
Feishu (Lark) API Integration Guide. Use this when users request to "create Feishu apps", "manage base tables", "add collaborators", "generate Feishu reports", "set Feishu permissions" or "automate Feishu operations". Prioritize using MCP tools for real-time interactive operations.
npx skill4agent add within-7/minto-plugin-tools feishu-integrationUser Request → MCP Tool Call → Feishu API → Return Resultmcp__feishu__*| Tool | Function | Use Case |
|---|---|---|
| Obtain access token | Verify connection status |
| Tool | Function | Parameters |
|---|---|---|
| Create base table | |
| Get data table list | |
| Add field | |
| Tool | Function | Parameters |
|---|---|---|
| Add record | |
| Get records | |
| Tool | Function | Parameters |
|---|---|---|
| Add collaborator | |
| Find user by email | |
| Resource URI | Function |
|---|---|
| Get current configuration information |
User Request Examples:
- "Create a customer management system"
- "Help me make a project task management table"
- "Build an inventory management table"
Assistant Execution Process:
1. Analyze user requirements and design a reasonable table structure
- Identify business type (CRM/project management/inventory/sales, etc.)
- Determine core entities and attributes
- Design field relationships and data flows
2. Call create_bitable to create the base table
3. Obtain the returned app_token
4. Call get_tables(app_token) to get table_id
5. Call add_table_field() to add fields: [Dynamically generated based on requirements]
- Main table: Core business fields
- Select field types (text/number/date/single-select/multi-select/people, etc.)
- Set required fields and default values
6. Set field types, options, and validation rules
- Single-select fields: Configure option lists
- Number fields: Set range limits
- Date fields: Configure time formats
- Associated fields: Establish inter-table relationships
7. Add sample data
8. Add users as collaborators
9. Create associated tables (if needed)
- Sub-table design (e.g., order details, task comments)
- Inter-table association configuration
- Data relationship descriptionUser: Create a customer management system
Assistant Execution:
1. Requirement Analysis
- Business Type: CRM Customer Management
- Core Entities: Customers, Follow-up Records
- Data Flow: Customer Information → Follow-up Interaction → Conversion
2. Call create_bitable(name="Customer Management System")
3. Obtain the returned app_token (e.g.: app_xxxxxxxxx)
4. Call get_tables(app_token) to get table_id (e.g.: tblxxxxxxxx)
5. Call add_table_field() to add fields:
- Customer Name (field_name="Customer Name", field_type=1) Text
- Contact Person (field_name="Contact Person", field_type=1) Text
- Contact Phone (field_name="Contact Phone", field_type=11) Phone
- Customer Source (field_name="Customer Source", field_type=3) Single-select
- Customer Stage (field_name="Customer Stage", field_type=3) Single-select
- Industry (field_name="Industry", field_type=3) Single-select
- Estimated Transaction Amount (field_name="Estimated Transaction Amount", field_type=2) Number
- Creation Time (field_name="Creation Time", field_type=5) Date
- Remarks (field_name="Remarks", field_type=1) Text
6. Set field configurations
- Customer Source Options: Online Promotion/Referral/Exhibition/Proactive Development
- Customer Stage Options: Potential Customer/Interested/Negotiating/Converted/Lost
- Industry Options: Internet/Finance/Manufacturing/Retail/Other
- Estimated Amount: Set minimum value to 0
7. Add sample data
Call add_record(app_token, table_id, {
"Customer Name": "Sample Tech Company",
"Contact Person": "Zhang San",
"Contact Phone": "13800138000",
"Customer Source": "Online Promotion",
"Customer Stage": "Interested",
"Industry": "Internet",
"Estimated Transaction Amount": 50000,
"Creation Time": 1704067200000,
"Remarks": "Potential high-quality customer"
})
8. Add user as collaborator
Call get_user_by_email(email="user@example.com") to get open_id
Call add_collaborator(app_token, "user", open_id, "edit")
9. Create associated table "Follow-up Records"
Repeat steps 4-5 to create follow-up record table, including:
- Follow-up Time (field_type=5)
- Follow-up Method (field_type=3, options: Phone/WeChat/Email/In-person)
- Follow-up Content (field_type=1)
- Next Follow-up Time (field_type=5)
- Customer Name (associated field linked to customer information table)
10. Return results
- Table link: https://feishu.cn/base/{app_token}
- Field description document
- Usage suggestionsUser: Create a project task management table
Assistant Execution:
1. Requirement Analysis
- Business Type: Project Management
- Core Entities: Projects, Tasks
- Data Flow: Project Decomposition → Task Assignment → Execution Tracking
2. Call create_bitable(name="Project Task Management System")
3. Obtain the returned app_token
4. Call get_tables(app_token) to get table_id
5. Call add_table_field() to add fields to the "Project List" table:
- Project Name (field_name="Project Name", field_type=1)
- Project Number (field_name="Project Number", field_type=1)
- Project Status (field_name="Project Status", field_type=3) Options: Not Started/In Progress/Completed/Delayed
- Start Date (field_name="Start Date", field_type=5)
- End Date (field_name="End Date", field_type=5)
- Project Priority (field_name="Project Priority", field_type=3) Options: High/Medium/Low
- Project Progress (field_name="Project Progress", field_type=15) 0-100%
- Project Manager (field_name="Project Manager", field_type=1)
6. Add sample data
Call add_record() to add 2-3 sample projects
7. Add user as collaborator
8. Create associated "Task List" table
- Task Name (field_type=1)
- Belongs to Project (associated field → Project List)
- Task Owner (field_type=1)
- Task Status (field_type=3) Options: To Do/In Progress/Completed/Canceled
- Task Priority (field_type=3) Options: Urgent/High/Medium/Low
- Start Time (field_type=5)
- Deadline (field_type=5)
- Estimated Hours (field_type=2)
- Actual Hours (field_type=2)
- Task Description (field_type=1)
9. Return dual-table structure description, association diagram, and usage suggestionsUser: Create a purchase order management system
Assistant Execution:
1. Requirement Analysis
- Business Type: Procurement Management
- Core Entities: Purchase Orders
- Data Flow: Order Creation → Approval → Execution
2. Call create_bitable(name="Purchase Order Management System")
3. Obtain the returned app_token
4. Call get_tables(app_token) to get table_id
5. Call add_table_field() to add fields:
- Purchase Order (field_name="Purchase Order", field_type=1)
- Unit Price (field_name="Unit Price", field_type=2)
- Quantity (field_name="Quantity", field_type=2)
- Total Amount (field_name="Total Amount", field_type=2)
- Purchase Time (field_name="Purchase Time", field_type=5)
- Purchaser (field_name="Purchaser", field_type=1)
6. Add sample data
7. Add user as collaborator
8. Return table link and usage instructionsUser: Add 10 purchase records to table xyz
Assistant:
1. Call get_tables(app_token) to confirm table_id
2. Loop call add_record() to add data
3. Return addition resultsUser: Add user@example.com as table administrator
Assistant:
1. Call get_user_by_email(email="user@example.com") to get open_id
2. Call add_collaborator(
app_token="...",
member_type="user",
member_id="<open_id>",
perm_type="full_access"
)| Business Type | Keywords | Preset Fields |
|---|---|---|
| Customer Management | CRM, customer, sales, customer management | Customer Name, Contact Person, Stage, Amount |
| Project Management | project, task, project task | Project Name, Status, Owner, Progress |
| Procurement Management | procurement, order, supplier | Order Number, Unit Price, Quantity, Amount |
| Inventory Management | inventory, warehouse, commodity | Commodity Name, SKU, Stock Quantity, Location |
| HR Management | employee, attendance, recruitment | Name, Department, Position, Status |
| Expense Management | reimbursement, expense, approval | Reimburser, Amount, Type, Date |
| Type Value | Type Name | Description |
|---|---|---|
| 1 | text | Text |
| 2 | number | Number |
| 3 | select | Single-select |
| 4 | multiSelect | Multi-select |
| 5 | dateTime | Date & Time |
| 7 | attachment | Attachment |
| 11 | phone | Phone |
| 12 | ||
| 13 | url | URL |
| 15 | progress | Progress |
vieweditfull_accessfeishu-integration/
├── plugin.json # Plugin manifest
├── SKILL.md # This document
├── mcp-server/ # MCP Server
│ ├── index.py # FastMCP implementation
│ ├── requirements.txt # Python dependencies
│ └── README.md # MCP documentation
├── scripts/ # Python scripts (backup)
│ ├── create_feishu_app.py
│ ├── create_purchase_order_bitable.py
│ ├── add_feishu_collaborator.py
│ └── ...
└── .mcp.json # MCP configuration~/.minto/config/mcp.json{
"mcpServers": {
"feishu": {
"command": "python3.11",
"args": ["/path/to/mcp-server/index.py"],
"env": {
"FEISHU_APP_ID": "your_app_id",
"FEISHU_APP_SECRET": "your_app_secret"
}
}
}
}FEISHU_APP_IDFEISHU_APP_SECRETminto mcp listminto mcp get feishucat ~/.minto/config/mcp.jsonpermission:permission.member.createcd scripts
python3 create_feishu_app.py
python3 add_feishu_collaborator.pypip install requests lark-oapiget_tenant_access_token