{
  "name": "SynapsAI — CSAT radar (low ratings → Slack)",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 1
            }
          ]
        }
      },
      "id": "e1144541-b2e8-5b8c-83c3-6c4f8b925de7",
      "name": "Every hour",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "resource": "conversation",
        "operation": "getAll",
        "filters": {
          "csatMin": 1,
          "csatMax": 2,
          "from": "={{ $now.minus({ hours: 1 }).toISO() }}"
        },
        "returnAll": true
      },
      "id": "cd31983d-26ac-5e2f-9d6b-bd0ce796df3e",
      "name": "Low CSAT conversations",
      "type": "n8n-nodes-synapsai.synapsAi",
      "typeVersion": 1,
      "position": [
        260,
        0
      ],
      "credentials": {
        "synapsAiApi": {
          "id": "",
          "name": "SynapsAI API"
        }
      }
    },
    {
      "parameters": {
        "resource": "conversation",
        "operation": "get",
        "conversationId": "={{ $json.chatId }}"
      },
      "id": "9cf9ce92-ddc2-5c1a-86d4-8e881b9c4654",
      "name": "Read the rating",
      "type": "n8n-nodes-synapsai.synapsAi",
      "typeVersion": 1,
      "position": [
        520,
        0
      ],
      "credentials": {
        "synapsAiApi": {
          "id": "",
          "name": "SynapsAI API"
        }
      }
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "#cx-alerts"
        },
        "text": "=⚠️ CSAT {{ $json.csat.score }} — {{ $json.csat.feedback || 'no comment' }} — {{ $json.contactDisplayName || 'a customer' }} — conversation {{ $json.chatId }}",
        "otherOptions": {}
      },
      "id": "b3da23ea-500d-5e95-a234-d580efbee23b",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        780,
        0
      ]
    }
  ],
  "connections": {
    "Every hour": {
      "main": [
        [
          {
            "node": "Low CSAT conversations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Low CSAT conversations": {
      "main": [
        [
          {
            "node": "Read the rating",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read the rating": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false,
    "description": "Every hour, conversations rated 1–2 in the last hour are posted to a Slack channel.",
    "requires": "n8n-nodes-synapsai >= 0.1.0; SynapsAI GROWTH+"
  },
  "pinData": {},
  "tags": []
}