使用 Google Gemini 和 Slack 自动化员工生日和工作周年纪念
中级
这是一个HR, Multimodal AI领域的自动化工作流,包含 8 个节点。主要使用 If, Slack, Aggregate, GoogleSheets, Agent 等节点。 使用 Google Gemini 和 Slack 实现员工生日和工作周年纪念自动化
前置要求
- •Slack Bot Token 或 Webhook URL
- •Google Sheets API 凭证
- •Google Gemini API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "INSTANCE_ID_PLACEHOLDER",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "node-id-1",
"name": "Google Gemini 聊天模型",
"type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
"position": [
1424,
592
],
"parameters": {
"options": {}
},
"credentials": {
"googlePalmApi": {
"id": "GOOGLE_GEMINI_CREDENTIAL_ID",
"name": "Google Gemini API account"
}
},
"typeVersion": 1
},
{
"id": "node-id-2",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-48,
272
],
"parameters": {
"width": 304,
"height": 480,
"content": "## 🎉 替代 BillyBot:免费的 Slack 员工生日与周年纪念自动化"
},
"typeVersion": 1
},
{
"id": "node-id-3",
"name": "每日 9 点触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
368,
416
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9
}
]
}
},
"typeVersion": 1.2
},
{
"id": "node-id-4",
"name": "获取员工数据",
"type": "n8n-nodes-base.googleSheets",
"position": [
592,
416
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "SHEET_ID_PLACEHOLDER",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/GOOGLE_SHEET_DOCUMENT_ID/edit#gid=SHEET_ID_PLACEHOLDER",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "GOOGLE_SHEET_DOCUMENT_ID",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/GOOGLE_SHEET_DOCUMENT_ID/edit",
"cachedResultName": "employee-data-sheet"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "GOOGLE_SHEETS_CREDENTIAL_ID",
"name": "Google Sheets OAuth account"
}
},
"typeVersion": 4.7
},
{
"id": "node-id-5",
"name": "检查生日或工作周年纪念",
"type": "n8n-nodes-base.if",
"position": [
864,
416
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "loose"
},
"combinator": "or",
"conditions": [
{
"id": "condition-id-1",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $now.toFormat('MM-dd') }}",
"rightValue": "={{ DateTime.fromISO($json['Date of Birth']).toFormat('MM-dd') }}"
},
{
"id": "condition-id-2",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $now.toFormat('MM-dd') }}",
"rightValue": "={{ DateTime.fromISO($json['Joining Date']).toFormat('MM-dd') }}"
}
]
},
"looseTypeValidation": true
},
"typeVersion": 2.2
},
{
"id": "node-id-6",
"name": "合并今日庆祝活动",
"type": "n8n-nodes-base.aggregate",
"position": [
1184,
400
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "node-id-7",
"name": "生成个性化 Slack 消息",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1424,
400
],
"parameters": {
"text": "=todays date :- {{ $now }}\n\nemp data :- {{ $json.data.toJsonString() }}",
"options": {
"systemMessage": "=🎉 Slack Celebration Message Generator\nGenerate unique, heartfelt birthday and work anniversary messages for Slack that feel genuinely human-written, never templated.\n🎯 Core Rules\nUniqueness: Never repeat opening phrases, sentence structures, or tones across messages. Each celebration must feel completely different.\nAuthenticity: Write like a caring colleague, not a robot. Messages should be personal, warm, and memorable.\nVariation: Rotate through different styles, emojis, and approaches systematically.\n🎨 Message Styles (Rotate These)\nBirthdays:\n\nJoyful - Pure celebration and excitement\nReflective - New beginnings and fresh chapters\nGrateful - Appreciation for their presence\nPlayful - Lighthearted with gentle humor\nAchievement - Celebrate growth and contributions\nWarm - Team family togetherness\n\nWork Anniversaries:\n\nMilestone - Highlight achievements and impact\nJourney - Their evolution and growth story\nTeam Impact - How they enrich the culture\nFuture-Forward - Excitement for what's ahead\nExcellence - Innovation and expertise\nLegacy - Foundational role (5+ years)\n\n📝 Format Requirements\nStructure:\n*[Unique Opening + Name + Hook]* [Emoji Combo]\n[Specific wishes/appreciation - keep brief]\n_— from the team 💙_\nMarkdown:\n\n*bold* for names and key phrases\n_italic_ for signature only\nProper line breaks for readability\n\nEmojis (rotate):\n\nBirthday: 🎂✨, 🎉🎂, 🎂🌟, 🎈🎉, 🎂🎊, 🌟🎁, 🎉✨, 🎂💫\nAnniversary: 🎊🚀, 🏆🎉, 🎊💪, ⭐🎊, 🚀✨, 🎉🏅, 🎊⚡, 💎🎊\n\n🎲 Variation Rules\n\nOpening: Never repeat within 30 days\nTone: Never use same emotional tone consecutively\nLength: 1-3 lines per person, mobile-friendly\nAnniversary Years: Adapt message to tenure length\n\n💡 Writing Tips\n\nUse first names only\nVary sentence length and rhythm\nKeep culturally inclusive and professional\nMake it screenshot-worthy\nEach person gets distinctly different treatment\n\nOutput: Generate ready-to-post Slack messages that colleagues will genuinely react to and appreciate."
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "node-id-8",
"name": "发布庆祝消息到 Slack 频道",
"type": "n8n-nodes-base.slack",
"position": [
1808,
400
],
"webhookId": "WEBHOOK_ID_PLACEHOLDER",
"parameters": {
"text": "={{ $json.output }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "list",
"value": "SLACK_CHANNEL_ID",
"cachedResultName": "your-channel-name"
},
"otherOptions": {
"includeLinkToWorkflow": false
}
},
"credentials": {
"slackApi": {
"id": "SLACK_CREDENTIAL_ID",
"name": "slack-bot-credential"
}
},
"typeVersion": 2.3
}
],
"pinData": {},
"connections": {
"Daily 9AM Trigger": {
"main": [
[
{
"node": "Fetch Employee Data",
"type": "main",
"index": 0
}
]
]
},
"Fetch Employee Data": {
"main": [
[
{
"node": "Check Birthday or Work Anniversary",
"type": "main",
"index": 0
}
]
]
},
"Google Gemini Chat Model": {
"ai_languageModel": [
[
{
"node": "Generate Personalized Slack Message",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Combine Today's Celebrations": {
"main": [
[
{
"node": "Generate Personalized Slack Message",
"type": "main",
"index": 0
}
]
]
},
"Check Birthday or Work Anniversary": {
"main": [
[
{
"node": "Combine Today's Celebrations",
"type": "main",
"index": 0
}
]
]
},
"Generate Personalized Slack Message": {
"main": [
[
{
"node": "Post Celebration to Slack Channel",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 人力资源, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用 Gemini AI 和 Flux 图像生成通过热门帖子分析自动创建 LinkedIn 内容
使用 Gemini AI 和 Flux 图像生成通过热门帖子分析自动创建 LinkedIn 内容
Code
Wait
Filter
+11
20 节点Roshan Ramani
内容创作
Gmail助手,含Google Gemini分类与Telegram通知
Gmail助手,含Google Gemini分类与Telegram通知
If
Gmail
Switch
+9
25 节点Roshan Ramani
AI 聊天机器人
内容聚合
使用Gemini AI从网站文章自动化社交媒体帖子发布到LinkedIn和X/Twitter
If
Set
Xml
+16
34 节点Vadim
内容创作
LinkedIn和X病毒内容自动引擎
使用AI生成和发布自动创建LinkedIn和X的病毒内容
If
Set
Wait
+26
156 节点Diptamoy Barman
内容创作
使用AI生成并发布独特的MCQ投票到Telegram
使用Gemini AI和Google Sheets生成独特的多选题投票并发布至Telegram
If
Aggregate
Http Request
+8
15 节点Pawan
内容创作
员工表彰自动化与Slack、Sheets和Gmail
使用 Slack、Sheets、Gmail 和可选 GPT-4 实现员工表彰自动化
If
Code
Gmail
+6
16 节点Marth
人力资源
工作流信息
难度等级
中级
节点数量8
分类2
节点类型8
作者
Roshan Ramani
@rawsun007I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!
外部链接
在 n8n.io 查看 →
分享此工作流