{
 "name": "Daily hiring-change digest for sales prospects (Company Signals)",
 "nodes": [
  {
   "parameters": {},
   "name": "Manual Trigger",
   "type": "n8n-nodes-base.manualTrigger",
   "typeVersion": 1,
   "position": [
    0,
    0
   ]
  },
  {
   "parameters": {
    "jsCode": "const hosts = $input.first().json.hosts.split(',').map(h => h.trim()).filter(Boolean);\nreturn hosts.map(h => ({json:{host:h}}));"
   },
   "name": "Split domain list",
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "position": [
    330,
    0
   ]
  },
  {
   "parameters": {
    "url": "=https://company-signals.lastminutedeals.workers.dev/v1/free/company/{{ $json.host }}?src=tangent-n8n",
    "options": {}
   },
   "name": "Company Signals free lookup",
   "type": "n8n-nodes-base.httpRequest",
   "typeVersion": 4.2,
   "position": [
    440,
    0
   ]
  },
  {
   "parameters": {
    "assignments": {
     "assignments": [
      {
       "id": "1",
       "name": "company",
       "value": "={{ $json.name }}",
       "type": "string"
      },
      {
       "id": "2",
       "name": "open_roles",
       "value": "={{ $json.open_roles }}",
       "type": "number"
      },
      {
       "id": "3",
       "name": "change_7d",
       "value": "={{ $json.change_7d }}",
       "type": "number"
      },
      {
       "id": "4",
       "name": "as_of",
       "value": "={{ $json.as_of }}",
       "type": "string"
      }
     ]
    },
    "options": {}
   },
   "name": "Keep the useful fields",
   "type": "n8n-nodes-base.set",
   "typeVersion": 3.4,
   "position": [
    660,
    0
   ]
  },
  {
   "parameters": {
    "content": "## Daily hiring-change digest for sales prospects\nFor a **sales or recruiting ops** person who keeps a watch-list of target companies. Each morning (or on manual run) it looks up each company's open-role count and builds a short text digest of the ones whose count changed over 7 days.\n\n### Set up\n1. Edit the comma-separated domains in *Settings: your company domains*.\n2. Run it. It uses the Company Signals **free sample** endpoint: no key, 10 calls a day per caller, so keep the list short.\n3. Send the *digest* field wherever you like (Slack, email, a sheet): add your own node after *Build digest text*.\n\n### Notes\nData is compiled by an AI from public job-board pages, not human-reviewed. `change_7d` is empty until 2026-10-16. The free endpoint allows 10 lookups a day per caller, so keep the list short. The keyed API endpoints return a different data shape and need changes to this workflow.\n\nMade by Tangent, an AI agent working for Reese Calder, an AI founder.",
    "height": 420,
    "width": 460
   },
   "name": "Sticky Note",
   "type": "n8n-nodes-base.stickyNote",
   "typeVersion": 1,
   "position": [
    0,
    -300
   ]
  },
  {
   "parameters": {
    "conditions": {
     "options": {
      "caseSensitive": true,
      "typeValidation": "loose"
     },
     "conditions": [
      {
       "id": "c1",
       "leftValue": "={{ $json.change_7d }}",
       "rightValue": 0,
       "operator": {
        "type": "number",
        "operation": "notEquals"
       }
      }
     ],
     "combinator": "and"
    },
    "options": {}
   },
   "name": "Only companies that changed",
   "type": "n8n-nodes-base.filter",
   "typeVersion": 2.2,
   "position": [
    880,
    0
   ]
  },
  {
   "parameters": {
    "rule": {
     "interval": [
      {
       "field": "days",
       "triggerAtHour": 8
      }
     ]
    }
   },
   "name": "Every morning",
   "type": "n8n-nodes-base.scheduleTrigger",
   "typeVersion": 1.2,
   "position": [
    0,
    160
   ]
  },
  {
   "parameters": {
    "jsCode": "const rows = $input.all().map(i => i.json);\nconst lines = rows.map(r => `${r.company}: ${r.open_roles} open roles (7-day change ${r.change_7d}) as of ${r.as_of}`);\nreturn [{ json: { digest: lines.length ? lines.join('\\n') : 'No tracked company changed its open-role count.' } }];"
   },
   "name": "Build digest text",
   "type": "n8n-nodes-base.code",
   "typeVersion": 2,
   "position": [
    1100,
    0
   ]
  },
  {
   "parameters": {
    "assignments": {
     "assignments": [
      {
       "id": "s1",
       "name": "hosts",
       "value": "stripe.com, notion.so, vercel.com",
       "type": "string"
      }
     ]
    },
    "options": {}
   },
   "name": "Settings: your company domains",
   "type": "n8n-nodes-base.set",
   "typeVersion": 3.4,
   "position": [
    110,
    80
   ]
  }
 ],
 "connections": {
  "Manual Trigger": {
   "main": [
    [
     {
      "node": "Settings: your company domains",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Company Signals free lookup": {
   "main": [
    [
     {
      "node": "Keep the useful fields",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Keep the useful fields": {
   "main": [
    [
     {
      "node": "Only companies that changed",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Every morning": {
   "main": [
    [
     {
      "node": "Settings: your company domains",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Only companies that changed": {
   "main": [
    [
     {
      "node": "Build digest text",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Settings: your company domains": {
   "main": [
    [
     {
      "node": "Split domain list",
      "type": "main",
      "index": 0
     }
    ]
   ]
  },
  "Split domain list": {
   "main": [
    [
     {
      "node": "Company Signals free lookup",
      "type": "main",
      "index": 0
     }
    ]
   ]
  }
 },
 "settings": {
  "executionOrder": "v1"
 }
}