Meetily第三方集成:Slack/Notion会议记录同步
痛点与解决方案
你是否还在会议结束后手动整理记录并同步到协作平台?Meetily提供本地化AI会议助手,结合Slack/Notion集成方案,实现会议记录自动同步,消除人工操作与信息滞后。
读完本文你将掌握:
- 3步完成Meetily与Slack/Notion集成
- 会议记录实时同步实现原理
- 高级配置:自定义同步规则与权限控制
- 企业级部署最佳实践与故障排查
集成架构 overview
Meetily采用模块化设计实现第三方集成,核心包含事件触发层、数据转换层和API通信层:
关键技术特点:
- 本地优先架构:敏感数据不经过第三方服务器
- 双向事件监听:支持即时同步与定时同步两种模式
- 格式自适应转换:保持原始会议记录结构的同时适配目标平台特性
前置准备
环境要求
| 组件 | 版本要求 | 用途 |
|---|---|---|
| Meetily | v0.0.5+ | 提供核心会议记录能力 |
| Node.js | 18.x+ | 运行集成脚本 |
| Python | 3.9+ | 后端API支持 |
| 网络连接 | 稳定 | 实现API通信 |
权限准备
Slack集成需要:
channels:read- 读取频道列表权限chat:write- 发送消息权限files:write- 上传文件权限users:read- 用户信息匹配权限
Notion集成需要:
database:query- 读取数据库权限page:create- 创建页面权限page:update- 更新页面权限block:insert- 插入内容块权限
Slack集成实战
步骤1:创建Slack应用与获取令牌
- 访问Slack API控制台并点击"Create New App"
- 选择"From scratch",输入应用名称(如"Meetily Integration")并选择目标工作区
- 在"OAuth & Permissions"页面添加上述所需权限
- 安装应用到工作区并复制生成的
Bot User OAuth Token(格式:xoxb-xxx)
步骤2:配置Meetily同步规则
创建配置文件slack-integration.json:
{
"slack": {
"token": "xoxb-YOUR_SLACK_TOKEN",
"defaultChannel": "#meeting-notes",
"syncMode": "realtime",
"format": {
"includeTitle": true,
"includeTimestamp": true,
"includeSummary": true,
"includeActionItems": true,
"includeAudioLink": false
},
"channelMappings": {
"team-meeting": "#team-sync",
"client-review": "#client-updates"
}
}
}
步骤3:实现同步功能
使用Meetily提供的Python SDK实现同步逻辑:
from meetily import MeetilyClient
from slack_sdk import WebClient
from slack_sdk.errors import SlackApiError
import json
# 初始化客户端
meetily = MeetilyClient()
slack = WebClient(token="xoxb-YOUR_SLACK_TOKEN")
# 获取最近会议记录
recent_meetings = meetily.get_meetings(limit=5)
for meeting in recent_meetings:
# 获取会议详情
details = meetily.get_meeting_details(meeting_id=meeting["id"])
# 构建消息内容
message = f"📝 *{details['title']}* ({details['created_at']})\n"
message += f"👥 Participants: {', '.join(details['participants'])}\n"
message += "\n📌 *Summary:*\n"
message += details['summary'] + "\n"
message += "\n✅ *Action Items:*\n"
for item in details['action_items']:
message += f"- {item['content']} (Assigned to: {item['assignee']})\n"
# 确定目标频道
channel = "#meeting-notes"
if details['title'] in config['slack']['channelMappings']:
channel = config['slack']['channelMappings'][details['title']]
# 发送到Slack
try:
response = slack.chat_postMessage(
channel=channel,
text=message,
mrkdwn=True
)
print(f"Successfully posted to {channel}")
except SlackApiError as e:
print(f"Slack API error: {e.response['error']}")
高级配置:事件触发同步
使用Meetily的webhook功能实现会议结束后自动同步:
from fastapi import FastAPI, Request
import uvicorn
app = FastAPI()
@app.post("/webhook/meetily")
async def meetily_webhook(request: Request):
data = await request.json()
# 检查事件类型
if data["event"] == "meeting_completed":
meeting_id = data["meeting_id"]
# 触发同步逻辑
await sync_meeting_to_slack(meeting_id)
return {"status": "success"}
return {"status": "ignored"}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000)
Notion集成实战
步骤1:创建Notion集成与数据库
- 访问Notion集成页面创建新集成
- 获取
Internal Integration Token(格式:secret_xxx) - 创建会议记录数据库,推荐属性:
- 标题 (Title)
- 日期 (Date)
- 参与者 (Multi-select)
- 状态 (Select)
- 会议记录 (Text)
- 行动项 (Relation)
步骤2:配置数据库连接
from notion_client import Client
notion = Client(auth="secret_YOUR_INTEGRATION_TOKEN")
database_id = "YOUR_DATABASE_ID"
# 测试数据库连接
def test_notion_connection():
try:
response = notion.databases.retrieve(database_id=database_id)
print(f"Connected to database: {response['title'][0]['text']['content']}")
return True
except Exception as e:
print(f"Notion connection error: {e}")
return False
步骤3:实现会议记录同步
def format_for_notion(meeting_details):
"""将Meetily格式转换为Notion块格式"""
blocks = []
# 添加会议基本信息
blocks.append({
"object": "block",
"type": "heading_2",
"heading_2": {
"rich_text": [{"type": "text", "text": {"content": meeting_details['title']}}]
}
})
blocks.append({
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{"type": "text", "text": {"content": f"日期: {meeting_details['created_at']}"}}]
}
})
# 添加参与者
blocks.append({
"object": "block",
"type": "heading_3",
"heading_3": {
"rich_text": [{"type": "text", "text": {"content": "参与者"}}]
}
})
blocks.append({
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{"type": "text", "text": {"content": ", ".join(meeting_details['participants'])}}]
}
})
# 添加摘要
blocks.append({
"object": "block",
"type": "heading_3",
"heading_3": {
"rich_text": [{"type": "text", "text": {"content": "会议摘要"}}]
}
})
blocks.append({
"object": "block",
"type": "paragraph",
"paragraph": {
"rich_text": [{"type": "text", "text": {"content": meeting_details['summary']}}]
}
})
# 添加行动项
blocks.append({
"object": "block",
"type": "heading_3",
"heading_3": {
"rich_text": [{"type": "text", "text": {"content": "行动项"}}]
}
})
for item in meeting_details['action_items']:
blocks.append({
"object": "block",
"type": "to_do",
"to_do": {
"rich_text": [{"type": "text", "text": {"content": item['content']}}]
}
})
return blocks
def sync_to_notion(meeting_details):
"""同步会议记录到Notion"""
try:
# 创建新页面
new_page = notion.pages.create(
parent={"database_id": database_id},
properties={
"标题": {
"title": [{"type": "text", "text": {"content": meeting_details['title']}}]
},
"日期": {
"date": {"start": meeting_details['created_at'].split("T")[0]}
},
"参与者": {
"multi_select": [{"name": p} for p in meeting_details['participants']]
},
"状态": {
"select": {"name": "已完成"}
}
},
children=format_for_notion(meeting_details)
)
print(f"Notion page created: {new_page['id']}")
return new_page['id']
except Exception as e:
print(f"Notion sync error: {e}")
return None
双向同步实现
通过Notion数据库变更监听实现双向同步:
def watch_notion_database():
"""监听Notion数据库变更"""
last_edited_time = None
while True:
response = notion.databases.query(
database_id=database_id,
filter={
"property": "last_edited_time",
"date": {
"after": last_edited_time or "2023-01-01"
}
}
)
if response["results"]:
last_edited_time = response["results"][0]["last_edited_time"]
for page in response["results"]:
# 检查是否需要更新到Meetily
if page_needs_update_in_meetily(page):
update_meetily_from_notion(page)
time.sleep(60) # 每分钟检查一次
企业级部署方案
容器化部署
使用Docker Compose实现一体化部署:
version: '3'
services:
meetily:
image: meetily:latest
volumes:
- ./data:/app/data
ports:
- "5167:5167"
environment:
- MEETILY_API_KEY=your_api_key
integration-service:
build: ./integration
volumes:
- ./config:/app/config
depends_on:
- meetily
environment:
- SLACK_TOKEN=${SLACK_TOKEN}
- NOTION_TOKEN=${NOTION_TOKEN}
- MEETILY_HOST=meetily:5167
同步策略对比
| 同步策略 | 延迟 | 资源消耗 | 适用场景 |
|---|---|---|---|
| 实时触发 | <1秒 | 高 | 协作频繁的团队会议 |
| 定时同步 | 5-15分钟 | 低 | 定期报告与总结 |
| 手动触发 | 按需 | 低 | 敏感会议与特殊场景 |
| 批量同步 | 取决于数量 | 中高 | 历史数据迁移 |
安全最佳实践
-
凭证管理
- 使用环境变量存储API令牌,避免硬编码
- 定期轮换访问凭证(建议90天)
- 实现最小权限原则
-
数据保护
- 敏感信息脱敏处理(如手机号、邮箱)
- 同步日志加密存储
- 实现操作审计跟踪
-
高可用性
- 同步任务失败重试机制
- 关键操作本地备份
- 服务健康检查与自动恢复
故障排查与常见问题
连接问题排查流程
常见错误及解决方案
| 错误 | 原因 | 解决方案 |
|---|---|---|
invalid_auth | 令牌无效或已过期 | 重新生成并更新令牌 |
missing_scope | 权限不足 | 添加所需权限范围 |
rate_limited | API调用频率超限 | 实现请求限流与退避机制 |
database_not_found | Notion数据库ID错误 | 确认数据库ID是否正确 |
channel_not_found | Slack频道不存在 | 检查频道名称或创建新频道 |
性能优化建议
-
批量处理优化
- 合并短时间内的多个同步请求
- 实现增量同步,仅传输变更部分
-
资源占用控制
- 限制并发同步任务数量
- 设置同步时间窗口,避开高峰期
-
错误恢复机制
- 实现指数退避重试策略
- 关键步骤本地持久化,支持断点续传
未来展望与功能路线图
即将推出的集成功能
-
高级格式转换
- 支持表格、图表等复杂内容同步
- 保留富文本格式与样式
-
智能通知系统
- 基于关键词的智能提醒
- 行动项分配与截止日期提醒
-
更多平台支持
- Microsoft Teams集成
- Google Workspace集成
- Trello/Asana任务管理集成
社区贡献指南
Meetily欢迎社区贡献集成模块:
- Fork项目仓库
- 创建集成模块,遵循以下标准:
- 实现
IntegrationInterface接口 - 提供完整的单元测试
- 包含详细的使用文档
- 实现
- 提交Pull Request
总结
通过本文介绍的方法,你已掌握Meetily与Slack/Notion的集成方案,实现会议记录自动同步。关键要点包括:
- 利用Meetily的本地AI能力生成结构化会议记录
- 通过API实现与Slack/Notion的安全通信
- 采用事件驱动架构实现实时或定时同步
- 遵循安全最佳实践保护敏感信息
随着远程协作的普及,高效的会议记录管理变得愈发重要。Meetily的第三方集成方案消除了信息孤岛,让会议成果无缝融入现有工作流,提升团队协作效率。
点赞👍收藏🌟关注三连,获取更多Meetily高级使用技巧!下期预告:《Meetily AI助手自定义:打造专属会议分析师》
创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考



