检查环境是否安装了 openclaw-lark 插件。该插件提供以下原生工具:
工具名核心能力feishu_calendar_event创建/查询/修改/删除日程、搜索日程、回复邀请feishu_calendar_freebusy查询 1-10 个用户的空闲忙状态feishu_calendar_event_attendee添加参会人、查看参会人列表feishu_calendar_calendar查询/管理日历列表
判断条件:当前环境中可用 feishu_calendar_event 工具时,直接使用插件工具完成所有日历操作,跳过优先级 2。
⚠️ 插件工具使用 用户身份(user_access_token),需用户完成 OAuth 授权。如授权未完成,工具会自动引导用户授权。
插件工具使用要点(详见 feishu-calendar SKILL):
2026-03-27T14:00:00+08:00user_open_id 必填:值取消息上下文的 SenderId( ou_xxx),确保发起人出现在参会人列表open_id( ou_xxx 格式)attendees(无需分两步)list 操作自动展开重复日程,时间区间不超过 40 天当飞书插件未安装或不可用时,退化为使用 API 脚本。
前置要求:
FEISHU_APP_ID、 FEISHU_APP_SECRETcalendar:calendar 权限⚠️ API 脚本方式使用
tenant_access_token(应用身份),只能操作应用日历,无法查询用户 freebusy 或读取用户个人日历。
触发:用户要创建会议、安排日程、约人开会
步骤:
解析请求 — 提取:参与者(姓名/open_id)、会议主题、开始时间、结束时间、会议描述
查询参与者 open_id — 如只有姓名,通过 feishu_search_user 查找
查空闲(可选但推荐) — 创建前查询参会人是否有时间冲突
创建日程 — 按优先级选择:
feishu_calendar_event with action=create输出摘要 — 会议时间、主题、参会者、日程链接
关键注意(仅脚本方式):
visibility 必须是字符串 "default",不能是数字 0timestamp 必须是秒级时间戳字符串(如 "1774596600")attendees,必须先创建再单独添加触发:用户要找时间开会、查某人有空没
步骤:
确认参与者 — 收集需要查询的用户的 open_id
确定时间范围 — 默认查询未来 5 个工作日
查询忙闲 — 按优先级选择:
feishu_calendar_freebusy(支持 1-10 人批量查询)计算共同空闲时段 — 取各参与者空闲时段交集,按会议时长筛选
推荐时间 — 展示 2-3 个可用时段,工作日上午优先
⚠️ 查询用户空闲忙状态 必须使用用户身份(插件方式)。脚本方式(tenant_access_token)无法查询用户 freebusy。
触发:用户查日历 / "今天有什么会" / "这周安排"
步骤:
确定时间范围 — 按请求解析(今天/本周/指定日期)
查询日程 — 按优先级选择:
feishu_calendar_event with action=list(自动展开重复日程)scripts/feishu-calendar.sh list 或直接 curl格式化输出 — 按时间排序,简洁展示(北京时间)
触发:用户要改时间、取消会议、更新会议信息
步骤:
定位日程 — 通过 search 或 list 找到目标 event_id
执行操作 — 按优先级选择:
feishu_calendar_event with action=patch/delete确认结果 — 反馈操作是否成功
触发:用户要接受/拒绝/暂定某个会议邀请
步骤:
feishu_calendar_event with action=reply,传 rsvp_status(accept/decline/tentative)⚠️ 回复邀请仅插件方式支持(需要用户身份)。
触发:会议即将开始 / 用户要求准备会议资料 / "帮我看看XX会议的相关文档"
步骤:
Asia/Shanghai (UTC+8),展示用北京时间("下午3点"),不展示 UTC用户意图工具action必填参数强烈建议创建会议feishu_calendar_eventcreatesummary, start_time, end_timeuser_open_id, attendees查日程feishu_calendar_eventliststart_time, end_time-改日程feishu_calendar_eventpatchevent_idstart_time/end_time搜日程feishu_calendar_eventsearchquery-回复邀请feishu_calendar_eventreplyevent_id, rsvp_status-删日程feishu_calendar_eventdeleteevent_id-查空闲feishu_calendar_freebusylisttime_min, time_max, user_ids[]-邀请参会人feishu_calendar_event_attendeecreatecalendar_id, event_id, attendees[]-查日历列表feishu_calendar_calendarlist--
操作方法端点说明获取 tenant tokenPOST/auth/v3/tenant_access_token/internal应用身份认证获取主日历GET/calendar/v4/calendars/primarytenant 下返回应用日历创建日程POST/calendar/v4/calendars/{cal_id}/events不含 attendees添加参会人POST/calendar/v4/calendars/{cal_id}/events/{evt_id}/attendees创建后单独调用查询日程GET/calendar/v4/calendars/{cal_id}/events?start_time=&end_time=秒级时间戳 query 参数更新日程PATCH/calendar/v4/calendars/{cal_id}/events/{evt_id}删除日程DELETE/calendar/v4/calendars/{cal_id}/events/{evt_id}
Base URL: https://open.feishu.cn/open-apis
详细 API 参考见 references/feishu-calendar-api.md