{
  "name": "Practice job interviews with voice-based Google Gemini AI interviewer",
  "nodes": [
    {
      "id": "3a21db35-9973-472a-93f9-b8a2ba3175f2",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -368,
        -16
      ]
    },
    {
      "id": "71fe1f4b-bb7e-4cd1-be2a-4e3988a172e7",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -48,
        -64
      ]
    },
    {
      "id": "8ed1f967-bc1a-4c47-bca9-bf3750d68dea",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        688,
        -48
      ]
    },
    {
      "id": "79c3c250-b974-4094-af8c-a8c472071c8c",
      "name": "Basic LLM Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        912,
        -176
      ]
    },
    {
      "id": "874576cc-a94c-491f-a398-55821de46c6d",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        928,
        112
      ]
    },
    {
      "id": "29bf80c7-84d2-40de-a56f-ddf82b659273",
      "name": "Respond to Webhook",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1616,
        -176
      ]
    },
    {
      "id": "b533e3ac-7b58-4520-9e47-60ee8d3c01c3",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -144
      ],
      "parameters": {
        "width": 304,
        "height": 256,
        "content": "START HERE\nThis workflow starts when it receives a POST request from the frontend UI. It checks if it's the first question or a follow-up."
      }
    },
    {
      "id": "c23be228-ded4-4b64-a69c-c73ddb5b1b26",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        208,
        -400
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "1. First Question\nIf it's the start of the interview, this node creates the initial prompt for the AI, using the resume text and job description sent from the UI."
      }
    },
    {
      "id": "139ab288-03bb-40cf-bbe7-a95f57776d80",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        224
      ],
      "parameters": {
        "width": 352,
        "height": null,
        "content": "2. Follow-up Question\nFor all subsequent turns, this node creates a different prompt that includes the conversation history, asking the AI for a logical follow-up question."
      }
    },
    {
      "id": "e7752791-23d2-43df-8393-6f8268e6a901",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        928,
        -336
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "3. AI Brain (Google Gemini)\nThe prompt is sent to the Google Gemini model to generate the interview question. Remember to add your own Google Gemini API credential here!"
      }
    },
    {
      "id": "a8de54ce-397d-4ed4-aea1-f70baf730d05",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1280,
        192
      ],
      "parameters": {
        "width": null,
        "height": null,
        "content": "4. Send Response\nThese nodes prepare the AI's response and the updated conversation history, sending it all back to the frontend UI in a clean JSON format."
      }
    },
    {
      "id": "6bc9a581-195d-46dc-88b4-b2721d088cc2",
      "name": "Create Initial Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        272,
        -240
      ]
    },
    {
      "id": "f5ed22be-16b7-4bdc-b6c4-1310521110fa",
      "name": "Create Follow-up Prompt",
      "type": "n8n-nodes-base.set",
      "position": [
        288,
        80
      ]
    },
    {
      "id": "70021fa4-0326-4ee6-a5bf-518e6ecb030d",
      "name": "Prepare Response Data",
      "type": "n8n-nodes-base.set",
      "position": [
        1344,
        48
      ]
    },
    {
      "id": "b9162dfe-4159-472f-a928-665d2146fdf1",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        -576
      ],
      "parameters": {
        "width": 528,
        "height": 832,
        "content": "What does this workflow do?\nThis workflow acts as the backend \"brain\" for a sophisticated AI Voice Interviewer. It receives a user's resume text and a target job description, then uses a Large Languag"
      }
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "Create Initial Prompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Follow-up Prompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Basic LLM Chain": {
      "main": [
        [
          {
            "node": "Prepare Response Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Initial Prompt": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare Response Data": {
      "main": [
        [
          {
            "node": "Respond to Webhook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Follow-up Prompt": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Basic LLM Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}