{
  "name": "Sync open Zendesk tickets to Google Sheets with Zendesk and Google Sheets",
  "nodes": [
    {
      "id": "830ee093-91e4-4e05-951a-71ef28f891ef",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -912,
        1752
      ]
    },
    {
      "id": "75059b03-2511-4c4d-8dab-501af687b6b4",
      "name": "Sticky Note - Enhanced Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        1664
      ],
      "parameters": {
        "width": 320,
        "height": 380,
        "content": "## 🎯 Enhanced Workflow Overview\n\nAdvanced Zendesk ticket synchronization with:\n- Open ticket syncing to Google Sheets\n- Priority-based categorization\n- SLA tracking and alerts\n- Ticket aging analysis\n"
      }
    },
    {
      "id": "6dc2df3f-5faa-48b8-8b1a-dd504ea2db26",
      "name": "Sticky Note - Data Fetching",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        1376
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 🎫 Zendesk Data Fetching\n\nRetrieves ALL tickets from Zendesk:\n- Ticket ID, subject, description\n- Status, priority, type\n- Tags and custom fields\n- Requester and assignee info\n- Creation and update "
      }
    },
    {
      "id": "73883328-d1c5-44bd-8bc8-4d95864a6949",
      "name": "Sticky Note - User Details",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -304,
        1456
      ],
      "parameters": {
        "width": 260,
        "height": 300,
        "content": "## 👤 User Enrichment\n\nFetches detailed user information:\n- Full name and email\n- Organization details\n- User role and timezone\n- Contact information\n\n**Enhancement**: Also captures user's organization"
      }
    },
    {
      "id": "667f61a9-d4ec-4707-b8af-22c324a80f3e",
      "name": "Sticky Note - Enrichment",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        1952
      ],
      "parameters": {
        "width": 280,
        "height": 320,
        "content": "## 🔄 Data Enrichment\n\nAdds calculated fields:\n- Ticket age in days\n- Priority score (urgent=4, high=3, normal=2, low=1)\n- SLA status (breached/at-risk/ok)\n- Response time category\n\n**Purpose**: Enable"
      }
    },
    {
      "id": "ed9468af-75a4-4d01-b39c-31906de47930",
      "name": "Enrich with Calculated Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        -16,
        1752
      ]
    },
    {
      "id": "2f34e888-a1a7-4d3f-9929-765aa26b9442",
      "name": "Sticky Note - Alert Logic",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        1456
      ],
      "parameters": {
        "width": 280,
        "height": 320,
        "content": "## ⚠️ Priority Alert Detection\n\nIdentifies tickets needing immediate attention:\n- SLA breached tickets (>7 days old)\n- Urgent priority tickets\n- High priority tickets >3 days old\n\n**Action**: Routes t"
      }
    },
    {
      "id": "f6002cdd-73c3-46e4-95bd-62ac0e9db3da",
      "name": "Check for Priority Alerts",
      "type": "n8n-nodes-base.if",
      "position": [
        208,
        1752
      ]
    },
    {
      "id": "00f8b033-7871-431f-aa87-d39f42416a10",
      "name": "Sticky Note - Main Sheet",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        336,
        1984
      ],
      "parameters": {
        "width": 300,
        "height": 360,
        "content": "## 📊 Google Sheets - Main Data\n\n**Enhanced Columns:**\n- Ticket No., Description, Status\n- Owner, Email, Tag\n- Priority, Age (days)\n- SLA Status\n- Last Updated\n\n**Operation**: Append or Update\n- Matche"
      }
    },
    {
      "id": "c8a64bd2-7545-4836-a1dd-3fe32e6106f5",
      "name": "Save to Google Sheets - Main Data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        656,
        1848
      ]
    },
    {
      "id": "ba66f4ad-b0ce-43ff-a7e5-258308351370",
      "name": "Sticky Note - Statistics",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        2016
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 📈 Statistics Aggregation\n\nCalculates workflow metrics:\n- Total open tickets processed\n- Tickets by priority breakdown\n- Average ticket age\n- SLA breach count\n- At-risk ticket count\n\n**Output**: Sin"
      }
    },
    {
      "id": "9fffe6b5-0a0c-44ac-8011-991867187ef3",
      "name": "Calculate Summary Statistics",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        1848
      ]
    },
    {
      "id": "7b771b0e-c8d8-4911-93cc-37e361800f79",
      "name": "Sticky Note - Dashboard",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1232,
        1984
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 📊 Dashboard Sheet Update\n\n**Sheet**: \"Dashboard\" tab\n\n**Contains**:\n- Real-time ticket counts\n- Priority distribution\n- SLA metrics\n- Sync timestamp\n\n**Updates**: Every workflow run\n**Purpose**: Qu"
      }
    },
    {
      "id": "80ff7173-2e8b-4ec5-8825-96ad1341c645",
      "name": "Update Dashboard Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1104,
        1848
      ]
    },
    {
      "id": "284f0319-6bda-4953-bb93-f705efcc9da4",
      "name": "Sticky Note - Slack Alerts",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        752,
        1264
      ],
      "parameters": {
        "width": 280,
        "height": 360,
        "content": "## 🔔 Slack Notifications\n\n**Triggers on**:\n- SLA breached tickets\n- At-risk tickets\n\n**Message includes**:\n- Ticket number and subject\n- Owner and priority\n- Age and SLA status\n- Direct Zendesk link\n\n"
      }
    },
    {
      "id": "a9cdde34-f1a9-465e-bcdd-ec4955662258",
      "name": "Format Slack Message",
      "type": "n8n-nodes-base.set",
      "position": [
        432,
        1680
      ]
    },
    {
      "id": "5bb85663-aa0a-4cdd-86b5-112ecb53f514",
      "name": "Send Slack Alert",
      "type": "n8n-nodes-base.slack",
      "position": [
        656,
        1632
      ]
    },
    {
      "id": "b08a7f25-1757-4d7e-8cf4-673238872907",
      "name": "Sticky Note - Scheduling",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        1280
      ],
      "parameters": {
        "width": 300,
        "height": 360,
        "content": "## ⏰ Schedule Trigger (Optional)\n\n**Recommended Setup**:\n- Interval: Every 15 minutes\n- Active hours: 8 AM - 8 PM\n- Days: Monday - Friday\n\n**Alternative**: Hourly or on-demand\n\n*Replace manual trigger"
      }
    },
    {
      "id": "18a213f8-593a-4a0a-b65a-5751567cdc03",
      "name": "Sticky Note - Error Handling",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        1520
      ],
      "parameters": {
        "width": 280,
        "height": 340,
        "content": "## 🛡️ Error Handling\n\n**Built-in safeguards**:\n- Continues on API failures\n- Logs errors to separate sheet\n- Retries on rate limits\n- Validates data before writing\n\n**Error Sheet**: Tracks sync issues"
      }
    },
    {
      "id": "1af52d43-43c2-4030-a344-affdd2b639ac",
      "name": "Fetch All Zendesk Tickets1",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        -688,
        1752
      ]
    },
    {
      "id": "58181b52-bf1e-45ea-b738-098346f87277",
      "name": "Sticky Note - Filter Logic1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        1920
      ],
      "parameters": {
        "width": 260,
        "height": 280,
        "content": "## 🔍 Status Filter\n\nFilters for OPEN status tickets only.\n\n**Logic**: status = \"open\"\n\n**Other statuses**: pending, solved, closed, new\n\n**Why?** Focus on active tickets needing attention"
      }
    },
    {
      "id": "0fe1d046-f24e-4f62-b1c4-811d595ea4a4",
      "name": "Filter Open Tickets Only1",
      "type": "n8n-nodes-base.if",
      "position": [
        -464,
        1752
      ]
    },
    {
      "id": "f9fa784b-343b-481d-8560-22396b7e235c",
      "name": "Get Ticket Requester Details1",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        -240,
        1752
      ]
    }
  ],
  "connections": {
    "Format Slack Message": {
      "main": [
        [
          {
            "node": "Send Slack Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Save to Google Sheets - Main Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check for Priority Alerts": {
      "main": [
        [
          {
            "node": "Format Slack Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Save to Google Sheets - Main Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Open Tickets Only1": {
      "main": [
        [
          {
            "node": "Get Ticket Requester Details1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All Zendesk Tickets1": {
      "main": [
        [
          {
            "node": "Filter Open Tickets Only1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calculate Summary Statistics": {
      "main": [
        [
          {
            "node": "Update Dashboard Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich with Calculated Fields": {
      "main": [
        [
          {
            "node": "Check for Priority Alerts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Ticket Requester Details1": {
      "main": [
        [
          {
            "node": "Enrich with Calculated Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save to Google Sheets - Main Data": {
      "main": [
        [
          {
            "node": "Calculate Summary Statistics",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Fetch All Zendesk Tickets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}