{
  "name": "Sentience Growth - Email Triage Starter",
  "nodes": [
    {
      "parameters": {},
      "id": "manual-trigger",
      "name": "Run sample triage",
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [-760, 0]
    },
    {
      "parameters": {
        "content": "Starter workflow only. Add your Gmail or IMAP credentials, choose the inbox/label to review, and connect your preferred AI model before using this with live customer email.",
        "height": 180,
        "width": 320
      },
      "id": "setup-note",
      "name": "Setup note",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-760, -260]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "sample-subject",
              "name": "subject",
              "type": "string",
              "value": "New customer question about estimate timing"
            },
            {
              "id": "sample-body",
              "name": "body",
              "type": "string",
              "value": "Hi, can someone confirm whether the estimate is still happening this week? We have a deadline on Friday."
            },
            {
              "id": "sample-from",
              "name": "from",
              "type": "string",
              "value": "customer@example.com"
            }
          ]
        },
        "options": {}
      },
      "id": "sample-email",
      "name": "Sample email",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [-520, 0]
    },
    {
      "parameters": {
        "jsCode": "const subject = $json.subject || '';\nconst body = $json.body || '';\nconst text = `${subject} ${body}`.toLowerCase();\nlet priority = 'normal';\nif (text.includes('deadline') || text.includes('urgent') || text.includes('today')) priority = 'high';\nif (text.includes('invoice') || text.includes('payment')) priority = 'finance';\nreturn [{ json: { ...$json, priority, summary: body.slice(0, 180), suggested_action: priority === 'high' ? 'Reply today and assign owner' : 'Review during next inbox block' } }];"
      },
      "id": "triage-logic",
      "name": "Score priority",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [-280, 0]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "output-note",
              "name": "next_setup_step",
              "type": "string",
              "value": "Replace the sample email with Gmail/IMAP search, then send high-priority items to Slack, email, Notion, or your task system."
            }
          ]
        },
        "options": {}
      },
      "id": "handoff-note",
      "name": "Handoff note",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [-40, 0]
    }
  ],
  "connections": {
    "Run sample triage": {
      "main": [[{ "node": "Sample email", "type": "main", "index": 0 }]]
    },
    "Sample email": {
      "main": [[{ "node": "Score priority", "type": "main", "index": 0 }]]
    },
    "Score priority": {
      "main": [[{ "node": "Handoff note", "type": "main", "index": 0 }]]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}
