{
  "name": "Sync KPI metrics from ClickUp and Google Sheets to Slack and Gmail",
  "nodes": [
    {
      "id": "7cad3d2c-f079-481d-bfe3-cdc1f7c68e2f",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3360,
        -896
      ],
      "parameters": {
        "width": 360,
        "height": 672,
        "content": "## 📊 Sync KPI Metrics from ClickUp and Google Sheets to Slack and Gmail\n\n### Workflow Overview\nThis workflow automatically generates and distributes a comprehensive KPI dashboard report combining:\n- *"
      }
    },
    {
      "id": "aa0e932d-ad35-435e-9305-d806dcc81a28",
      "name": "Cron Trigger Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2896,
        -896
      ],
      "parameters": {
        "width": null,
        "height": 200,
        "content": "## ⏰ Daily Trigger\n\nSchedules workflow execution\nat a specific time each day.\n\nConfigure your preferred time\nand timezone in node settings."
      }
    },
    {
      "id": "67817fbe-5283-4be8-b0f6-22e452afefc2",
      "name": "ClickUp Tasks Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2560,
        -1072
      ],
      "parameters": {
        "width": null,
        "height": 280,
        "content": "## 🔗 Fetch ClickUp Tasks\n\nRetrieves task data:\n- Status & priority\n- Assignees\n- Time tracking\n- Due dates\n\nUses OAuth2 authentication"
      }
    },
    {
      "id": "b38f8201-079c-4bd9-8b2a-41a1f7b5b8ea",
      "name": "Google Sheets Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2608,
        -384
      ],
      "parameters": {
        "width": null,
        "height": 248,
        "content": "## 📑 Fetch Lead Data\n\nRetrieves lead information\nfrom Google Sheets:\n- Contact details\n- Reply content\n- Source tracking\n- Status updates"
      }
    },
    {
      "id": "6f599e7f-063d-45cb-9e92-17f7c7c86f33",
      "name": "Merge Data Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2224,
        -896
      ],
      "parameters": {
        "width": null,
        "height": 192,
        "content": "## 🔀 Merge Data\n\nCombines ClickUp tasks and\nGoogle Sheets leads into\na single dataset for analysis."
      }
    },
    {
      "id": "4f4b18ab-89c0-4ab6-8d0b-35583341f914",
      "name": "KPI Computation Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2064,
        -480
      ],
      "parameters": {
        "width": 260,
        "height": 304,
        "content": "## 🧮 KPI Analytics\n\n**Calculates metrics:**\n- Task completion rates\n- Overdue tasks\n- Lead sentiment analysis\n- Source performance\n- Trend indicators\n\nCustomize the JavaScript\ncode to add your own KPI"
      }
    },
    {
      "id": "07cbcf4f-3de8-40cb-9b96-3fdeb452474d",
      "name": "Data Formatter Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1856,
        -880
      ],
      "parameters": {
        "width": null,
        "height": 180,
        "content": "## 📤 Format Data\n\nStructures KPI metrics for\nSlack and Gmail outputs.\n\nExtracts key values and\nprepares template variables."
      }
    },
    {
      "id": "738d9580-b855-43fd-8be1-986759fae45e",
      "name": "Slack Dashboard Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1408,
        -928
      ],
      "parameters": {
        "width": null,
        "height": 180,
        "content": "## 💬 Slack Summary\n\nPosts quick KPI snapshot\nto your Slack channel.\n\nUpdate channel ID in\nnode configuration."
      }
    },
    {
      "id": "9780b484-e977-44d3-b123-43f74d412cb3",
      "name": "Gmail Report Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1392,
        -496
      ],
      "parameters": {
        "width": null,
        "height": 248,
        "content": "## 📧 Email Report\n\nSends detailed HTML report\nwith comprehensive KPI analysis,\ncharts, and insights.\n\nUpdate recipient email address\nin node settings."
      }
    },
    {
      "id": "cfc0967b-c5cc-49a6-9480-01615b9b449d",
      "name": "Error Handling Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3024,
        96
      ],
      "parameters": {
        "width": null,
        "height": 180,
        "content": "## ⚠️ Error Alerts\n\nCaptures workflow failures\nand sends alerts to Slack.\n\nConfigure alerts channel\nfor team notifications."
      }
    },
    {
      "id": "a9ce4348-b49b-47b8-a723-72328fc7c928",
      "name": "Error Trigger Handler",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -2720,
        96
      ]
    },
    {
      "id": "172f269d-41ce-4d11-8d2d-3442315a8d2d",
      "name": "Slack - Send Error Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        -2496,
        96
      ]
    },
    {
      "id": "d7e79592-f836-4053-b917-c741784a61dd",
      "name": "Daily Cron Trigger",
      "type": "n8n-nodes-base.cron",
      "position": [
        -2672,
        -672
      ]
    },
    {
      "id": "9cad37f4-6719-439d-9652-5eeec89ad983",
      "name": "ClickUp - Fetch Tasks",
      "type": "n8n-nodes-base.clickUp",
      "position": [
        -2448,
        -768
      ]
    },
    {
      "id": "d5bb389e-dc40-45ad-bd5e-7c59d9a536c9",
      "name": "Google Sheets - Fetch Lead Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -2448,
        -576
      ]
    },
    {
      "id": "75c5f34a-d851-4eae-bff7-7289d608a03c",
      "name": "Merge - Consolidate Datasets",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2224,
        -672
      ]
    },
    {
      "id": "fa353353-2fd0-424a-a09a-639831c2dabc",
      "name": "Code - Compute KPI Trends",
      "type": "n8n-nodes-base.code",
      "position": [
        -2000,
        -672
      ]
    },
    {
      "id": "414f7e49-df31-4690-950c-d7f451fc6014",
      "name": "Set - Format Output Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -1776,
        -672
      ]
    },
    {
      "id": "5449a5fb-aa27-4280-8e2f-dc1333b4611f",
      "name": "Slack - Post Dashboard Snapshot",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1552,
        -768
      ]
    },
    {
      "id": "3853cf8a-ca5c-44e0-93d1-b31f6c222b10",
      "name": "Gmail - Send KPI Report",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -1552,
        -576
      ]
    }
  ],
  "connections": {
    "Daily Cron Trigger": {
      "main": [
        [
          {
            "node": "Google Sheets - Fetch Lead Data",
            "type": "main",
            "index": 0
          },
          {
            "node": "ClickUp - Fetch Tasks",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ClickUp - Fetch Tasks": {
      "main": [
        [
          {
            "node": "Merge - Consolidate Datasets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger Handler": {
      "main": [
        [
          {
            "node": "Slack - Send Error Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set - Format Output Data": {
      "main": [
        [
          {
            "node": "Slack - Post Dashboard Snapshot",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gmail - Send KPI Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code - Compute KPI Trends": {
      "main": [
        [
          {
            "node": "Set - Format Output Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge - Consolidate Datasets": {
      "main": [
        [
          {
            "node": "Code - Compute KPI Trends",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets - Fetch Lead Data": {
      "main": [
        [
          {
            "node": "Merge - Consolidate Datasets",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}