{
  "name": "Generate AI-powered morning briefs from ClickUp to Slack and Gmail with GPT-4o",
  "nodes": [
    {
      "id": "2bf648b3-58dc-4003-b682-9d35749f3c9f",
      "name": "Note: Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4032,
        -384
      ],
      "parameters": {
        "width": 454,
        "height": 794,
        "content": "## 🌅 Automate Daily Morning Brief Generation from ClickUp to Slack and Gmail using GPT-4\nThis workflow automatically generates a comprehensive morning brief from your ClickUp tasks and sends it to Sla"
      }
    },
    {
      "id": "92a7dff2-bade-4ad8-884c-c6d6d78276c8",
      "name": "Note: Schedule Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3488,
        -512
      ],
      "parameters": {
        "width": 276,
        "height": 362,
        "content": "## ⏰ Schedule Trigger\n\n**Purpose:** Triggers the workflow every morning at 9:15 AM\n\n**Configuration:**\n- Uses cron expression: `15 9 * * *`\n- Runs Monday through Sunday\n- Timezone: Server default\n\n**T"
      }
    },
    {
      "id": "351c23ff-37f5-4305-888b-9d41cd6af400",
      "name": "Trigger: Morning Schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -3344,
        -80
      ]
    },
    {
      "id": "788b9c85-c74a-4533-8552-7f1b6523516b",
      "name": "Note: Fetch Sprints",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3168,
        -576
      ],
      "parameters": {
        "width": 285,
        "height": 451,
        "content": "## 📋 Fetch Sprint Lists\n\n**Purpose:** Retrieves all sprint lists from ClickUp\n\n**Configuration Required:**\n- **Team ID:** Replace `9016683627` with your team ID\n- **Space ID:** Replace `90162844741` w"
      }
    },
    {
      "id": "22bc18f9-01ab-4674-ba53-c72f7c71685c",
      "name": "Get All Lists (Sprints)",
      "type": "n8n-nodes-base.clickUp",
      "position": [
        -3120,
        -80
      ]
    },
    {
      "id": "cfc16d55-b75a-4801-8620-cc5aab3acf46",
      "name": "Note: Validate Data",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2816,
        -512
      ],
      "parameters": {
        "width": 249,
        "height": 367,
        "content": "## ✅ Validation Check\n\n**Purpose:** Ensures sprint lists were retrieved successfully\n\n**Logic:**\n- Checks if response is not empty\n- Only proceeds if lists exist\n\n**Error Handling:**\n- If no lists fou"
      }
    },
    {
      "id": "ff0eb47a-246d-4aed-8760-a09020487bbb",
      "name": "Check Lists Exist",
      "type": "n8n-nodes-base.if",
      "position": [
        -2896,
        -80
      ]
    },
    {
      "id": "4c9545e5-eda5-444e-bceb-6d61d7f06648",
      "name": "Note: Sprint Logic",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2736,
        96
      ],
      "parameters": {
        "width": 263,
        "height": 388,
        "content": "## 🔍 Find Active Sprint\n\n**Purpose:** Identifies the current active sprint or most recent one\n\n**Logic:**\n1. Checks for sprints where current time falls between start and due dates\n2. If active sprint"
      }
    },
    {
      "id": "997dcb26-240f-4ed0-86bb-9bcb302aaa47",
      "name": "Find Latest Sprint",
      "type": "n8n-nodes-base.code",
      "position": [
        -2672,
        -80
      ]
    },
    {
      "id": "46cc6963-ea8a-4bb5-ac09-de10816754e9",
      "name": "Note: Task Retrieval",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2544,
        -560
      ],
      "parameters": {
        "width": 259,
        "height": 390,
        "content": "## 📥 Get Sprint Tasks\n\n**Purpose:** Fetches all tasks from the active sprint\n\n**Filters Applied:**\n- Tasks due today (midnight to 11:59 PM)\n- Includes subtasks and checklist items\n\n**Note:** Team/Spac"
      }
    },
    {
      "id": "18dd7a8f-caad-4a73-b334-6d6140638834",
      "name": "Get Task From Latest Sprint",
      "type": "n8n-nodes-base.clickUp",
      "position": [
        -2448,
        -80
      ]
    },
    {
      "id": "2d279459-7101-408e-8a79-10030d627705",
      "name": "Note: Data Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2304,
        96
      ],
      "parameters": {
        "width": 264,
        "height": 313,
        "content": "## 📊 Format Task Data\n\n**Purpose:** Transforms raw ClickUp data into structured format for AI processing\n\n**Processing:**\n- Extracts checklist items as subtasks\n- Categorizes tasks by status and prior"
      }
    },
    {
      "id": "d76873cc-ba60-4cbe-9163-05e7b90baf26",
      "name": "Format: Compose Brief Data",
      "type": "n8n-nodes-base.code",
      "position": [
        -2224,
        -80
      ]
    },
    {
      "id": "d1a1920b-f54d-4172-9b8c-b17054b3a39d",
      "name": "Note: AI Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        -480
      ],
      "parameters": {
        "width": 385,
        "height": 396,
        "content": "## 🤖 AI Brief Generation\n\n**Purpose:** Uses Azure OpenAI to generate executive summary\n\n**Components:**\n- **LLM:** GPT-4o model\n- **Memory:** Buffer window for context\n- **Parser:** Structured JSON ou"
      }
    },
    {
      "id": "e5fae6c6-9533-46b3-be91-0441dc52ad08",
      "name": "OpenAI: Generate Brief",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1936,
        -80
      ]
    },
    {
      "id": "357b93df-c039-4fde-90f3-6fec91193d32",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1744,
        160
      ]
    },
    {
      "id": "d1af24e4-dd4f-4e6b-bca7-340f1280624c",
      "name": "Azure OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
      "position": [
        -2000,
        160
      ]
    },
    {
      "id": "f336c158-207b-4ec0-8bf9-917a1ad7aabc",
      "name": "Simple Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -1872,
        160
      ]
    },
    {
      "id": "1d5d6d60-31ef-4cb8-bee0-c781bf54a0ca",
      "name": "Note: Email Builder",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1584,
        192
      ],
      "parameters": {
        "width": 256,
        "height": 349,
        "content": "## 📧 Email Formatting\n\n**Purpose:** Converts AI output to beautiful HTML email\n\n**Features:**\n- Professional gradient header\n- Responsive table design\n- Priority task numbering\n- Team member cards\n- B"
      }
    },
    {
      "id": "0a16b85f-c088-48f4-a4a5-4f236a0a875b",
      "name": "Note: Slack Integration",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1488,
        -480
      ],
      "parameters": {
        "width": 246,
        "height": 299,
        "content": "## 💬 Slack Notification\n\n**Purpose:** Posts brief summary to Slack channel\n\n**Configuration Required:**\n- **Channel ID:** Replace `C09GNB90TED` with your channel ID\n- Get channel ID from Slack channel"
      }
    },
    {
      "id": "e62daaeb-4688-42d1-92d1-663418816d80",
      "name": "Slack: Post Brief",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1536,
        -176
      ]
    },
    {
      "id": "03f81896-e5e6-42a5-9b1f-cd7102b0091c",
      "name": "Note: Email Delivery",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        48
      ],
      "parameters": {
        "width": 256,
        "height": 421,
        "content": "## 📨 Gmail Delivery\n\n**Purpose:** Sends formatted HTML email via Gmail\n\n**Configuration Required:**\n- **Recipient Email:** Replace `herevivekpatidar@gmail.com` with recipient\n- Can send to multiple re"
      }
    },
    {
      "id": "518dbe59-a863-444c-b34f-fa15529ade86",
      "name": "Note: Error Management",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3472,
        416
      ],
      "parameters": {
        "width": 379,
        "height": 329,
        "content": "## 🚨 Error Handling System\n\n**Purpose:** Catches workflow failures and sends alerts\n\n**Error Trigger:**\n- Activates when any node fails\n- Captures error details and context\n\n**Slack Alert:**\n- Posts t"
      }
    },
    {
      "id": "6213ae5c-d856-4db2-9dd2-fece957df490",
      "name": "Error Trigger: Catch Failures",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -3344,
        256
      ]
    },
    {
      "id": "865225c0-7954-4202-b893-f798b465d889",
      "name": "Slack: Error Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -3120,
        256
      ]
    },
    {
      "id": "952212b7-d531-4d9e-ba24-49101e309aaa",
      "name": "Format Data For Email",
      "type": "n8n-nodes-base.code",
      "position": [
        -1536,
        32
      ]
    },
    {
      "id": "78494f7e-40da-4c02-aa89-62dc1a3783e4",
      "name": "Send Morning Brief Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -1312,
        32
      ]
    }
  ],
  "connections": {
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "OpenAI: Generate Brief",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Check Lists Exist": {
      "main": [
        [
          {
            "node": "Find Latest Sprint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Latest Sprint": {
      "main": [
        [
          {
            "node": "Get Task From Latest Sprint",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Data For Email": {
      "main": [
        [
          {
            "node": "Send Morning Brief Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI: Generate Brief": {
      "main": [
        [
          {
            "node": "Slack: Post Brief",
            "type": "main",
            "index": 0
          },
          {
            "node": "Format Data For Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Azure OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "OpenAI: Generate Brief",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get All Lists (Sprints)": {
      "main": [
        [
          {
            "node": "Check Lists Exist",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "OpenAI: Generate Brief",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Trigger: Morning Schedule": {
      "main": [
        [
          {
            "node": "Get All Lists (Sprints)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format: Compose Brief Data": {
      "main": [
        [
          {
            "node": "OpenAI: Generate Brief",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Task From Latest Sprint": {
      "main": [
        [
          {
            "node": "Format: Compose Brief Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger: Catch Failures": {
      "main": [
        [
          {
            "node": "Slack: Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}