تذكير بحصص الغد على واتساب

كل مساء، ذكّر الطلاب (أو أولياء أمورهم) بحصة الغد: المادة والموعد والمكان.

سهل توفّر ~5 ساعة شهريًا التعليم والتدريببواسطة فريق Flowngn

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: جدول زمني — كل يوم الساعة 18:00
  1. اقرأ جدول Sessions (التاريخ، الوقت، المادة، الطالب، الهاتف، المكان).
  2. احتفظ بحصص الغد.
  3. أرسل لكل طالب قالب واتساب بالمادة والموعد والمكان.

المخطط

Every day 18:00Schedule TriggerGRead sessionsGoogle Sheets{ }Tomorrow's sessionsCodeWSend reminderWhatsApp Business Cloud
مشغّل تطبيق كود

الكود

كود JavaScript المستخدم في خطوات Code، وهو مضمَّن بالفعل في القالب بالأسفل.

Tomorrow's sessions · عقدة Code
// Sessions sheet columns: date (YYYY-MM-DD) | time | course | student | parent_phone | location
// Keeps tomorrow's sessions that have a phone number.
const tomorrow = new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString().slice(0, 10);

return $input.all()
  .map((item) => item.json)
  .filter((s) => String(s.date).slice(0, 10) === tomorrow && s.parent_phone)
  .map((s) => ({
    json: {
      phone: String(s.parent_phone).replace(/[^0-9]/g, ""),
      student: s.student,
      course: s.course,
      time: s.time,
      location: s.location || "online",
    },
  }));

ابنِها بأداتك

اختر أداتك — نفس الأتمتة، خطوة بخطوة.

انسخه والصقه مباشرة في مساحة عمل n8n (Ctrl+V)، أو حمّله واستخدم Import from File. بعد ذلك اربط حساباتك واستبدل كل قيمة تبدأ بـ YOUR_.

ملف Workflow JSON
عرض الكود (162 سطر)
{
  "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": "2c52a72d-5fca-44f4-aa39-2f513d8b72a5",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 18
            }
          ]
        }
      },
      "id": "2c52a72d-5fca-44f4-aa39-2f513d8b72a5",
      "name": "Every day 18: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": "Sessions",
          "mode": "name"
        },
        "options": {}
      },
      "id": "2c52a72d-5fca-44f4-aa39-2f513d8b72a5",
      "name": "Read sessions",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "// Sessions sheet columns: date (YYYY-MM-DD) | time | course | student | parent_phone | location\n// Keeps tomorrow's sessions that have a phone number.\nconst tomorrow = new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString().slice(0, 10);\n\nreturn $input.all()\n  .map((item) => item.json)\n  .filter((s) => String(s.date).slice(0, 10) === tomorrow && s.parent_phone)\n  .map((s) => ({\n    json: {\n      phone: String(s.parent_phone).replace(/[^0-9]/g, \"\"),\n      student: s.student,\n      course: s.course,\n      time: s.time,\n      location: s.location || \"online\",\n    },\n  }));"
      },
      "id": "2c52a72d-5fca-44f4-aa39-2f513d8b72a5",
      "name": "Tomorrow's sessions",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "operation": "sendTemplate",
        "phoneNumberId": "YOUR_PHONE_NUMBER_ID",
        "recipientPhoneNumber": "={{ $json.phone }}",
        "template": "YOUR_CLASS_REMINDER_TEMPLATE|ar",
        "components": {
          "component": [
            {
              "type": "body",
              "bodyParameters": {
                "parameter": [
                  {
                    "type": "text",
                    "text": "={{ $json.student }}"
                  },
                  {
                    "type": "text",
                    "text": "={{ $json.course }}"
                  },
                  {
                    "type": "text",
                    "text": "={{ $json.time }}"
                  },
                  {
                    "type": "text",
                    "text": "={{ $json.location }}"
                  }
                ]
              }
            }
          ]
        }
      },
      "id": "2c52a72d-5fca-44f4-aa39-2f513d8b72a5",
      "name": "Send reminder",
      "type": "n8n-nodes-base.whatsApp",
      "typeVersion": 1,
      "position": [
        900,
        0
      ]
    }
  ],
  "connections": {
    "Every day 18:00": {
      "main": [
        [
          {
            "node": "Read sessions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read sessions": {
      "main": [
        [
          {
            "node": "Tomorrow's sessions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tomorrow's sessions": {
      "main": [
        [
          {
            "node": "Send reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

← افتحها في ساحة التجربة لتعديلها

نصائح

  • للحصص الأونلاين، ضع رابط الاجتماع في عمود المكان.

أتمتات مشابهة