{
  "name": "Monitor deal risk from HubSpot and Gmail with GPT-4.1 mini and Slack alerts",
  "nodes": [
    {
      "id": "47ffdee8-a732-4ff4-abcb-9e16afe68808",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -720,
        96
      ]
    },
    {
      "id": "2be3ab96-67b1-4337-8ea6-54363086a9b6",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -448,
        80
      ]
    },
    {
      "id": "28df8168-37cd-4a7a-a9d8-6be16e0572ad",
      "name": "Get CRM Deals",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -128,
        0
      ]
    },
    {
      "id": "3f46b5c0-c042-4692-9030-d84ce962b793",
      "name": "Get Recent Emails",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -112,
        160
      ]
    },
    {
      "id": "fdae90e9-9160-4406-bc90-5430468e8629",
      "name": "Combine Deal Context",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        224,
        96
      ]
    },
    {
      "id": "34df3c97-c784-44b1-8823-1244d3192472",
      "name": "AI Deal Intelligence Analyzer",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        496,
        96
      ]
    },
    {
      "id": "730d3bfb-292b-4139-919f-8b847931775a",
      "name": "Deal Intelligence Schema",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        592,
        320
      ]
    },
    {
      "id": "93eec037-307f-427f-870e-3f3282b221a0",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        464,
        320
      ]
    },
    {
      "id": "bb93d87c-4dc7-4f85-993b-e5060cb851ae",
      "name": "Prepare CRM Update",
      "type": "n8n-nodes-base.set",
      "position": [
        896,
        96
      ]
    },
    {
      "id": "ef2feb84-cc9b-4bc4-922c-07466c8f4b7a",
      "name": "Update CRM Deal",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1072,
        96
      ]
    },
    {
      "id": "aa519aa8-e5c2-41ca-8a2c-ab79e2f9f547",
      "name": "Check Deal Risk",
      "type": "n8n-nodes-base.if",
      "position": [
        1360,
        96
      ]
    },
    {
      "id": "a7c86138-2700-426e-b033-fc4ae716a9e7",
      "name": "Alert Sales Manager",
      "type": "n8n-nodes-base.slack",
      "position": [
        1584,
        80
      ]
    },
    {
      "id": "3dd4d2ac-d4ec-41c3-b781-5274f91c86e8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -48
      ],
      "parameters": {
        "width": 192,
        "height": 320,
        "content": "## Trigger\nRuns daily to start deal monitoring workflow."
      }
    },
    {
      "id": "7a70759d-3b17-4f6b-b405-8ab8e06a4807",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        -80
      ],
      "parameters": {
        "width": 272,
        "height": 384,
        "content": "## Configuration\nDefines deal filters, email lookback window, and risk threshold."
      }
    },
    {
      "id": "ce921a55-6a3b-4d3e-8323-c18650372fc2",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        144,
        -128
      ],
      "parameters": {
        "width": null,
        "height": 464,
        "content": "## Context Merge\nCombines deal data and emails into a single dataset for analysis."
      }
    },
    {
      "id": "a15c8bf2-7438-498f-87dc-b26c636b0241",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -32
      ],
      "parameters": {
        "width": 384,
        "height": 320,
        "content": "## AI Analysis\nAI detects objections, next steps, and calculates deal risk score."
      }
    },
    {
      "id": "4fd7b96f-98aa-4b4f-b02b-f16cf3e6d865",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        848,
        -32
      ],
      "parameters": {
        "width": 352,
        "height": 320,
        "content": "## Data Preparation and update \nFormats AI output for updating CRM fields  and Writes risk insights, objections, and next steps back to CRM."
      }
    },
    {
      "id": "8eabfa89-9b6b-46a2-ab1b-80d2a0d17c12",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1296,
        -48
      ],
      "parameters": {
        "width": 432,
        "height": 320,
        "content": "## Risk Check and Alerting\nCompares deal risk score against defined threshold and Sends Slack alert for high-risk deals needing attention."
      }
    },
    {
      "id": "7a25e630-a30c-49e6-997e-498d15dc590c",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -256
      ],
      "parameters": {
        "width": 416,
        "height": 624,
        "content": "## How it works\nThis workflow monitors your CRM deals and flags risky ones automatically.\n\nIt runs on a schedule and pulls active deals from your CRM along with recent email conversations. The data is"
      }
    },
    {
      "id": "0012628c-9d13-4cb3-a90a-2fae48f9686b",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -208,
        -144
      ],
      "parameters": {
        "width": 304,
        "height": 464,
        "content": "## Data Collection\nFetches CRM deals and recent email activity for context."
      }
    }
  ],
  "connections": {
    "Get CRM Deals": {
      "main": [
        [
          {
            "node": "Combine Deal Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Deal Risk": {
      "main": [
        [
          {
            "node": "Alert Sales Manager",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update CRM Deal": {
      "main": [
        [
          {
            "node": "Check Deal Risk",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Recent Emails": {
      "main": [
        [
          {
            "node": "Combine Deal Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Deal Intelligence Analyzer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Prepare CRM Update": {
      "main": [
        [
          {
            "node": "Update CRM Deal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Deal Context": {
      "main": [
        [
          {
            "node": "AI Deal Intelligence Analyzer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Get CRM Deals",
            "type": "main",
            "index": 0
          },
          {
            "node": "Get Recent Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Deal Intelligence Schema": {
      "ai_outputParser": [
        [
          {
            "node": "AI Deal Intelligence Analyzer",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "AI Deal Intelligence Analyzer": {
      "main": [
        [
          {
            "node": "Prepare CRM Update",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}