{
  "name": "Automate job applications with Telegram, SerpAPI, and OpenAI",
  "nodes": [
    {
      "id": "08a69784-6434-4570-90b6-26143ee4536f",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -1312,
        720
      ]
    },
    {
      "id": "77bf0cb3-bcaa-4396-a361-a394cc543f78",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -192,
        560
      ]
    },
    {
      "id": "4dd0352e-185c-4436-a4a8-85a8d92ee3be",
      "name": "No Operation, do nothing1",
      "type": "n8n-nodes-base.noOp",
      "position": [
        544,
        976
      ]
    },
    {
      "id": "07a9ae87-18a5-464e-ae9a-e1d39c9c212e",
      "name": "Extract Job results from SERP-API response",
      "type": "n8n-nodes-base.code",
      "position": [
        -640,
        928
      ]
    },
    {
      "id": "ed5f295b-90a9-4149-b8c8-2ff9f95c5aeb",
      "name": "Search google jobs listings with SERP-API",
      "type": "n8n-nodes-serpapi.serpApi",
      "position": [
        -864,
        928
      ]
    },
    {
      "id": "908b1a93-8a68-4775-85db-e804bfae2159",
      "name": "Filter unwanted results based on your criteria",
      "type": "n8n-nodes-base.if",
      "position": [
        -416,
        928
      ]
    },
    {
      "id": "ae1e2e3a-f98b-4127-8cd8-6af0baf7b6bc",
      "name": "Loop Over Items",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -192,
        1024
      ]
    },
    {
      "id": "6c0901f5-b24f-4748-8729-4056c33110d2",
      "name": "Send Telegram message & approval card for each job",
      "type": "n8n-nodes-base.telegram",
      "position": [
        176,
        1072
      ]
    },
    {
      "id": "7b724308-45a0-411f-b810-bed5848de31c",
      "name": "Check if job was approved",
      "type": "n8n-nodes-base.if",
      "position": [
        176,
        864
      ]
    },
    {
      "id": "7158bce9-51d8-4166-8e3b-3c8fe84a49c2",
      "name": "Notify user about end of the loop",
      "type": "n8n-nodes-base.telegram",
      "position": [
        768,
        672
      ]
    },
    {
      "id": "dd55233d-67d6-4834-9238-c9b2a913eba7",
      "name": "Create customized cover letter",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        768,
        864
      ]
    },
    {
      "id": "e1a7d39d-574b-414c-b72f-7f6b6fe6a02a",
      "name": "Upload cover letter to Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        992,
        864
      ]
    },
    {
      "id": "d857bb90-49c7-4e56-b032-bbdb9dcc1e60",
      "name": "Create folder for attachments",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1216,
        864
      ]
    },
    {
      "id": "e2050764-092b-44fe-af19-c47493387ce9",
      "name": "Move cover letter to attachments folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1440,
        864
      ]
    },
    {
      "id": "9bb3bc59-25a0-41d0-a08c-281c63a4e20a",
      "name": "Create customized CV",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        1664,
        864
      ]
    },
    {
      "id": "421d58f8-3993-4929-89fb-12f7a5b7d035",
      "name": "Upload customized CV",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1888,
        864
      ]
    },
    {
      "id": "7cd4cf9b-4382-48e8-8d13-afc09a0d0c8c",
      "name": "Move CV to attachments folder",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2112,
        864
      ]
    },
    {
      "id": "9c78ad96-06de-40b6-a0c8-73baba33e951",
      "name": "Document link to attachments folder",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2336,
        864
      ]
    },
    {
      "id": "7d1d36d2-b135-4b61-aa74-96664f6617cd",
      "name": "Document job results in Google sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        544,
        768
      ]
    },
    {
      "id": "a7c925df-c72b-46bd-98d3-72c4a856c68b",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        80,
        176
      ]
    },
    {
      "id": "acff95a1-a367-4143-92a9-32fb8c539145",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        48,
        400
      ]
    },
    {
      "id": "e89deee9-1ccf-4e9b-9417-38b7d7520234",
      "name": "Auto-fixing Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        176,
        400
      ]
    },
    {
      "id": "bcef6c84-9eb0-49dd-aabf-0c5cdfbec259",
      "name": "OpenAI Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        192,
        608
      ]
    },
    {
      "id": "77b121fe-1699-4f6e-9609-025aca96fc3b",
      "name": "If",
      "type": "n8n-nodes-base.if",
      "position": [
        -1088,
        720
      ]
    },
    {
      "id": "afc491a5-2418-4d9a-b7e2-e899d26afec3",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        320,
        608
      ]
    },
    {
      "id": "85c90d06-3c41-4dde-a190-b85eb9151c6e",
      "name": "HTML to PDF",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        768,
        480
      ]
    },
    {
      "id": "3a6542dc-d1e3-4815-88be-80cdce8965d3",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        992,
        480
      ]
    },
    {
      "id": "8fd5cb80-34c7-4f04-b7a5-a6cf7f3253b2",
      "name": "Move file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1440,
        480
      ]
    },
    {
      "id": "7cedae5c-711b-4f75-b9a7-01c7324356a9",
      "name": "Create_folder_for_attachments3",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1216,
        480
      ]
    },
    {
      "id": "584f6c93-15fe-420c-b951-f13237235743",
      "name": "Create_personalized_cv3",
      "type": "n8n-nodes-htmlcsstopdf.htmlcsstopdf",
      "position": [
        1664,
        480
      ]
    },
    {
      "id": "d0f05c82-1e8b-4cfa-99ec-f4072e8abc9b",
      "name": "Upload_cv3",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1888,
        480
      ]
    },
    {
      "id": "f058283a-50a0-44e1-afb0-eb0a5f637daf",
      "name": "Move_cv_to_attachments_folder3",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2112,
        480
      ]
    },
    {
      "id": "7c40473f-82e5-4230-a36b-cf0225d91231",
      "name": "Append row in sheet1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2336,
        480
      ]
    },
    {
      "id": "aec6054d-9c17-4d8b-8233-605c37c5da00",
      "name": "If1",
      "type": "n8n-nodes-base.if",
      "position": [
        544,
        384
      ]
    },
    {
      "id": "f241aa7e-32f5-48ba-b2f8-cad98addf600",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        80
      ],
      "parameters": {
        "width": 520,
        "height": 900,
        "content": "## Automate job applications with Telegram, SerpAPI, and OpenAI\n\nThis workflow automates your job application pipeline via a **Telegram bot**. Send a job link or search keyword, approve the results, a"
      }
    },
    {
      "id": "d0f55af7-5ffb-4cae-a1b7-207a82c286a8",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1312,
        544
      ],
      "parameters": {
        "width": 320,
        "height": null,
        "content": "### Step 1: Telegram Input & Routing\nUser sends either a **URL** or a **keyword** via Telegram.\nThe If node checks if the message contains `http` to route accordingly."
      }
    },
    {
      "id": "720f458d-cf2a-41ed-b66f-e47f519ee93b",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "width": 380,
        "height": null,
        "content": "### Step 2a: URL Mode -- AI Agent\nOpenAI GPT with web search visits the URL, extracts structured job data (position, company, location, salary, description, language). Output is validated by a structu"
      }
    },
    {
      "id": "20b17a41-0d0e-45eb-a14e-e18859fa3e79",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        752
      ],
      "parameters": {
        "width": 380,
        "height": null,
        "content": "### Step 2b: Keyword Mode -- SerpAPI\nSearches Google Jobs via SerpAPI, extracts results with a Code node, filters out unwanted job types (internships, freelance, part-time), then sends each result to "
      }
    },
    {
      "id": "bfbff130-d81a-49b9-af52-4a26b502067d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -128,
        1296
      ],
      "parameters": {
        "width": 340,
        "height": 120,
        "content": "### Step 3: Telegram Approval Loop\nEach job is sent to Telegram with a formatted preview. User approves or rejects each one via buttons."
      }
    },
    {
      "id": "2122c2a8-bb10-409b-ae5f-a033a8522156",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        672
      ],
      "parameters": {
        "width": 380,
        "height": 140,
        "content": "### Step 4: Document Generation\nGenerates a styled **cover letter** and a **personalized CV** as PDF using HTML-to-PDF API. Both documents dynamically insert the target company and position."
      }
    },
    {
      "id": "e6ab60cb-df6c-4e28-9411-1c65bc8bde19",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        672
      ],
      "parameters": {
        "width": 380,
        "height": 140,
        "content": "### Step 5: Google Drive & Sheets\nUploads cover letter + CV to Drive, creates a named folder per application, moves files into it, and updates the Google Sheets tracker with Drive folder link."
      }
    },
    {
      "id": "f9e51f27-ed74-450f-a83f-7584cc6714ad",
      "name": "Notify user about error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        768,
        288
      ]
    },
    {
      "id": "e04a4680-a3bb-4240-a99b-6c8e087815c6",
      "name": "Notify user about successful process",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2560,
        672
      ]
    }
  ],
  "connections": {
    "If": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Search google jobs listings with SERP-API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If1": {
      "main": [
        [
          {
            "node": "HTML to PDF",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Notify user about error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "If1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move file": {
      "main": [
        [
          {
            "node": "Create_personalized_cv3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload_cv3": {
      "main": [
        [
          {
            "node": "Move_cv_to_attachments_folder3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTML to PDF": {
      "main": [
        [
          {
            "node": "Upload file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload file": {
      "main": [
        [
          {
            "node": "Create_folder_for_attachments3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Check if job was approved",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Telegram message & approval card for each job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Append row in sheet1": {
      "main": [
        [
          {
            "node": "Notify user about successful process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create customized CV": {
      "main": [
        [
          {
            "node": "Upload customized CV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload customized CV": {
      "main": [
        [
          {
            "node": "Move CV to attachments folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create_personalized_cv3": {
      "main": [
        [
          {
            "node": "Upload_cv3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Check if job was approved": {
      "main": [
        [
          {
            "node": "Document job results in Google sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation, do nothing1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload cover letter to Drive": {
      "main": [
        [
          {
            "node": "Create folder for attachments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create folder for attachments": {
      "main": [
        [
          {
            "node": "Move cover letter to attachments folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move CV to attachments folder": {
      "main": [
        [
          {
            "node": "Document link to attachments folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create customized cover letter": {
      "main": [
        [
          {
            "node": "Upload cover letter to Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create_folder_for_attachments3": {
      "main": [
        [
          {
            "node": "Move file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move_cv_to_attachments_folder3": {
      "main": [
        [
          {
            "node": "Append row in sheet1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document link to attachments folder": {
      "main": [
        [
          {
            "node": "Notify user about successful process",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Document job results in Google sheet": {
      "main": [
        [
          {
            "node": "Create customized cover letter",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify user about end of the loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Move cover letter to attachments folder": {
      "main": [
        [
          {
            "node": "Create customized CV",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search google jobs listings with SERP-API": {
      "main": [
        [
          {
            "node": "Extract Job results from SERP-API response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Job results from SERP-API response": {
      "main": [
        [
          {
            "node": "Filter unwanted results based on your criteria",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter unwanted results based on your criteria": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Telegram message & approval card for each job": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}