{
  "name": "Signalloom: weekly hiring-surge alert to Slack (Hiring Signals)",
  "nodes": [
    {
      "parameters": {
        "content": "## Weekly hiring-surge alert\nEvery Monday 8:00: reads target account domains from Google Sheets (column **Domain**), runs **Hiring Signals** (signalloom/hiring-signals) once for the whole list, keeps companies whose hiring trend is surging or growing (or whose fastest-growing department matches your keyword), posts each one-line summary to Slack and logs it to a second sheet.\n\nSetup: connect Google Sheets, Apify (your own account) and Slack credentials; pick the sheets and channel; set KEYWORD in the Filter node.\n\nCost: $0.01 per company row. 200 accounts a week is about $8.60 a month.",
        "height": 300,
        "width": 420
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000001",
      "name": "About this workflow",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [-480, -120]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            { "field": "weeks", "weeksInterval": 1, "triggerAtDay": [1], "triggerAtHour": 8 }
          ]
        }
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000002",
      "name": "Every Monday 8:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [0, 0]
    },
    {
      "parameters": {
        "documentId": { "__rl": true, "value": "", "mode": "url" },
        "sheetName": { "__rl": true, "value": "Accounts", "mode": "name" },
        "options": {}
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000003",
      "name": "Read target accounts",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [220, 0]
    },
    {
      "parameters": {
        "jsCode": "// One Hiring Signals run for the whole list (column \"Domain\"; a company name or careers URL also works).\nconst companies = [...new Set($input.all().map((i) => String(i.json.Domain ?? '').trim()).filter(Boolean))];\nreturn [{ json: { companies } }];"
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000004",
      "name": "Collect domains",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [440, 0]
    },
    {
      "parameters": {
        "resource": "Actors",
        "operation": "Run actor and get dataset",
        "actorId": "signalloom~hiring-signals",
        "actorInputMode": "json",
        "customBody": "={{ JSON.stringify({ companies: $json.companies, mode: 'company', historyWeeks: 4 }) }}",
        "memory": 256
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000005",
      "name": "Hiring Signals",
      "type": "@apify/n8n-nodes-apify.apify",
      "typeVersion": 2,
      "position": [660, 0]
    },
    {
      "parameters": {
        "jsCode": "// Keep surging/growing companies, or ones whose fastest-growing department matches KEYWORD.\nconst KEYWORD = 'sales';\nreturn $input.all().filter((i) => !i.json.error && (['surging', 'growing'].includes(i.json.hiringTrend) || String(i.json.fastestGrowingDepartment ?? '').toLowerCase().includes(KEYWORD)));"
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000006",
      "name": "Filter: surging or growing",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [880, 0]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": { "__rl": true, "value": "", "mode": "name" },
        "text": "=:chart_with_upwards_trend: {{ $json.summary }}\nTop teams: {{ $json.topDepartmentsText }}\nBoard: {{ $json.boardUrl }}",
        "otherOptions": {}
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000007",
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [1100, -100]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": { "__rl": true, "value": "", "mode": "url" },
        "sheetName": { "__rl": true, "value": "Hiring log", "mode": "name" },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Date": "={{ $json.asOf }}",
            "Company": "={{ $json.companyName }}",
            "Domain": "={{ $json.domain ?? $json.input }}",
            "Open jobs": "={{ $json.openJobs }}",
            "Change 30d": "={{ $json.openJobsChange30d }}",
            "Trend": "={{ $json.hiringTrend }}",
            "Fastest-growing department": "={{ $json.fastestGrowingDepartment }}",
            "Summary": "={{ $json.summary }}"
          }
        },
        "options": {}
      },
      "id": "b1c7e0a0-0001-4f00-9000-000000000008",
      "name": "Log to sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [1100, 100]
    }
  ],
  "connections": {
    "Every Monday 8:00": { "main": [[{ "node": "Read target accounts", "type": "main", "index": 0 }]] },
    "Read target accounts": { "main": [[{ "node": "Collect domains", "type": "main", "index": 0 }]] },
    "Collect domains": { "main": [[{ "node": "Hiring Signals", "type": "main", "index": 0 }]] },
    "Hiring Signals": { "main": [[{ "node": "Filter: surging or growing", "type": "main", "index": 0 }]] },
    "Filter: surging or growing": { "main": [[{ "node": "Post to Slack", "type": "main", "index": 0 }, { "node": "Log to sheet", "type": "main", "index": 0 }]] }
  },
  "settings": { "executionOrder": "v1" },
  "meta": { "templateCredsSetupCompleted": false },
  "pinData": {}
}
