{
  "name": "Prepare an interview dossier in SourceGeek when an interview is scheduled",
  "nodes": [
    {
      "name": "About this template",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "parameters": {
        "content": "## An interview prep dossier for every interview on your calendar\n\nWhen an event with \"interview\" in its title lands on your Google Calendar, SourceGeek starts a task that prepares a dossier for the interviewer: the candidate's background, how they match the role, and the questions to ask. You get an email with the link.\n\nPut the candidate's profile URL and the role in the event description. In the **Settings** node, set the SourceGeek project to plan the task in (its key, such as SBE) and your address.\n\nCredits: one SourceGeek chat run per interview.\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=interview-prep-dossier).\n\nMore SourceGeek templates: https://www.sourcegeek.com/en/templates#interview-prep-dossier",
        "height": 520,
        "width": 440,
        "color": 5
      },
      "id": "7c38ff87-fdcd-4b78-a3a9-60ee11b464a4",
      "position": [
        0,
        120
      ]
    },
    {
      "name": "Interview scheduled",
      "type": "n8n-nodes-base.googleCalendarTrigger",
      "typeVersion": 1,
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        },
        "calendarId": {
          "__rl": true,
          "value": "primary",
          "mode": "list",
          "cachedResultName": "primary"
        },
        "triggerOn": "eventCreated",
        "options": {}
      },
      "id": "b7ff8363-4bdd-4122-af90-de46d15afd12",
      "position": [
        520,
        300
      ]
    },
    {
      "name": "Only interviews",
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "4bc0a225-a8fb-4878-a20e-fb9c38261f9b",
              "leftValue": "={{ $json.summary }}",
              "rightValue": "interview",
              "operator": {
                "type": "string",
                "operation": "contains"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {
          "ignoreCase": true
        }
      },
      "id": "2f976071-8a43-4290-a3c2-86ed1b9735fb",
      "position": [
        760,
        300
      ]
    },
    {
      "name": "Settings",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "dce8796b-ae29-49fc-ac96-19ebf81305bc",
              "name": "project",
              "value": "SBE",
              "type": "string"
            },
            {
              "id": "b7f9bae2-3727-4f0b-ab21-05e14a0a0c90",
              "name": "email",
              "value": "you@example.com",
              "type": "string"
            },
            {
              "id": "e8759906-1e90-47eb-aa40-b2d47234c32a",
              "name": "summary",
              "value": "={{ $json.summary }}",
              "type": "string"
            },
            {
              "id": "45f73360-e954-4447-a4ff-614889ffc7f7",
              "name": "start",
              "value": "={{ $json.start.dateTime ?? $json.start.date }}",
              "type": "string"
            },
            {
              "id": "99d3d082-b145-4990-a8bd-3875f7cd0177",
              "name": "details",
              "value": "={{ $json.description ?? '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "da8b6cb4-123b-43b5-a49d-0f574b0d0426",
      "position": [
        1000,
        300
      ]
    },
    {
      "name": "Plan the dossier",
      "type": "n8n-nodes-sourcegeek.sourcegeek",
      "typeVersion": 2,
      "parameters": {
        "resource": "project",
        "operation": "plan_tasks",
        "tasks": "={{ JSON.stringify([{ title: 'Interview prep: ' + $json.summary, description: 'Prepare a one-page interview dossier for the interview \"' + $json.summary + '\" on ' + $json.start + '. Event details, with the candidate and the role: ' + $json.details + '. Cover the candidate\\'s background, how they match the role, gaps to probe and five questions to ask.' }]) }}",
        "additionalFields": {
          "project": "={{ $json.project }}"
        }
      },
      "id": "a81a1632-8112-4cc7-a05b-88caefeaa9c1",
      "position": [
        1240,
        300
      ]
    },
    {
      "name": "Start the task",
      "type": "n8n-nodes-sourcegeek.sourcegeek",
      "typeVersion": 2,
      "parameters": {
        "resource": "project",
        "operation": "start_tasks",
        "tasks": "={{ JSON.stringify($json.tasks.map(t => ({ task: t.key }))) }}"
      },
      "id": "b8398fa6-c4b2-4658-ab91-81e86acd7965",
      "position": [
        1480,
        300
      ]
    },
    {
      "name": "Email the link",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "parameters": {
        "sendTo": "={{ $('Settings').item.json.email }}",
        "subject": "=Interview prep: {{ $('Settings').item.json.summary }}",
        "emailType": "text",
        "message": "=SourceGeek is preparing the dossier for {{ $('Settings').item.json.summary }}. It will be ready in a few minutes:\n{{ $json.started[0].url }}",
        "options": {}
      },
      "id": "0108f2b9-900d-4f02-a338-6f1f90747691",
      "position": [
        1720,
        300
      ]
    }
  ],
  "pinData": {},
  "connections": {
    "Interview scheduled": {
      "main": [
        [
          {
            "node": "Only interviews",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Only interviews": {
      "main": [
        [
          {
            "node": "Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Settings": {
      "main": [
        [
          {
            "node": "Plan the dossier",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Plan the dossier": {
      "main": [
        [
          {
            "node": "Start the task",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start the task": {
      "main": [
        [
          {
            "node": "Email the link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}
