{
  "name": "Track support performance metrics across Zendesk & Freshdesk with Sheets, Slack & Gmail",
  "nodes": [
    {
      "id": "af98b36c-8053-4882-b3ba-2b90fb5c7523",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        1936,
        -64
      ]
    },
    {
      "id": "df0ba9dc-3737-4030-a225-e58cd3c17a86",
      "name": "Send Weekly Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1936,
        128
      ]
    },
    {
      "id": "b96bf81b-8486-4545-b23e-518643ca9b89",
      "name": "Weekly Trigger",
      "type": "n8n-nodes-base.cron",
      "position": [
        0,
        32
      ]
    },
    {
      "id": "bb68236c-376b-4c00-80fd-6db781100bc2",
      "name": "Fetch Tickets From Zendesk",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        368,
        -64
      ]
    },
    {
      "id": "972d1914-47a0-48a3-8018-46519599bc2f",
      "name": "Log KPIs in Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1040,
        32
      ]
    },
    {
      "id": "42d5b2ac-2c2b-44ad-bb68-654213112f67",
      "name": "Calculate Support KPIs",
      "type": "n8n-nodes-base.code",
      "position": [
        1264,
        32
      ]
    },
    {
      "id": "9bf80187-1b1f-4810-baa7-7234d65f5099",
      "name": "Evaluate Alerts",
      "type": "n8n-nodes-base.if",
      "position": [
        1488,
        32
      ]
    },
    {
      "id": "d9a716a3-9732-4d92-b5c3-d84881ca015f",
      "name": "Generate Slack Alert Message",
      "type": "n8n-nodes-base.code",
      "position": [
        1712,
        -64
      ]
    },
    {
      "id": "fbdbe576-9d94-4328-933e-062e2ba090fb",
      "name": "Generate Weekly HTML Report",
      "type": "n8n-nodes-base.code",
      "position": [
        1712,
        128
      ]
    },
    {
      "id": "a8dd2d83-a156-4290-a846-19cf9abd1591",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -288,
        -96
      ],
      "parameters": {
        "width": null,
        "height": 352,
        "content": "## ⏰ Weekly Cron Trigger\n\nThis node runs the workflow automatically on a **weekly schedule**.  \nConfigured to execute every week at the specified hour (20:00).\n\n**Purpose:**\n- Ensures weekly performan"
      }
    },
    {
      "id": "94e3f206-14af-4b8d-a162-f08942b823a2",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        112,
        -368
      ],
      "parameters": {
        "width": null,
        "height": 336,
        "content": "## 🎟️ Fetch Tickets from Zendesk\n\nFetches all ticket data from your **Zendesk account**.\n\n**Details:**\n- Uses Zendesk API credentials.\n- Retrieves tickets with statuses (open, pending, solved, closed)"
      }
    },
    {
      "id": "862bbe05-8d70-4c61-aeab-9e8c0983610e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        192
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "## 🚨 Evaluate Alerts\n\nChecks if KPI thresholds have been exceeded and if alerts need to be triggered.\n\n**Alert Triggers:**\n- SLA breach > 20%\n- Low resolution rate\n- High backlog\n- Low CSAT score\n- Hi"
      }
    },
    {
      "id": "811a9d1b-4a72-4aad-8cd6-b369ca74025e",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        976,
        224
      ],
      "parameters": {
        "width": null,
        "height": 336,
        "content": "## 📑 Log Alerts in Google Sheets\n\nStores ticket and performance data into a **Google Sheet** for auditing.\n\n**Purpose:**\n- Provides a compliance audit trail.\n- Enables historical trend analysis.\n- Log"
      }
    },
    {
      "id": "4eb74eb7-93c5-4cc1-bf16-2ae9cac49d59",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        -512
      ],
      "parameters": {
        "width": null,
        "height": 528,
        "content": "## 📊 Calculate Support KPIs\n\nProcesses formatted ticket data to compute **key performance metrics**.\n\n**Metrics Calculated:**\n- SLA breach rate\n- Resolution rate\n- Avg response & resolution times\n- CS"
      }
    },
    {
      "id": "7dc027d7-e021-47c7-9f57-e2b8ac3d0a41",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        -400
      ],
      "parameters": {
        "width": null,
        "height": 416,
        "content": "## 🧹 Format Ticket Data (Zendesk & FreshDesk)\n\nCleans and standardizes raw ticket data from both platforms.\nSteps:\n\nAuto-detects platform source (Zendesk vs FreshDesk)\nNormalizes priority, status, and"
      }
    },
    {
      "id": "f858aee3-3dd8-4f92-a0af-e3c2dcd9aa5d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1648,
        -496
      ],
      "parameters": {
        "width": null,
        "height": 416,
        "content": "## 💬 Generate Slack Alert Message\n\nFormats KPI and alert details into a **Slack-ready message**.\n\n**Message Includes:**\n- Performance grade & percentage\n- Key metrics (tickets, SLA, CSAT)\n- Breakdown "
      }
    },
    {
      "id": "a0ac0fc2-4ee4-4cda-a16c-01171d483515",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        288
      ],
      "parameters": {
        "width": null,
        "height": 464,
        "content": "## 📧 Generate Weekly HTML Report\n\nBuilds a **corporate-style HTML email report**.\n\n**Report Sections:**\n- System status (Healthy / Alert)\n- Performance grade (A–D)\n- Key ticket metrics\n- KPI values wi"
      }
    },
    {
      "id": "eaf1f4d6-c806-40d7-80d7-f6a44185a923",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2048,
        -400
      ],
      "parameters": {
        "width": null,
        "height": 336,
        "content": "## 📢 Send Alert to Slack\n\nDelivers the formatted alert message into a configured **Slack channel**.\n\n**Purpose:**\n- Immediate visibility for critical issues.\n- Alerts team to SLA breaches, backlog spi"
      }
    },
    {
      "id": "6bfaa7e3-eb49-4c03-b069-f679de45574a",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2064,
        224
      ],
      "parameters": {
        "width": null,
        "height": 336,
        "content": "## ✉️ Email Weekly Report\n\nSends the **weekly HTML report** via Gmail.\n\n**Recipients:** Configured in this node.  \n**Purpose:**\n- Provides managers with weekly performance summaries.\n- Ensures leaders"
      }
    },
    {
      "id": "1eb5d03c-4862-4cde-b580-e4c5b6fbf479",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        608,
        32
      ]
    },
    {
      "id": "db824881-6986-4114-a95b-e3dfd6a3e7d1",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        224
      ],
      "parameters": {
        "width": null,
        "height": 352,
        "content": " ## 🎫 Fetch Tickets from FreshDesk\nFetches all ticket data from your FreshDesk account.\nDetails:\n\nUses FreshDesk API credentials (API Key authentication).\nRetrieves tickets with statuses (Open, Pendin"
      }
    },
    {
      "id": "ced09d5d-a36c-4979-82e1-4375f87df16d",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        192
      ],
      "parameters": {
        "width": null,
        "height": 352,
        "content": "## 🔗 Merge Ticket Data\nCombines formatted ticket data from multiple sources into a single stream.\nSteps:\n\nMerges Zendesk and FreshDesk ticket arrays\nMaintains unified data structure from formatter\nPas"
      }
    },
    {
      "id": "3860e769-9d69-4564-9c3a-5584c01e4510",
      "name": "Format  Ticket Data (Zendesk & Freshdesk)",
      "type": "n8n-nodes-base.code",
      "position": [
        816,
        32
      ]
    },
    {
      "id": "dda2d4aa-d81e-4066-b650-8f4e749889c3",
      "name": "Fetch Tickets From Freshdesk",
      "type": "n8n-nodes-base.freshdesk",
      "position": [
        368,
        128
      ]
    }
  ],
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Format  Ticket Data (Zendesk & Freshdesk)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Weekly Trigger": {
      "main": [
        [
          {
            "node": "Fetch Tickets From Zendesk",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Tickets From Freshdesk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Evaluate Alerts": {
      "main": [
        [
          {
            "node": "Generate Slack Alert Message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Weekly HTML Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Support KPIs": {
      "main": [
        [
          {
            "node": "Evaluate Alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log KPIs in Google Sheets": {
      "main": [
        [
          {
            "node": "Calculate Support KPIs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Tickets From Zendesk": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Weekly HTML Report": {
      "main": [
        [
          {
            "node": "Send Weekly Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Tickets From Freshdesk": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Generate Slack Alert Message": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format  Ticket Data (Zendesk & Freshdesk)": {
      "main": [
        [
          {
            "node": "Log KPIs in Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}