تذكير بمهام اليوم من Notion

تصلك رسالة Slack بكل مهام Notion المستحقة اليوم.

سهل توفّر ~2 ساعة شهريًا الإنتاجيةبواسطة فريق Flowngn

تعمل مع n8n · Make · Zapier

كيف تعمل

المشغّل: جدول زمني — أيام العمل الساعة 9:00
  1. ابحث في قاعدة مهام Notion عن المهام المستحقة اليوم وغير المنتهية.
  2. جمّعها حسب الشخص.
  3. أرسل لكل شخص (أو لقناة واحدة) قائمته في Slack.

المخطط

Weekdays 9:00Schedule TriggerNTasks due todayNotion{ }Group by personCodeSPost to #teamSlack
مشغّل تطبيق كود

الكود

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

Group by person · عقدة Code
// Groups today's tasks by assignee. Adjust the property names to match your database.
const byPerson = {};

for (const { json: task } of $input.all()) {
  const who = task.property_assignee?.[0] || "Unassigned";
  (byPerson[who] ||= []).push(`• ${task.name}`);
}

const sections = Object.entries(byPerson).map(([who, tasks]) => `*${who}*\n${tasks.join("\n")}`);
if (!sections.length) return [];

return [{ json: { text: `📋 Due today:\n\n${sections.join("\n\n")}` } }];

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

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

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

ملف Workflow JSON
عرض الكود (139 سطر)
{
  "name": "تذكير بمهام اليوم من Notion (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## تذكير بمهام اليوم من Notion\nتصلك رسالة Slack بكل مهام Notion المستحقة اليوم.\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": "34314253-203f-42a9-ad2e-39673f3cb5f5",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 1-5"
            }
          ]
        }
      },
      "id": "34314253-203f-42a9-ad2e-39673f3cb5f5",
      "name": "Weekdays 9:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "resource": "databasePage",
        "operation": "getAll",
        "databaseId": {
          "__rl": true,
          "value": "YOUR_DATABASE_ID",
          "mode": "id"
        },
        "returnAll": true,
        "filterType": "json",
        "filterJson": "={ \"and\": [ { \"property\": \"Due\", \"date\": { \"equals\": \"{{ $today.toFormat('yyyy-MM-dd') }}\" } }, { \"property\": \"Status\", \"status\": { \"does_not_equal\": \"Done\" } } ] }",
        "options": {}
      },
      "id": "34314253-203f-42a9-ad2e-39673f3cb5f5",
      "name": "Tasks due today",
      "type": "n8n-nodes-base.notion",
      "typeVersion": 2.2,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "// Groups today's tasks by assignee. Adjust the property names to match your database.\nconst byPerson = {};\n\nfor (const { json: task } of $input.all()) {\n  const who = task.property_assignee?.[0] || \"Unassigned\";\n  (byPerson[who] ||= []).push(`• ${task.name}`);\n}\n\nconst sections = Object.entries(byPerson).map(([who, tasks]) => `*${who}*\\n${tasks.join(\"\\n\")}`);\nif (!sections.length) return [];\n\nreturn [{ json: { text: `📋 Due today:\\n\\n${sections.join(\"\\n\\n\")}` } }];"
      },
      "id": "34314253-203f-42a9-ad2e-39673f3cb5f5",
      "name": "Group by person",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#team",
          "mode": "name"
        },
        "text": "={{ $json.text }}",
        "otherOptions": {}
      },
      "id": "34314253-203f-42a9-ad2e-39673f3cb5f5",
      "name": "Post to #team",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        900,
        0
      ]
    }
  ],
  "connections": {
    "Weekdays 9:00": {
      "main": [
        [
          {
            "node": "Tasks due today",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tasks due today": {
      "main": [
        [
          {
            "node": "Group by person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Group by person": {
      "main": [
        [
          {
            "node": "Post to #team",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

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

نصائح

  • شارك قاعدة البيانات مع تكامل Notion وإلا فلن تظهر.

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