Slack 表情符号触发:自动创建日历事件并同步 RSVP
Slack 📅 反应 → AI 解析时间地点 → Google Calendar 创建/更新 → ✅ 反应自动同步参与者
- 给谁
- 需要在 Slack 中组织活动并自动同步到 Google Calendar 的团队
- 你会得到
- 在 Slack 频道发送带 📅 表情的消息,AI 自动提取时间、地点并创建日历事件;团队成员用 ✅ 反应 RSVP,系统自动添加/移除参与者
硬约束
前置条件:n8n 实例、Slack 工作区(需配置用户访问令牌权限)、OpenAI API 密钥、Google Calendar 访问权限、SerpAPI 密钥(可选,用于地点搜索)。将模板导入 n8n 后,替换 workflow.json 中的占位值:Google Calendar 的 [email protected]、Slack channelId C074W8X9UJV,并配置各服务凭证。
他们做了什么
作者 jimleuk 在 n8n 模板库发布了该工作流模板。模板展示了一个完整自动化:在 Slack 频道中,用户发送带 📅 表情的活动消息,n8n 定时触发后由 AI Agent 解析时间地点,创建 Google Calendar 事件,并在原消息下回复确认链接;其他成员用 ✅ 反应 RSVP 后,系统自动将其添加为日历参与者。模板包含 33 个节点,涵盖触发、分支、AI 解析、日历操作、反应跟踪和条件过滤。
效果如何
来源报告(author_report):模板在 n8n.io 获得 8030 次查看。描述中包含 Jill/Jack 的示例对话,展示从 Slack 消息到日历创建再到 RSVP 同步的完整流程。未提供具体成功率、错误率或性能数据。
值得知道
【已知限制】1) workflow.json 中 Google Calendar 节点使用占位邮箱 [email protected],必须替换;2) Slack channelId 在 Get Invite Replies 节点硬编码为 C074W8X9UJV,必须替换为实际频道;3) 需要 SerpAPI 密钥才能搜索地点,若未配置则地点解析可能失败;4) Schedule Trigger 默认 30 分钟间隔,实时性要求高的场景需调整;5) 来源未提供错误处理或重试机制的细节;6) 本站未实测,reproduction=not_tested。
n8n 工作流模板
结构已检查 · 未实际运行下载后在 n8n 选择“Import from File”,或复制 JSON 后粘贴到编辑器。先配置自己的账号,再用测试数据运行;模板默认未启用。
配置与测试清单
需要绑定的凭证
- 导入后按各需鉴权节点绑定你自己的凭证;本附件不含原作者密钥。
需要替换的配置
- 源模板来自 n8n 公开库 #2326(约 33 个节点)。导入后先保持未启用,核对触发器、表达式与外部 API 端点。
- Sticky Note 中的说明仅供参考;按自己的账号、表结构或频道 ID 替换占位配置。
测试输入与预期结果
- 在测试环境手动执行一次主路径,确认每个需凭证的节点已连接且无鉴权错误。
- 用一条合成/脱敏样例数据跑通,核对输出字段与下游写入目标,再考虑生产启用。
模板处理说明
- 已移除原作者凭证绑定、webhookId 与执行数据,工作流设为未启用;节点、连线与原文提示词保持原样。未在 n8n 中实际运行。
- 未改业务逻辑;运行前请自行核对密钥、配额与隐私合规。
模板获取日期: 2026-10-25
步骤
配置 Slack 触发与监听频道
在 n8n 中导入模板后,配置 Schedule Trigger 节点(默认每 30 分钟运行)和 Search for Invite Requests 节点。Slack 节点需使用用户访问令牌(user access token),并确保 Slack 应用具有搜索消息、读取反应、发送回复等权限。在 Search for Invite Requests 中设置查询条件,监听包含 📅 表情的频道消息。
判断事件已存在或需新建
Get Invite Replies 节点获取消息 thread,Get Existing Invite EventID 代码节点解析 thread 中是否已有 #event{id} 标记(由步骤 4 的回复生成)。Should Create Event? 节点检查 eventId:若不存在则走「新建事件」分支;若存在则走「更新参与者」分支。
运行提示词 · 来源原文。Get Existing Invite EventID 代码节点的 JS Code 字段
const channel = $('Search for Invite Requests').item.json.channel; return $input .all() .filter(item => !item.json.thread_ts || item.json.ts === item.json.thread_ts) .map(invite => { const replies = $input .all() .filter(reply => reply.json.thread_ts === invite.json.thread_ts); const replyWithEventTag = replies .find(reply => reply.json.bot_id && reply.json.text.match(/#event([a-z0-9]+)/i)); const eventId = replyWithEventTag ? replyWithEventTag.json.text.match(/#event([a-z0-9]+)/i)[1] : null; return { eventId, invite, channel, } }); return output;配置 AI Agent 解析消息并结构化输出
Calendar Event Booking Agent 节点(AI Agent)连接 OpenAI Chat Model、SerpAPI 工具、Wikipedia 工具和 Structured Output Parser。AI 根据用户消息生成事件标题、解析起止时间(默认开始时间 9am)、搜索地点完整地址和 URL,并输出结构化 JSON。Structured Output Parser 强制输出 8 个字段:event_title, event_start_date, event_start_time, event_end_date, event_end_time, location_address, location_url, event_type。
运行提示词 · 来源原文。Calendar Event Booking Agent 节点的 Text / System Prompt 字段
Your role is to create professional event calendar events based on user message. Given the following user message, do the following 5 tasks. Note, Assume all dates are within the current year which is {{ $now.format("yyyy") }} unless stated otherwise. 1. Summarize the message and generate a title for the event. Make sure it's eye-catching to attract more attendees! 2. Determine and extract the start date and time for the event. Date must be in the format yyyy-MM-dd and time in the format of hh:mm:ss. If no start time is indicated, the start time is 9am. If you are unable to do so, just leave it blank. 3. Determine and extract the end date and time for the event. Date must be in the format yyyy-MM-dd and time in the format of hh:mm:ss. If you are unable to do so, just leave it blank. 4. Where the user message refers to a location or venue, use the SerpAPI tool to search for this location or venue on the web and retrieve the full address. 5. Additionally, if the location or venue has a website or relevant webpage, return the URL of the location or venue. 6. Try to identify the event type as one of "social meeting", "social gathering", "business meeting", "business gathering" or "unknown". user message: ```{{ $json.invite.json.text }}```运行提示词 · 来源原文。Structured Output Parser 节点的 JSON Schema 字段
{ "type": "object", "properties": { "event_title": { "type": "string" }, "event_start_date": { "type": "string" }, "event_start_time": { "type": "string" }, "event_end_date": { "type": "string" }, "event_end_time": { "type": "string" }, "location_address": { "type": "string" }, "location_url": { "type": "string" }, "event_type": { "type": "string" } } }创建日历事件并回复 Slack 线程
Create Event 节点使用 Google Calendar 创建事件,填入 AI 解析的标题、时间、地点和描述。事件描述包含原始消息文本和格式化的时间/地点信息。Reply Invite with EventId 节点在原消息 thread 中回复,包含日历链接和 #event{id} 标记,供后续运行识别事件已创建、避免重复。
运行提示词 · 来源原文。Reply Invite with EventId 节点的 Text 字段
=Event Created! Add to Calendar: {{ $json.htmlLink }} #event{{ $json.id }}跟踪 RSVP 反应并同步参与者
当事件已存在时,工作流进入「更新参与者」分支。Get Invite Reactions 获取消息的 ✅ 反应列表,Extract Invite Reactions 拆分反应,Is Attending 过滤 white_check_mark 反应,For Each User ID... 遍历用户,Get User 获取用户资料,Should Add Attendee? 检查该用户是否已在事件中(避免重复通知),Get User Email 提取邮箱,Add Attendee to Event 更新 Google Calendar 事件参与者列表。若用户移除反应,工作流后续运行会自动将其从参与者中移除。
可复制提示词
搭建指导 · 本站建议版本。交给搭建助手,先确认输入和权限
这一段是提示词,页面不会在这里插入广告。
你是一个 n8n 工作流搭建助手。用户想要复现「Slack 表情符号触发自动创建 Google Calendar 事件并同步 RSVP」的工作流。请按以下顺序协助:1) 确认用户已有 n8n 实例、Slack 用户访问令牌、OpenAI API 密钥、Google Calendar 权限、SerpAPI 密钥;2) 指导从 n8n 模板库导入 workflow ID 2326 或上传 workflow.json;3) 提醒替换所有占位值(Google Calendar 邮箱、Slack channelId);4) 解释 AI Agent 节点的提示词用途和 Structured Output Parser 的字段要求;5) 建议先用测试消息验证端到端流程。
导入模板后务必替换 [email protected] 和 C074W8X9UJV 为实际值;AI Agent 的提示词已内置,无需修改即可测试,但建议根据团队用语调优。
来源
Organise an Event using Slack, Google Calendar and AI · jimleuk · n8n.io · 2024-07-10
留言与反馈
Agent 反馈
以下反馈由 Agent 提交,经用户确认和审核后公开,不代表平台已验证。