{
  "name": "Find, score and shortlist new candidates for an open role every Monday in Slack",
  "nodes": [
    {
      "name": "About this template",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "parameters": {
        "content": "## New candidates for an open role every Monday, scored and shortlisted in Slack\n\nEvery Monday morning this workflow searches SourceGeek for candidates who match your open role, saves them as a sheet in your workspace, scores each one against your job description and posts the top five, with the reason for each score, to Slack.\n\nEdit the **Role** node: the search in plain words, the job description to score against and the role's name.\n\nCredits: each week, one fast search plus a profile lookup and a score per saved candidate (20 by default).\n\n### Set up\n1. Install the community node **n8n-nodes-sourcegeek** (Settings → Community nodes).\n2. In SourceGeek, create an API key under Settings → Connected apps → API keys, and add it as a **SourceGeek API** credential. No account yet? [Start a free 14-day trial](https://chat.sourcegeek.com/sign-up?utm_source=n8n&utm_medium=template&utm_campaign=n8n_templates&utm_content=weekly-role-candidates-slack).\n\nMore SourceGeek templates: https://www.sourcegeek.com/en/templates#weekly-role-candidates-slack",
        "height": 480,
        "width": 440,
        "color": 5
      },
      "id": "79818b7c-cf3e-4db2-a8d1-8fd9a831a8c5",
      "position": [
        0,
        120
      ]
    },
    {
      "name": "Every Monday at 8:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "weeks",
              "triggerAtDay": [
                1
              ],
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "17d2ecd9-1b45-4d02-aa86-d1c3f144169d",
      "position": [
        520,
        300
      ]
    },
    {
      "name": "Role",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "9d09250c-c60b-4434-aee9-e3b5e2f2625d",
              "name": "role",
              "value": "Senior backend engineer",
              "type": "string"
            },
            {
              "id": "228372cd-7032-4860-a40a-7cae806ffef9",
              "name": "searchQuery",
              "value": "Senior backend engineers with Go or Python experience in Amsterdam",
              "type": "string"
            },
            {
              "id": "bfa1e85b-5c7b-4333-abdc-e735359f7931",
              "name": "jobDescription",
              "value": "Senior backend engineer for a 40-person B2B SaaS company in Amsterdam. Must have: 5+ years building backend services in Go or Python, PostgreSQL, experience owning services in production. Nice to have: Kubernetes, event-driven systems, fintech. Hybrid, 3 days in the office.",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "2adb1f6e-2339-4e07-a50b-23cb17393303",
      "position": [
        760,
        300
      ]
    },
    {
      "name": "Search candidates",
      "type": "n8n-nodes-sourcegeek.sourcegeek",
      "typeVersion": 2,
      "parameters": {
        "resource": "search",
        "operation": "fast_search_leads",
        "query": "={{ $json.searchQuery }}",
        "additionalFields": {
          "limit": 20
        }
      },
      "id": "1f7f6028-796a-4ce1-a492-767290f52827",
      "position": [
        1000,
        300
      ]
    },
    {
      "name": "Save as a sheet",
      "type": "n8n-nodes-sourcegeek.sourcegeek",
      "typeVersion": 2,
      "parameters": {
        "resource": "sheet",
        "operation": "create_sheet",
        "title": "={{ $('Role').item.json.role }}, week of {{ $now.toFormat('d LLL yyyy') }}",
        "csv": "={{ $json.csv }}",
        "additionalFields": {
          "searchId": "={{ $('Search candidates').item.json.searchId }}"
        }
      },
      "id": "40dc9d70-acc1-4981-a7ee-c990dba29998",
      "position": [
        1240,
        300
      ]
    },
    {
      "name": "Score against the job",
      "type": "n8n-nodes-sourcegeek.sourcegeek",
      "typeVersion": 2,
      "parameters": {
        "resource": "sheet",
        "operation": "score_leads",
        "artifactId": "={{ $json.artifactId }}",
        "targetDescription": "={{ $('Role').item.json.jobDescription }}"
      },
      "id": "f7294ea2-af93-4cdc-af28-a2bd432611f5",
      "position": [
        1480,
        300
      ]
    },
    {
      "name": "Wait for the scores",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "parameters": {
        "amount": 3,
        "unit": "minutes"
      },
      "webhookId": "bba952c6-dcdb-46ef-a849-32a463655011",
      "id": "c150bca8-03a9-4b0c-a16f-9548e4360542",
      "position": [
        1720,
        300
      ]
    },
    {
      "name": "Shortlist the top five",
      "type": "n8n-nodes-sourcegeek.sourcegeek",
      "typeVersion": 2,
      "parameters": {
        "resource": "sheet",
        "operation": "create_shortlist",
        "artifactId": "={{ $('Save as a sheet').item.json.artifactId }}",
        "additionalFields": {
          "limit": 5
        }
      },
      "id": "d8e57b2f-0afe-4419-a3a3-63a969cf64bd",
      "position": [
        1960,
        300
      ]
    },
    {
      "name": "Post to Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.3,
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#recruiting",
          "mode": "name"
        },
        "text": "=*{{ $('Role').item.json.role }}: this week's top candidates*\n{{ $json.candidates.map(c => `${c.rank}. ${c.name}, ${c.title} at ${c.company} (score ${c.score}): ${c.reason}`).join('\\n') }}\n\nShortlist: {{ $json.url }}\nAll candidates: {{ $('Save as a sheet').item.json.url }}",
        "otherOptions": {}
      },
      "id": "802210db-8491-4c03-ae02-5a8e9689d575",
      "position": [
        2200,
        300
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Every Monday at 8:00": {
      "main": [
        [
          {
            "node": "Role",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Role": {
      "main": [
        [
          {
            "node": "Search candidates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search candidates": {
      "main": [
        [
          {
            "node": "Save as a sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save as a sheet": {
      "main": [
        [
          {
            "node": "Score against the job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score against the job": {
      "main": [
        [
          {
            "node": "Wait for the scores",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for the scores": {
      "main": [
        [
          {
            "node": "Shortlist the top five",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shortlist the top five": {
      "main": [
        [
          {
            "node": "Post to Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
