{
  "name": "Re-engage stalled HubSpot deals with GPT-5-mini, Gmail, and Slack",
  "nodes": [
    {
      "id": "3377d1a8-776c-4cf5-aae0-c899eaf2289f",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        112,
        864
      ]
    },
    {
      "id": "8aff285b-90dd-4532-aa51-49c4fa34fb00",
      "name": "HubSpot: Get Associations",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        992,
        864
      ]
    },
    {
      "id": "194c69ab-a676-4130-889b-38eda4299015",
      "name": "HubSpot: Get Email",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1440,
        864
      ]
    },
    {
      "id": "ad8bc677-9ce2-430a-87ba-b2d0d9c4141b",
      "name": "AI: Generate Email",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1984,
        864
      ]
    },
    {
      "id": "dcfc5002-faff-4ef3-9cfc-8ae6ccd35521",
      "name": "Model: GPT-5-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1984,
        1088
      ]
    },
    {
      "id": "2a3b79d8-f278-498b-8b5a-1cdc583a680a",
      "name": "Parser: Email Structure",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2128,
        1088
      ]
    },
    {
      "id": "e347d306-a5d8-4ad9-911b-1c5ab0555783",
      "name": "Slack: Notify CSM",
      "type": "n8n-nodes-base.slack",
      "position": [
        2464,
        864
      ]
    },
    {
      "id": "0170b296-387e-44ae-9c69-c179449d1077",
      "name": "Gmail: Send Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2688,
        864
      ]
    },
    {
      "id": "a26569b6-7a74-4d76-919e-1968d80e85a0",
      "name": "Config: Setup Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        864
      ]
    },
    {
      "id": "6a974580-fcd2-4358-9f1b-d7da41a9c640",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        64
      ],
      "parameters": {
        "width": 592,
        "height": 352,
        "content": "# Automate Stalled HubSpot Deals\n\nDaily check for deals stalled in the **\"Contract Sent\"** stage, sending an AI re-engagement email to the primary contact.\n\n## Setup\n1. **Credentials**: Connect HubSpo"
      }
    },
    {
      "id": "5edca252-58c9-4ec6-b347-57ae132326d1",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        128,
        1264
      ],
      "parameters": {
        "width": 368,
        "height": 212,
        "content": "## Contact me\n- If you need any modification to this workflow\n- if you need some help with this workflow\n- Or if you need any workflow in n8n, Make, or Langchain / Langgraph\n\nWrite to me: [thomas@poll"
      }
    },
    {
      "id": "596d8540-d81c-4467-b7dd-83a48ded4fb2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        496
      ],
      "parameters": {
        "width": 224,
        "height": 576,
        "content": "### Workflow Variables\n\nThis node holds all your user-specific settings. You must fill in these values for the AI prompt to work correctly:\n* `sender_name`\n* `company_name`\n* `calendar_link`"
      }
    },
    {
      "id": "62664f69-7c83-4959-8315-050f5a9a9843",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        496
      ],
      "parameters": {
        "width": 832,
        "height": 576,
        "content": "### Filter Logic\n\n1. **HubSpot: Get Associations**: Fetches the internal IDs of contacts linked to the deal.\n2. **Code: Get Primary Contact**: Programmatically selects the first associated contact to "
      }
    },
    {
      "id": "358e5b3e-ef61-4ece-b4e3-11b86e2c5a43",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        496
      ],
      "parameters": {
        "width": 416,
        "height": 576,
        "content": "### Search Stalled Deals\n\n* **HubSpot: Search Stalled Deals**: Retrieves all deals currently sitting in your targeted pipeline stage (currently set to **\"Contract Sent\"**).\n* **Metadata Extraction**: "
      }
    },
    {
      "id": "bc79839d-18a8-47c8-b6f1-98606b4f52d7",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1824,
        496
      ],
      "parameters": {
        "width": 560,
        "height": 736,
        "content": "### Generate AI Email\n\n* **AI: Generate Email**: The agent analyzes the contact details to write a professional, warm check-in.\n* **Parser**: Structures the LLM response into a Subject line and Email "
      }
    },
    {
      "id": "99919b62-010e-44ef-8747-7366f580591c",
      "name": "HubSpot: Log Email",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        2912,
        864
      ]
    },
    {
      "id": "bf819058-a0a4-4ec3-a474-4c2161b75d4e",
      "name": "Sticky Note Actions",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2416,
        496
      ],
      "parameters": {
        "width": 800,
        "height": 578,
        "content": "### Notify & Log\n\n* **Slack**: Alerts team.\n* **Gmail**: Sends HTML email.\n* **HubSpot: Log Email**: Logs to **Contact & Deal** timeline (Updates 'Last Contacted')."
      }
    },
    {
      "id": "e074db39-9704-479d-af49-dd964bd7328a",
      "name": "Code: Get Primary Contact",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        864
      ]
    },
    {
      "id": "3b23d351-e1a7-4d12-9b12-569bc3d229e5",
      "name": "Filter: Last Activity Check",
      "type": "n8n-nodes-base.if",
      "position": [
        1664,
        864
      ]
    },
    {
      "id": "098901b6-b513-4229-872d-3c39072471f0",
      "name": "HubSpot: Search Stalled Deals",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        672,
        864
      ]
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Config: Setup Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gmail: Send Email": {
      "main": [
        [
          {
            "node": "HubSpot: Log Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Model: GPT-5-mini": {
      "ai_languageModel": [
        [
          {
            "node": "AI: Generate Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Slack: Notify CSM": {
      "main": [
        [
          {
            "node": "Gmail: Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI: Generate Email": {
      "main": [
        [
          {
            "node": "Slack: Notify CSM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot: Get Email": {
      "main": [
        [
          {
            "node": "Filter: Last Activity Check",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Config: Setup Variables": {
      "main": [
        [
          {
            "node": "HubSpot: Search Stalled Deals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parser: Email Structure": {
      "ai_outputParser": [
        [
          {
            "node": "AI: Generate Email",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Code: Get Primary Contact": {
      "main": [
        [
          {
            "node": "HubSpot: Get Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot: Get Associations": {
      "main": [
        [
          {
            "node": "Code: Get Primary Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter: Last Activity Check": {
      "main": [
        [
          {
            "node": "AI: Generate Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot: Search Stalled Deals": {
      "main": [
        [
          {
            "node": "HubSpot: Get Associations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}