{
  "name": "Send AI revenue forecast alerts from HubSpot via Gmail, Slack and Sheets",
  "nodes": [
    {
      "id": "8ac7bc5d-c409-44b2-8176-24ecbd2ae969",
      "name": "Groq Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGroq",
      "position": [
        18496,
        6112
      ]
    },
    {
      "id": "f6b4adc7-0709-4058-8ff6-9107ccfbef6b",
      "name": "Send a message2",
      "type": "n8n-nodes-base.gmail",
      "position": [
        19088,
        5856
      ]
    },
    {
      "id": "911581aa-7453-44ca-b5c6-db1a6ce8efd7",
      "name": "Send a message3",
      "type": "n8n-nodes-base.slack",
      "position": [
        19088,
        6064
      ]
    },
    {
      "id": "5bcf9c46-80b9-4c46-999e-ab02c2743f9b",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        18352,
        5936
      ]
    },
    {
      "id": "08c06ca5-dfaf-4b10-ae33-df0fb3e2cc6d",
      "name": "Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        19472,
        6048
      ]
    },
    {
      "id": "ed54b5d9-678f-4a17-8b56-d96cc7dda6f8",
      "name": "Format AI response1",
      "type": "n8n-nodes-base.code",
      "position": [
        18864,
        5952
      ]
    },
    {
      "id": "75c2b1e5-d2c2-4867-93e7-41d81f3db16a",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        19248,
        5952
      ]
    },
    {
      "id": "ad3b35be-95a2-4fa5-813a-62910b68b002",
      "name": "HubSpot Trigger1",
      "type": "n8n-nodes-base.hubspotTrigger",
      "position": [
        17808,
        5936
      ]
    },
    {
      "id": "9686ae09-74f9-4f99-b92a-457b83f1cfaa",
      "name": "Get many deals1",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        17984,
        5936
      ]
    },
    {
      "id": "fe6d16bc-d256-4c3f-9945-7be037564dda",
      "name": "Format Hubspot Data1",
      "type": "n8n-nodes-base.code",
      "position": [
        18160,
        5936
      ]
    },
    {
      "id": "4da571ca-aae7-4c74-b2a4-b19bf50da20a",
      "name": "AI Revenue Forecast & Risk Analysis1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        18560,
        5952
      ]
    },
    {
      "id": "cdf2afe5-3f49-4c3f-a508-ee0570f81a18",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        17136,
        5648
      ],
      "parameters": {
        "width": 640,
        "height": 688,
        "content": "## AI Revenue Forecast Generator\n\nThis workflow automatically generates an AI-powered revenue forecast whenever a new deal is created in HubSpot. It analyzes the entire sales pipeline to estimate expe"
      }
    },
    {
      "id": "d1c68d2b-7f47-4d6c-a8ce-81381ecd368b",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        17792,
        5648
      ],
      "parameters": {
        "width": 688,
        "height": 688,
        "content": "## Step 1 – Collect & prepare HubSpot deals  \nTriggers on deal creation, fetches all active deals, and formats key fields for AI analysis.\n"
      }
    },
    {
      "id": "73e70ef7-057a-45dc-9ce1-27986c76a405",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        18496,
        5648
      ],
      "parameters": {
        "width": 1136,
        "height": 688,
        "content": "## Step 2 – Generate & distribute AI forecast  \nAI generates revenue forecasts and risk insights, sends them to Slack and Email, and logs them in Google Sheets."
      }
    }
  ],
  "connections": {
    "Wait1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many deals1": {
      "main": [
        [
          {
            "node": "Format Hubspot Data1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Groq Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "AI Revenue Forecast & Risk Analysis1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot Trigger1": {
      "main": [
        [
          {
            "node": "Get many deals1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [],
        [
          {
            "node": "AI Revenue Forecast & Risk Analysis1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format AI response1": {
      "main": [
        [
          {
            "node": "Send a message2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Append row in sheet",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send a message3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Hubspot Data1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Revenue Forecast & Risk Analysis1": {
      "main": [
        [
          {
            "node": "Format AI response1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}