{
 "name": "RecipeAgents: Tag why deals were lost",
 "nodes": [
  {
   "parameters": {
    "httpMethod": "POST",
    "path": "26339238-0fb3-4506-a062-ffa733d0aca2",
    "options": {}
   },
   "id": "549f0769-72be-42e5-b5a8-7e0a6f1f73fb",
   "name": "Webhook",
   "type": "n8n-nodes-base.webhook",
   "typeVersion": 2,
   "position": [
    240,
    300
   ]
  },
  {
   "parameters": {
    "modelId": {
     "__rl": true,
     "value": "gpt-4o-mini",
     "mode": "list",
     "cachedResultName": "GPT-4O-MINI"
    },
    "messages": {
     "values": [
      {
       "content": "=Classify why this deal was lost into exactly one of: PRICE, TIMING, COMPETITOR, NO_DECISION, FIT, UNKNOWN. Return JSON {category, quote} where quote is the phrase from the notes that supports it. Notes: {{ JSON.stringify($json) }}"
      }
     ]
    },
    "jsonOutput": true,
    "options": {}
   },
   "id": "71462959-90b7-43a7-8d41-f934b8b2512c",
   "name": "AI step",
   "type": "@n8n/n8n-nodes-langchain.openAi",
   "typeVersion": 1.8,
   "position": [
    500,
    300
   ]
  },
  {
   "parameters": {
    "operation": "append",
    "documentId": {
     "__rl": true,
     "value": "",
     "mode": "list"
    },
    "sheetName": {
     "__rl": true,
     "value": "",
     "mode": "list"
    },
    "columns": {
     "mappingMode": "autoMapInputData",
     "value": {}
    },
    "options": {}
   },
   "id": "20e2d34c-bc58-4ad7-a9f2-05453a432c1d",
   "name": "Append to Sheet",
   "type": "n8n-nodes-base.googleSheets",
   "typeVersion": 4.5,
   "position": [
    760,
    300
   ]
  },
  {
   "parameters": {
    "content": "## Tag why deals were lost\nFrom recipeagents.usestarbase.com/recipes/lost-deal-reason-tagger\n\n1. Connect credentials on each node (Google, OpenAI, Slack).\n2. Pick your sheet/folder/channel and model.\n3. Run once with test data and check the output before activating.\nKeep a human check on anything customer-facing.",
    "height": 260,
    "width": 420
   },
   "id": "c25ad2c1-af59-4b6f-8163-f241f51e4eb3",
   "name": "Read me",
   "type": "n8n-nodes-base.stickyNote",
   "typeVersion": 1,
   "position": [
    200,
    20
   ]
  }
 ],
 "connections": {
  "Webhook": {
   "main": [
    [
     {
      "node": "AI step",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "AI step": {
   "main": [
    [
     {
      "node": "Append to Sheet",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "pinData": {},
 "active": false,
 "settings": {
  "executionOrder": "v1"
 },
 "meta": {
  "templateCredsSetupCompleted": false
 },
 "tags": []
}