{
  "name": "Sync Zendesk how-to tickets to Google Sheets knowledge base",
  "nodes": [
    {
      "id": "48804c68-423a-4268-bb12-95531adf0425",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1504,
        1712
      ]
    },
    {
      "id": "ca452dad-821d-491f-870e-72d97a903534",
      "name": "Error Trigger",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -1280,
        2448
      ]
    },
    {
      "id": "12c1be58-113b-4aa7-9278-da78048ce9a7",
      "name": "Error Trigger Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1648,
        2432
      ],
      "parameters": {
        "width": 320,
        "height": 328,
        "content": "## Error Trigger Node\n\nAutomatically activates when ANY node in the workflow fails.\n\n**How it works:**\n- Monitors the entire workflow execution\n- Catches errors from any node\n- Triggers the error hand"
      }
    },
    {
      "id": "5449c962-eb4a-498f-9244-812a865bb0d4",
      "name": "Format Error Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1264,
        2704
      ],
      "parameters": {
        "width": 320,
        "height": 384,
        "content": "## Format Error Details\n\nTransforms raw error data into structured, readable format.\n\n**Extracted Information:**\n- Timestamp of error\n- Workflow and execution IDs\n- Failed node name\n- Error message an"
      }
    },
    {
      "id": "dca1671e-2b16-479c-8dca-d9b58d8c2ccc",
      "name": "Log Error Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        2304
      ],
      "parameters": {
        "width": 320,
        "height": 488,
        "content": "## Error Log Sheet\n\nPersists all error details to Google Sheets for tracking and analysis.\n\n**Log Columns:**\n- Timestamp\n- Workflow Name\n- Execution ID\n- Node Name\n- Error Message\n- Error Type\n- Ticke"
      }
    },
    {
      "id": "0d60a036-f2b3-495e-900e-3e3dc9f6af3f",
      "name": "Email Error Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -256,
        2096
      ],
      "parameters": {
        "width": 320,
        "height": 424,
        "content": "## Email Error Notification\n\nSends immediate alert emails when workflow fails.\n\n**Email Contains:**\n- Error summary\n- Failed node name\n- Timestamp\n- Link to execution (if configured)\n\n**Configuration "
      }
    },
    {
      "id": "4946b2e9-c107-4793-ada0-e95ffe07b966",
      "name": "Success Summary Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -544,
        2608
      ],
      "parameters": {
        "width": 320,
        "height": 332,
        "content": "## Success Summary\n\nCalculates and formats execution success metrics.\n\n**What it does:**\n- Counts total tickets processed\n- Captures execution timestamp\n- Records workflow and execution IDs\n- Creates "
      }
    },
    {
      "id": "4ee4440b-c840-4b6f-bece-1de4273cf79f",
      "name": "Execution Log Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        2880
      ],
      "parameters": {
        "width": 320,
        "height": 460,
        "content": "## Execution Log Sheet\n\nLogs ALL successful workflow executions.\n\n**Logged Data:**\n- Timestamp\n- Workflow Name\n- Execution ID\n- Status (SUCCESS)\n- Number of tickets processed\n- Success message\n\n**Use "
      }
    },
    {
      "id": "6f884973-d34f-4fac-b31b-dbead40cf933",
      "name": "Workflow Description1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2160,
        1600
      ],
      "parameters": {
        "width": 526,
        "height": 336,
        "content": "## Workflow Purpose\n\nThis workflow automatically updates a Google Sheets knowledge base with Zendesk tickets that have the \"howto\" tag.\n\n**Flow Overview:**\n1. Fetches all tickets from Zendesk\n2. Filte"
      }
    },
    {
      "id": "c821dc37-e8cc-4e0f-b37c-284041f38fcc",
      "name": "Trigger Instructions1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        1360
      ],
      "parameters": {
        "width": 320,
        "height": 296,
        "content": "## Manual Trigger\n\nClick the 'Execute Workflow' button to run this automation manually.\n\n**When to use:**\n- Testing the workflow\n- One-time data sync\n- Troubleshooting\n\n**Note:** You can also set this"
      }
    },
    {
      "id": "b62bdc8f-683f-4025-9659-08e3f678a5dd",
      "name": "Zendesk Fetch Details1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1440,
        1904
      ],
      "parameters": {
        "width": 320,
        "height": 312,
        "content": "## Zendesk Integration\n\nFetches ALL tickets from your Zendesk instance.\n\n**What it does:**\n- Connects to Zendesk using API credentials\n- Retrieves all available tickets\n- Passes ticket data to next st"
      }
    },
    {
      "id": "1e144223-9445-4c91-8355-7a1b734b3539",
      "name": "Filter Explanation1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1200,
        1376
      ],
      "parameters": {
        "width": 320,
        "height": 296,
        "content": "## Filtering Logic\n\nOnly processes tickets with the \"howto\" tag.\n\n**Filter Condition:**\n- Checks if first tag equals \"howto\"\n- Case sensitive matching\n- Only matching tickets proceed to next step\n\n**T"
      }
    },
    {
      "id": "672f5275-a2ac-4025-b125-d12e969e7186",
      "name": "User Details Purpose1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -976,
        1888
      ],
      "parameters": {
        "width": 320,
        "height": 296,
        "content": "## User Details Enrichment\n\nGets detailed information about the person who created each ticket.\n\n**Retrieved Data:**\n- User name\n- Email address\n- Other user profile information\n\n**Why needed:** The i"
      }
    },
    {
      "id": "e88abaf3-a1b1-4fc7-a5cd-b17ada33241f",
      "name": "Sheets Update Logic1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -768,
        1280
      ],
      "parameters": {
        "width": 320,
        "height": 384,
        "content": "## Google Sheets Update\n\nSaves or updates ticket information in your knowledge base spreadsheet.\n\n**Data Saved:**\n- Ticket Number\n- Description\n- Status\n- Tag\n- Owner Name\n- Email\n\n**Smart Update:** U"
      }
    },
    {
      "id": "d031d1a6-f10b-45f4-9f12-e57894161b76",
      "name": "Error Handling Documentation1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        1280
      ],
      "parameters": {
        "width": 400,
        "height": 400,
        "content": "## 🚨 Error Handling & Logging\n\n**Production Features Added:**\n\n1. **Error Trigger:** Catches all workflow errors automatically\n\n2. **Error Logger:** Logs detailed error info to Google Sheets:\n   - Tim"
      }
    },
    {
      "id": "01f922f2-c854-4550-98d8-02d00d331e23",
      "name": "Filter HowTo Tickets Only1",
      "type": "n8n-nodes-base.if",
      "position": [
        -1088,
        1712
      ]
    },
    {
      "id": "767d5d14-50c1-4b0b-b851-0f4ddee830ae",
      "name": "Get Requester User Info1",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        -864,
        1712
      ]
    },
    {
      "id": "f04ef795-df09-4f97-9ecb-ab19679f6219",
      "name": "Update Knowledge Base Sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -640,
        1712
      ]
    },
    {
      "id": "b5adbd34-2c67-4226-aa0a-10cb8f18b97f",
      "name": "Fetch All Zendesk Tickets1",
      "type": "n8n-nodes-base.zendesk",
      "position": [
        -1312,
        1712
      ]
    },
    {
      "id": "641b189d-d542-4c82-8dca-3e72d1bb1152",
      "name": "Format Error Details1",
      "type": "n8n-nodes-base.code",
      "position": [
        -1056,
        2448
      ]
    },
    {
      "id": "fd059320-ee35-47fc-bb65-3c7e9d907c95",
      "name": "Log Error to Sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -784,
        2448
      ]
    },
    {
      "id": "9ab36aa6-753b-48ff-8aae-102f0daea66b",
      "name": "Send Error Notification1",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -512,
        2448
      ]
    },
    {
      "id": "ffaa5350-2709-44de-b6eb-d3554053d164",
      "name": "Success Summary1",
      "type": "n8n-nodes-base.code",
      "position": [
        -416,
        1712
      ]
    },
    {
      "id": "3ca07889-3c23-42bf-9ef0-7f6241b8c6c4",
      "name": "Log Successful Execution1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -192,
        1712
      ]
    }
  ],
  "connections": {
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Format Error Details1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Success Summary1": {
      "main": [
        [
          {
            "node": "Log Successful Execution1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Error to Sheet1": {
      "main": [
        [
          {
            "node": "Send Error Notification1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Error Details1": {
      "main": [
        [
          {
            "node": "Log Error to Sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Requester User Info1": {
      "main": [
        [
          {
            "node": "Update Knowledge Base Sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All Zendesk Tickets1": {
      "main": [
        [
          {
            "node": "Filter HowTo Tickets Only1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter HowTo Tickets Only1": {
      "main": [
        [
          {
            "node": "Get Requester User Info1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update Knowledge Base Sheet1": {
      "main": [
        [
          {
            "node": "Success Summary1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Fetch All Zendesk Tickets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}