{
  "name": "گالری ۴: دستیار اجرایی روزانه (تقویم، ایمیل، کارها)",
  "nodes": [
    {
      "parameters": {
        "content": "## گزارش صبحگاهی\n۱) هر روز کاری ۷:۳۰\n۲) جلسه‌های امروز، ایمیل‌های مهم خوانده‌نشده، کارهای سررسید\n۳) ادغام در یک بسته\n۴) خلاصه با مدل: سه اولویت، جلسه‌ها، ایمیل‌های منتظر پاسخ\n۵) ارسال به خودت\n\n⚠️ نمونه آموزشی loOkiYar؛ غیرفعال. گره‌های بنفش (سنجاق‌دار) داده نمایشی ساختگی دارند و در اجرای دستی به سرویس واقعی وصل نمی‌شوند.",
        "height": 338,
        "width": 480,
        "color": 4
      },
      "id": "30465ed9-c47a-5ec7-b988-97994d4c934b",
      "name": "یادداشت 1",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -60,
        -468
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "30 7 * * 6,0,1,2,3"
            }
          ]
        }
      },
      "id": "c947b157-f3c4-517f-b380-e54bca8d09e3",
      "name": "روزهای کاری ۷:۳۰",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        160
      ]
    },
    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "mode": "id",
          "value": "me@example.com"
        },
        "returnAll": true,
        "timeMin": "={{ $today }}",
        "timeMax": "={{ $today.plus({ days: 1 }) }}",
        "options": {
          "singleEvents": true,
          "orderBy": "startTime"
        }
      },
      "id": "a45ede8a-c8bd-50e3-9764-d2ae05e5ca7e",
      "name": "جلسه‌های امروز",
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 1.3,
      "position": [
        260,
        -20
      ],
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "0491059a394554db",
          "name": "Google Calendar account"
        }
      }
    },
    {
      "parameters": {
        "operation": "getAll",
        "limit": 15,
        "filters": {
          "q": "is:important newer_than:2d",
          "readStatus": "unread"
        }
      },
      "id": "dd3ab8d7-7649-58f0-8e44-f20aa1f8f2c6",
      "name": "ایمیل‌های مهم",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        260,
        160
      ],
      "credentials": {
        "gmailOAuth2": {
          "id": "e6161cc65c9b5504",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "read",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "REPLACE_WITH_SPREADSHEET_ID"
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Tasks"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "status",
              "lookupValue": "open"
            }
          ]
        },
        "options": {}
      },
      "id": "42da714b-d6d7-5c6a-a162-2c88d61bf9d6",
      "name": "کارهای سررسید",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.7,
      "position": [
        260,
        340
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "6fd5b108914d5fc7",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "meetings",
        "options": {}
      },
      "id": "e5d4a91f-03c7-5b76-814f-81e2529e3ec8",
      "name": "بسته جلسه‌ها",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        480,
        -20
      ]
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "emails",
        "options": {}
      },
      "id": "f1d3944c-ec1d-57fe-a698-ff19eb60e668",
      "name": "بسته ایمیل‌ها",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        480,
        160
      ]
    },
    {
      "parameters": {
        "aggregate": "aggregateAllItemData",
        "destinationFieldName": "tasks",
        "options": {}
      },
      "id": "553735dc-457e-59f4-ad8f-214de9b442b2",
      "name": "بسته کارها",
      "type": "n8n-nodes-base.aggregate",
      "typeVersion": 1,
      "position": [
        480,
        340
      ]
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineByPosition",
        "numberInputs": 3,
        "options": {}
      },
      "id": "f08174e3-0871-5ffa-8bbc-98cdda4e61f0",
      "name": "یک بسته",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3.1,
      "position": [
        720,
        160
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=جلسه‌ها:\n{{ JSON.stringify(($json.meetings || []).map(m => ({ t: m.start?.dateTime, s: m.summary }))) }}\nایمیل‌ها:\n{{ JSON.stringify(($json.emails || []).map(e => ({ from: e.From, s: e.Subject, x: e.snippet }))) }}\nکارها:\n{{ JSON.stringify(($json.tasks || []).map(t => ({ task: t.task, due: t.due, goal: t.goal }))) }}",
        "hasOutputParser": false,
        "messages": {
          "messageValues": [
            {
              "type": "SystemMessagePromptTemplate",
              "message": "گزارش صبحگاهی فارسی کوتاه بنویس: (۱) سه اولویت امروز با دلیل یک‌خطی؛ (۲) جلسه‌ها با ساعت؛ (۳) ایمیل‌هایی که امروز پاسخ می‌خواهند. فقط از داده بالا؛ اگر چیزی نیست بگو."
            }
          ]
        }
      },
      "id": "3d63f89f-4fae-5aba-8f4d-040f6058f69f",
      "name": "گزارش صبحگاهی",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.9,
      "position": [
        960,
        160
      ]
    },
    {
      "parameters": {
        "model": "openai/gpt-5-mini",
        "options": {
          "temperature": 0.2
        }
      },
      "id": "f28e866d-86dc-5aef-9516-61d00c9d6edf",
      "name": "مدل (OpenRouter)",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "typeVersion": 1,
      "position": [
        960,
        380
      ],
      "credentials": {
        "openRouterApi": {
          "id": "fce14e07dac85574",
          "name": "OpenRouter account"
        }
      }
    },
    {
      "parameters": {
        "operation": "send",
        "sendTo": "me@example.com",
        "subject": "=گزارش صبح {{ $today.toFormat('yyyy-MM-dd') }}",
        "emailType": "text",
        "message": "={{ $json.text }}",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "8f41ce0c-239d-5073-85b7-e274e0859941",
      "name": "ارسال به خودم",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        1220,
        160
      ],
      "credentials": {
        "gmailOAuth2": {
          "id": "e6161cc65c9b5504",
          "name": "Gmail account"
        }
      }
    }
  ],
  "connections": {
    "مدل (OpenRouter)": {
      "ai_languageModel": [
        [
          {
            "node": "گزارش صبحگاهی",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "روزهای کاری ۷:۳۰": {
      "main": [
        [
          {
            "node": "جلسه‌های امروز",
            "type": "main",
            "index": 0
          },
          {
            "node": "ایمیل‌های مهم",
            "type": "main",
            "index": 0
          },
          {
            "node": "کارهای سررسید",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "جلسه‌های امروز": {
      "main": [
        [
          {
            "node": "بسته جلسه‌ها",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ایمیل‌های مهم": {
      "main": [
        [
          {
            "node": "بسته ایمیل‌ها",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "کارهای سررسید": {
      "main": [
        [
          {
            "node": "بسته کارها",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "بسته جلسه‌ها": {
      "main": [
        [
          {
            "node": "یک بسته",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "بسته ایمیل‌ها": {
      "main": [
        [
          {
            "node": "یک بسته",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "بسته کارها": {
      "main": [
        [
          {
            "node": "یک بسته",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "یک بسته": {
      "main": [
        [
          {
            "node": "گزارش صبحگاهی",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "گزارش صبحگاهی": {
      "main": [
        [
          {
            "node": "ارسال به خودم",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "id": "LkyGal04DailyBrief",
  "meta": {
    "templateCredsSetupCompleted": false,
    "instanceId": "lookiyar-academy-demo"
  },
  "tags": [
    {
      "name": "loOkiYar Academy"
    },
    {
      "name": "gallery"
    }
  ],
  "pinData": {
    "جلسه‌های امروز": [
      {
        "json": {
          "summary": "جلسه هفتگی تیم",
          "start": {
            "dateTime": "2026-10-21T10:00:00+03:30"
          },
          "_demo": "داده نمایشی ساختگی"
        }
      },
      {
        "json": {
          "summary": "تماس با ناشر",
          "start": {
            "dateTime": "2026-10-21T14:30:00+03:30"
          },
          "_demo": "داده نمایشی ساختگی"
        }
      }
    ],
    "ایمیل‌های مهم": [
      {
        "json": {
          "From": "partner@example.com",
          "Subject": "قرارداد پاییز",
          "snippet": "لطفاً تا پایان امروز نسخه نهایی را تأیید کنید.",
          "_demo": "داده نمایشی ساختگی"
        }
      },
      {
        "json": {
          "From": "accounting@example.com",
          "Subject": "فاکتور مهر",
          "snippet": "فاکتور پیوست است.",
          "_demo": "داده نمایشی ساختگی"
        }
      }
    ],
    "کارهای سررسید": [
      {
        "json": {
          "task": "بستن فهرست کتاب‌های پاییز",
          "due": "2026-10-21",
          "goal": "فروش فصل",
          "status": "open",
          "_demo": "داده نمایشی ساختگی"
        }
      },
      {
        "json": {
          "task": "پاسخ به نظرسنجی مشتری",
          "due": "2026-10-23",
          "goal": "رضایت مشتری",
          "status": "open",
          "_demo": "داده نمایشی ساختگی"
        }
      }
    ],
    "گزارش صبحگاهی": [
      {
        "json": {
          "text": "اولویت‌ها: ۱) تأیید قرارداد پاییز (مهلت امروز) ۲) بستن فهرست کتاب‌های پاییز (سررسید امروز) ۳) آماده‌سازی جلسه ناشر.\nجلسه‌ها: ۱۰:۰۰ جلسه هفتگی تیم؛ ۱۴:۳۰ تماس با ناشر.\nپاسخ امروز: partner@example.com درباره قرارداد.",
          "_demo": "داده نمایشی ساختگی"
        }
      }
    ],
    "ارسال به خودم": [
      {
        "json": {
          "id": "demo-sent-brief",
          "labelIds": [
            "SENT"
          ],
          "_demo": "داده نمایشی ساختگی"
        }
      }
    ]
  }
}