أعياد ميلاد الفريق وذكرى الانضمام على Slack
كل صباح، احتفل بأعياد الميلاد وذكرى انضمام الزملاء في قناة الفريق.
كيف تعمل
المشغّل: جدول زمني — كل يوم الساعة 9:00
- اقرأ جدول Employees (الاسم، تاريخ الميلاد، تاريخ الانضمام).
- ابحث عن أعياد الميلاد وذكرى الانضمام التي توافق اليوم.
- انشر رسالة تهنئة واحدة على Slack.
المخطط
مشغّل تطبيق كود
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// Employees sheet columns: name | birthday (YYYY-MM-DD) | start_date (YYYY-MM-DD) | department
// Finds today's birthdays and work anniversaries and builds one Slack message.
const now = new Date();
const md = (d) => `${d.getMonth() + 1}-${d.getDate()}`;
const today = md(now);
const lines = [];
for (const { json: e } of $input.all()) {
if (e.birthday && md(new Date(e.birthday)) === today) {
lines.push(`🎂 Happy birthday, ${e.name}!`);
}
if (e.start_date) {
const start = new Date(e.start_date);
const years = now.getFullYear() - start.getFullYear();
if (years > 0 && md(start) === today) {
lines.push(`🎉 ${e.name} has been with us ${years} year${years > 1 ? "s" : ""} today. Thank you!`);
}
}
}
if (!lines.length) return [];
return [{ json: { message: lines.join("\n") } }];ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.
عرض الكود (139 سطر)
{
"name": "أعياد ميلاد الفريق وذكرى الانضمام على Slack (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## أعياد ميلاد الفريق وذكرى الانضمام على Slack\nكل صباح، احتفل بأعياد الميلاد وذكرى انضمام الزملاء في قناة الفريق.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
"height": 260,
"width": 340
},
"id": "3da33d1f-ca34-490c-ab07-dfbd5de24b43",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 9
}
]
}
},
"id": "3da33d1f-ca34-490c-ab07-dfbd5de24b43",
"name": "Every day 9:00",
"type": "n8n-nodes-base.scheduleTrigger",
"typeVersion": 1.2,
"position": [
0,
0
]
},
{
"parameters": {
"operation": "read",
"documentId": {
"__rl": true,
"value": "YOUR_SPREADSHEET_ID",
"mode": "id"
},
"sheetName": {
"__rl": true,
"value": "Employees",
"mode": "name"
},
"options": {}
},
"id": "3da33d1f-ca34-490c-ab07-dfbd5de24b43",
"name": "Read employees",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
300,
0
]
},
{
"parameters": {
"jsCode": "// Employees sheet columns: name | birthday (YYYY-MM-DD) | start_date (YYYY-MM-DD) | department\n// Finds today's birthdays and work anniversaries and builds one Slack message.\nconst now = new Date();\nconst md = (d) => `${d.getMonth() + 1}-${d.getDate()}`;\nconst today = md(now);\n\nconst lines = [];\nfor (const { json: e } of $input.all()) {\n if (e.birthday && md(new Date(e.birthday)) === today) {\n lines.push(`🎂 Happy birthday, ${e.name}!`);\n }\n if (e.start_date) {\n const start = new Date(e.start_date);\n const years = now.getFullYear() - start.getFullYear();\n if (years > 0 && md(start) === today) {\n lines.push(`🎉 ${e.name} has been with us ${years} year${years > 1 ? \"s\" : \"\"} today. Thank you!`);\n }\n }\n}\n\nif (!lines.length) return [];\nreturn [{ json: { message: lines.join(\"\\n\") } }];"
},
"id": "3da33d1f-ca34-490c-ab07-dfbd5de24b43",
"name": "Find today's celebrations",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
0
]
},
{
"parameters": {
"select": "channel",
"channelId": {
"__rl": true,
"value": "#general",
"mode": "name"
},
"text": "={{ $json.message }}",
"otherOptions": {}
},
"id": "3da33d1f-ca34-490c-ab07-dfbd5de24b43",
"name": "Post to Slack",
"type": "n8n-nodes-base.slack",
"typeVersion": 2.2,
"position": [
900,
0
]
}
],
"connections": {
"Every day 9:00": {
"main": [
[
{
"node": "Read employees",
"type": "main",
"index": 0
}
]
]
},
"Read employees": {
"main": [
[
{
"node": "Find today's celebrations",
"type": "main",
"index": 0
}
]
]
},
"Find today's celebrations": {
"main": [
[
{
"node": "Post to Slack",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- Schedule the scenario: Every day 9:00
- Google Sheets › Search Rows
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Slack › Create a Message
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- Schedule by Zapier — Every day 9:00
- Google Sheets — Lookup Spreadsheet Rows (or Code by Zapier)
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Slack — Send Channel Message
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- استأذن الزملاء قبل إضافة تاريخ ميلادهم؛ فبعضهم يفضّل عدم مشاركته.
أتمتات مشابهة
الموارد البشرية والفريقسهل
حزمة ترحيب للموظف الجديد: بريد ودعوة لليوم الأول وتعريف بالفريق
أضف الموظف الجديد إلى جدول، فيصله بريد ترحيب ودعوة تقويم لليوم الأول، ويرحّب به الفريق على Slack.
Google Sheets → Gmail → Google Calendar → Slack3 س/شهر
الموارد البشرية والفريقسهل
تسجيل حضور وانصراف الموظفين ببوت تيليجرام
يرسل الموظف "دخول" أو "خروج" إلى بوت تيليجرام، ويُسجَّل كل ذلك في جدول الحضور.
Telegram → Google Sheets4 س/شهر
المالية والإدارةسهل
تنبيه فوري عند فشل دفعة في Stripe
اعرف بالمدفوعات الفاشلة فورًا وسجّلها للمتابعة.
Stripe → Slack → Google Sheets2 س/شهر