حجوزات اليوم تصل لمجموعة الموظفين
كل عصر، يصل فريق الصالة حجوزات اليوم على تيليجرام: المواعيد والأسماء وعدد الضيوف والملاحظات.
كيف تعمل
المشغّل: جدول زمني — كل يوم الساعة 16:00
- اقرأ جدول Reservations.
- احتفظ بحجوزات اليوم غير الملغاة مرتبة حسب الوقت.
- أرسل القائمة مع إجمالي الضيوف إلى مجموعة الموظفين.
المخطط
مشغّل تطبيق كود
الكود
كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.
// Reservations sheet columns: date (YYYY-MM-DD) | time | name | phone | guests | notes | status
// Builds today's booking list for the floor team, in time order.
const today = new Date().toISOString().slice(0, 10);
const rows = $input.all()
.map((item) => item.json)
.filter((r) => String(r.date).slice(0, 10) === today && String(r.status).toLowerCase() !== "cancelled")
.sort((a, b) => String(a.time).localeCompare(String(b.time)));
if (!rows.length) return [{ json: { message: `No reservations today (${today}).` } }];
const guests = rows.reduce((sum, r) => sum + (Number(r.guests) || 0), 0);
const list = rows.map((r) => `${r.time} ${r.name} · ${r.guests} guests${r.notes ? ` · ${r.notes}` : ""}`).join("\n");
return [{ json: { message: `🍽 Today: ${rows.length} bookings, ${guests} guests\n\n${list}` } }];ابنِها بأداتك
اختر أداتك — نفس الأتمتة، خطوة بخطوة.
انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.
عرض الكود (136 سطر)
{
"name": "حجوزات اليوم تصل لمجموعة الموظفين (Flowngn)",
"nodes": [
{
"parameters": {
"content": "## حجوزات اليوم تصل لمجموعة الموظفين\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": "2473c6c3-ba78-4235-a758-cbde9652839a",
"name": "Setup notes",
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-420,
-60
]
},
{
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 16
}
]
}
},
"id": "2473c6c3-ba78-4235-a758-cbde9652839a",
"name": "Every day 16: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": "Reservations",
"mode": "name"
},
"options": {}
},
"id": "2473c6c3-ba78-4235-a758-cbde9652839a",
"name": "Read reservations",
"type": "n8n-nodes-base.googleSheets",
"typeVersion": 4.5,
"position": [
300,
0
]
},
{
"parameters": {
"jsCode": "// Reservations sheet columns: date (YYYY-MM-DD) | time | name | phone | guests | notes | status\n// Builds today's booking list for the floor team, in time order.\nconst today = new Date().toISOString().slice(0, 10);\n\nconst rows = $input.all()\n .map((item) => item.json)\n .filter((r) => String(r.date).slice(0, 10) === today && String(r.status).toLowerCase() !== \"cancelled\")\n .sort((a, b) => String(a.time).localeCompare(String(b.time)));\n\nif (!rows.length) return [{ json: { message: `No reservations today (${today}).` } }];\n\nconst guests = rows.reduce((sum, r) => sum + (Number(r.guests) || 0), 0);\nconst list = rows.map((r) => `${r.time} ${r.name} · ${r.guests} guests${r.notes ? ` · ${r.notes}` : \"\"}`).join(\"\\n\");\n\nreturn [{ json: { message: `🍽 Today: ${rows.length} bookings, ${guests} guests\\n\\n${list}` } }];"
},
"id": "2473c6c3-ba78-4235-a758-cbde9652839a",
"name": "Today's bookings",
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
600,
0
]
},
{
"parameters": {
"chatId": "YOUR_CHAT_ID",
"text": "={{ $json.message }}",
"additionalFields": {
"appendAttribution": false
}
},
"id": "2473c6c3-ba78-4235-a758-cbde9652839a",
"name": "Send to staff group",
"type": "n8n-nodes-base.telegram",
"typeVersion": 1.2,
"position": [
900,
0
]
}
],
"connections": {
"Every day 16:00": {
"main": [
[
{
"node": "Read reservations",
"type": "main",
"index": 0
}
]
]
},
"Read reservations": {
"main": [
[
{
"node": "Today's bookings",
"type": "main",
"index": 0
}
]
]
},
"Today's bookings": {
"main": [
[
{
"node": "Send to staff group",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"meta": {
"templateCredsSetupCompleted": false
},
"tags": []
}في Make، أنشئ سيناريو جديدًا وأضف هذه الوحدات بالترتيب:
- Schedule the scenario: Every day 16:00
- Google Sheets › Search Rows
- Tools › Set variable / Iterator + Array aggregator (same logic as the Code step)
- Telegram Bot › Send a Text Message or a Reply
- كل تشغيل لوحدة يستهلك عمليات (operations) في Make — والباقة المجانية تتضمن حصة شهرية.
- دوال Make المدمجة (map و sum و formatDate…) تغني عن معظم خطوات Code؛ وللمنطق المعقد استخدم وحدة كود.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
في Zapier، أنشئ Zap جديدًا وأضف هذه الخطوات بالترتيب:
- Schedule by Zapier — Every day 16:00
- Google Sheets — Lookup Spreadsheet Rows (or Code by Zapier)
- Code by Zapier — Run JavaScript (paste the code from the Code section)
- Telegram — Send Message
- الـ Zaps التي فيها أكثر من خطوتين تحتاج باقة Zapier مدفوعة.
- الـ Webhooks والفلاتر/المسارات و Code by Zapier ميزات مدفوعة في بعض باقات Zapier.
- Code by Zapier يشغّل JavaScript: أعد استخدام الكود بالأعلى، مع قراءة المدخلات من inputData بدلًا من $json.
- قد تختلف أسماء الوحدات والخطوات قليلًا مع تحديث Make و Zapier لتطبيقاتهما.
نصائح
- اكتب الحساسية وأعياد الميلاد في عمود الملاحظات ليراها المطبخ أيضًا.
أتمتات مشابهة
المطاعم والفنادقسهل
تأكيد حجوزات المطعم على واتساب
الحجوزات من نموذج موقعك تُحفظ في جدول ويصل الضيف تأكيد على واتساب فورًا.
Webhook → Google Sheets → WhatsApp5 س/شهر
المطاعم والفنادقسهل
رسالة ما قبل الوصول للفندق على واتساب
قبل الوصول بيومين، يصل الضيف ترحيب على واتساب بتواريخه ونوع غرفته ورابط الموقع.
Google Sheets → WhatsApp4 س/شهر
المالية والإدارةمتوسط
سجّل مصروفاتك برسالة لبوت تيليجرام
أرسل "12.50 غداء" إلى البوت فتُحفظ فورًا في Google Sheet.
Telegram → Google Sheets3 س/شهر