{
  "id": "dcvRJhH1gqWvdOil",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Deal Stage to ClickUp Automation",
  "tags": [],
  "nodes": [
    {
      "id": "fc8d283a-0c59-4315-a875-fe190e729057",
      "name": "When clicking \u2018Execute workflow\u2019",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1088,
        2128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "15f21c70-c466-4a88-99ac-4c3571e3bd4e",
      "name": "Sticky Note - Workflow Start",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1328,
        1824
      ],
      "parameters": {
        "color": 4,
        "width": 343.1718789342567,
        "height": 267.8540989603057,
        "content": "## \ud83d\ude80 WORKFLOW START\n\n**Manual trigger workflow**\n\nClick \"Execute Workflow\" button to run this automation on-demand.\n\nUseful for:\n- Testing the workflow\n- One-time bulk processing\n- Manual syncing deals to ClickUp"
      },
      "typeVersion": 1
    },
    {
      "id": "b410d7c1-f064-4a2b-bfad-067bd7158ef4",
      "name": "Sticky Note - Fetch Deals",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1008,
        2272
      ],
      "parameters": {
        "color": 5,
        "width": 343.1718789342567,
        "height": 307.8540989603057,
        "content": "## \ud83d\udccb FETCH ALL DEALS\n\n**API Endpoint:** GET /opportunities\n**HighLevel API:** opportunities.getAll\n\n**Retrieves all opportunities from HighLevel CRM:**\n- Gets complete deal list\n- Includes all deal stages\n- Fetches contact information\n- Returns full deal details\n\nThis pulls every opportunity to check for recent updates."
      },
      "typeVersion": 1
    },
    {
      "id": "539ebacc-e034-4029-9031-44763a38adef",
      "name": "Sticky Note - Date Filter",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -864,
        1760
      ],
      "parameters": {
        "color": 6,
        "width": 343.1718789342567,
        "height": 347.8540989603057,
        "content": "## \u23f1\ufe0f DATE FILTER\n\n**Checks if deal was updated recently:**\n\n\u2705 **TRUE Branch** (Recent updates)\n- Deal changed on/after Sept 30, 2025\n- Proceeds to get contact & create task\n\n\u274c **FALSE Branch** (Old updates)\n- Deal changed before Sept 30, 2025\n- Sends Slack notification about old update\n\nSplits workflow based on update date."
      },
      "typeVersion": 1
    },
    {
      "id": "79e5b4ef-9304-4b9c-9302-1fa67e5b34b2",
      "name": "Sticky Note - Get Contact",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        1696
      ],
      "parameters": {
        "color": 7,
        "width": 343.1718789342567,
        "height": 307.8540989603057,
        "content": "## \ud83d\udc64 GET CONTACT INFO\n\n**API Endpoint:** GET /contacts/{contactId}\n**HighLevel API:** contacts.get\n\n**Fetches full contact details:**\n- Uses contactId from deal\n- Retrieves contact name\n- Gets location information\n- Pulls all contact fields\n\nNeeded to create detailed ClickUp tasks with contact context."
      },
      "typeVersion": 1
    },
    {
      "id": "531e093f-0e5c-483e-a0c7-dedd661f5c65",
      "name": "Sticky Note - Create Task",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        1936
      ],
      "parameters": {
        "color": 2,
        "width": 343.1718789342567,
        "height": 327.8540989603057,
        "content": "## \u2705 CREATE CLICKUP TASK\n\n**API:** ClickUp Tasks API\n\n**Generates task in ClickUp:**\n- Task name includes contact name\n- Shows location ID\n- Notes \"Changed Status recently\"\n- Added to specified list\n\n**This is the main output** - creates actionable task for team to follow up.\n\n**WORKFLOW END** \u2705"
      },
      "typeVersion": 1
    },
    {
      "id": "601e856c-446b-4682-8679-72d1ed1e78f1",
      "name": "Sticky Note - Slack Alert",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        2384
      ],
      "parameters": {
        "width": 343.1718789342567,
        "height": 347.8540989603057,
        "content": "## \ud83d\udcac SLACK ALERT (OLD DEALS)\n\n**Sends notification for outdated deals:**\n- Triggered when deal update is before Sept 30\n- Messages the n8n_workspace user\n- Includes lead ID\n- Alerts: \"lead updated earlier\"\n\nHelps identify deals that need attention but aren't recent.\n\n**ALTERNATIVE WORKFLOW END** \u26a0\ufe0f"
      },
      "typeVersion": 1
    },
    {
      "id": "67e4e0fa-53a8-416e-9f06-d5f43f50d515",
      "name": "Fetch All Deals from CRM1",
      "type": "n8n-nodes-base.highLevel",
      "position": [
        -864,
        2128
      ],
      "parameters": {
        "filters": {},
        "resource": "opportunity",
        "operation": "getAll",
        "returnAll": true,
        "requestOptions": {}
      },
      "credentials": {
        "highLevelOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "d21611b1-e30b-4b68-818d-9449ded35c0d",
      "name": "Filter Recent Deal Updates1",
      "type": "n8n-nodes-base.if",
      "position": [
        -640,
        2128
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1123ce6f-91c6-487b-adbe-578f0004a1c2",
              "operator": {
                "type": "dateTime",
                "operation": "afterOrEquals"
              },
              "leftValue": "={{ $json.lastStatusChangeAt }}",
              "rightValue": "2025-09-30T00:00:00"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "dd1d9f33-50f4-46a6-959f-469ff7a58ef9",
      "name": "Get Contact Details1",
      "type": "n8n-nodes-base.highLevel",
      "position": [
        -416,
        2032
      ],
      "parameters": {
        "contactId": "={{ $json.contactId }}",
        "operation": "get",
        "requestOptions": {}
      },
      "credentials": {
        "highLevelOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "3cd0ef65-2d04-456b-ac9f-8ad715ca5804",
      "name": "Create ClickUp Task1",
      "type": "n8n-nodes-base.clickUp",
      "position": [
        -192,
        2032
      ],
      "parameters": {
        "list": "901611225384",
        "name": "=Contact: {{ $json.fullNameLowerCase }} \nLocation id:{{ $json.locationId }}\nChanged Status recently",
        "team": "90161261705",
        "space": "90165174252",
        "folderless": true,
        "additionalFields": {}
      },
      "credentials": {
        "clickUpApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "2193d512-4f3d-4fd1-a589-991a54c6a569",
      "name": "Notify Old Deal Update1",
      "type": "n8n-nodes-base.slack",
      "position": [
        -416,
        2224
      ],
      "parameters": {
        "text": "=Hi, your lead ID: {{ $json.id }} was updated before the cutoff date",
        "user": {
          "__rl": true,
          "mode": "list",
          "value": "U09E375JZPA",
          "cachedResultName": "n8n_workspace"
        },
        "select": "user",
        "otherOptions": {}
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "71824ca2-c846-4794-be61-8dbc0991c6b7",
  "connections": {
    "Get Contact Details1": {
      "main": [
        [
          {
            "node": "Create ClickUp Task1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch All Deals from CRM1": {
      "main": [
        [
          {
            "node": "Filter Recent Deal Updates1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter Recent Deal Updates1": {
      "main": [
        [
          {
            "node": "Get Contact Details1",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify Old Deal Update1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Execute workflow\u2019": {
      "main": [
        [
          {
            "node": "Fetch All Deals from CRM1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}