{
  "id": "kzA1n1QfrY7vGAkO",
  "name": "Find specific jobs on Indeed using Telegram, BrowserAct & Gemini",
  "tags": [],
  "nodes": [
    {
      "id": "f0e150a5-e68c-497f-8de5-cdeceb24ff78",
      "name": "Validate inputs",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        560,
        544
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "48d788d7-b48a-4438-a380-ba39a374da87",
      "name": "Analyze user Input",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        592,
        320
      ],
      "parameters": {
        "text": "={{ $json.message.text }}",
        "options": {
          "systemMessage": "You are a parameter extraction engine.\n\nYour Task:\n\nAnalyze the user's input to identify the desired Job Role and Location.\n\nIf a Location is not explicitly stated in the input, you MUST default the location to \"Brooklyn\".\n\nOutput the result as a raw JSON string.\n\nConstraints:\n\nOutput ONLY the raw JSON string.\n\nDo NOT use Markdown formatting (no backticks, no ```json).\n\nDo NOT add any conversational text.\n\nOutput Schema: { \"role\": \"String\", \"location\": \"String\" }\n\nExamples: Input: \"Find me marketing manager jobs\" Output: { \"role\": \"Marketing Manager\", \"location\": \"Brooklyn\" }\n\nInput: \"I need a java developer in Austin Texas\" Output: { \"role\": \"Java Developer\", \"location\": \"Austin Texas\" }"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "7a872260-01e0-4157-8a51-703ebcbeb41c",
      "name": "Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        2032,
        624
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{\n  \"Telegram\" : [\n  \"User friendly telegram API post 1\",\n  \"User friendly telegram API post 2\"\n]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "d6c18017-d1c7-4123-b50b-f352f36733a1",
      "name": "Structured Output1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        688,
        512
      ],
      "parameters": {
        "autoFix": true,
        "jsonSchemaExample": "{ \"role\": \"String\", \"location\": \"String\" }"
      },
      "typeVersion": 1.3
    },
    {
      "id": "8fc2fb81-f58b-4936-a633-e0f6d6ac88f5",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        1920,
        608
      ],
      "parameters": {
        "model": "google/gemini-2.5-pro",
        "options": {}
      },
      "credentials": {
        "openRouterApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f73a9da7-5193-4d9e-bb47-fcd307f8a815",
      "name": "User Sends Message to Bot",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        352,
        320
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5d073291-fd14-492a-bab9-30e5ec79819e",
      "name": "Process Initialization Alert",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1424,
        240
      ],
      "parameters": {
        "text": "=I got you \u2014 I will search for {{ $json.output.role }} jobs located {{ $json.output.location }}",
        "chatId": "={{ $('User Sends Message to Bot').first().json.message.chat.id }}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "041e02f1-dd72-481c-a0f6-198075dd6e22",
      "name": "Extract Job Data",
      "type": "n8n-nodes-browseract.browserAct",
      "position": [
        1424,
        432
      ],
      "parameters": {
        "type": "WORKFLOW",
        "workflowId": "70715577277982972",
        "workflowConfig": {
          "value": {
            "input-Role": "={{ $json.output.role }}",
            "input-Location": "={{ $json.output.location }}"
          },
          "schema": [
            {
              "id": "input-Indeed",
              "type": "string",
              "display": true,
              "removed": true,
              "required": false,
              "description": "If left blank, the default value defined in BrowserAct will be used.",
              "displayName": "Indeed",
              "defaultMatch": true
            },
            {
              "id": "input-Role",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "description": "If left blank, the default value defined in BrowserAct will be used.",
              "displayName": "Role",
              "defaultMatch": true
            },
            {
              "id": "input-Location",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "description": "If left blank, the default value defined in BrowserAct will be used.",
              "displayName": "Location",
              "defaultMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "input-Role"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "open_incognito_mode": false
      },
      "credentials": {
        "browserActApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "397939ab-ac18-43ea-be6c-21fadb9c81f3",
      "name": "Analyze Job Data and Generate Response",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1920,
        432
      ],
      "parameters": {
        "text": "={{ $json.output.string }}",
        "options": {
          "systemMessage": "You are a Telegram Job Alert Bot. Your task is to convert raw JSON job data into clean, user-friendly HTML messages suitable for the Telegram API.\n\nInput: A JSON list of job objects containing job_title, location, benefits, and full_job_description.\n\nOutput: A valid JSON list of strings. Each string represents a single message.\n\nFormatting Rules:\n\nHTML Only: Use only Telegram-supported HTML tags: <b>, <i>, <a>, <code>, <pre>. Do not use Markdown (**, __).\n\nStructure:\n\nHeader: <b>Job Title</b>\n\nLocation: \ud83d\udccd <i>Location</i>\n\nSalary: \ud83d\udcb0 Pay: [Amount] (Extract from description if available, otherwise \"Not specified\")\n\nBenefits: \ud83c\udf81 Benefits: [Summary] (If available)\n\nDescription: \ud83d\udcdd <b>Description:</b> followed by the text.\n\nCleanup: Remove excessive newlines (\\n\\n\\n). Remove standard boilerplate EOE statements (Equal Opportunity Employer) to save space.\n\nLength Limit:\n\nThe Telegram API limit is 4096 characters, but you must strictly keep messages under 3000 characters.\n\nSplitting: If a message exceeds 3000 characters, split it into multiple strings in the output list.\n\nPart 1 header: <b>Job Title (Part 1)</b>\n\nPart 2 header: <b>Job Title (Part 2)</b>\n\nEnsure HTML tags are closed properly before splitting.\n\nStyle: Use emojis to make it scannable. Be professional but engaging.\n\noutput example:\n{\n  \"Telegram\" : [\n  \"User friendly telegram API post 1\",\n  \"User friendly telegram API post 2\" \n]\n}\n"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 3
    },
    {
      "id": "f5f21107-59f4-4777-9f9f-5fd0e50392b7",
      "name": "Split Out Generated Data",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        2320,
        432
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "output.Telegram"
      },
      "typeVersion": 1
    },
    {
      "id": "fe2b4d7d-8cda-4b8e-80e0-fd313342c9f4",
      "name": "Send Job Post to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2608,
        432
      ],
      "parameters": {
        "text": "={{ $json[\"output.Telegram\"] }}",
        "chatId": "={{ $('User Sends Message to Bot').first().json.message.chat.id }}",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d39cedaf-7387-43b6-a894-e7802d930a76",
      "name": "Gemini",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2032,
        752
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a2f539ae-ee6e-4b09-ba37-3a21b42cbc0d",
      "name": "Documentation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -208
      ],
      "parameters": {
        "width": 380,
        "height": 504,
        "content": "## \u26a1 Workflow Overview & Setup\n\n**Summary:** This automation allows users to search for jobs on Indeed via Telegram. It scrapes the latest listings using BrowserAct, filters them with AI, and delivers a formatted digest back to the user.\n\n### Requirements\n* **Credentials:** Telegram, BrowserAct, OpenRouter (GPT-4), Google Gemini (PaLM).\n* **Mandatory:** BrowserAct API (Template: **the Indeed Smart Job Scout**)\n\n### How to Use\n1.  **Credentials:** Set up your Telegram Bot, BrowserAct, and AI model credentials in n8n.\n2.  **BrowserAct Template:** Ensure you have the **the Indeed Smart Job Scout** template saved in your BrowserAct account.\n3.  **Interaction:** Send a message like \"Marketing Manager in Austin\" to your Telegram bot. If no location is provided, it defaults to **Brooklyn**.\n\n### Need Help?\n[How to Find Your BrowserAct API Key & Workflow ID](https://docs.browseract.com)\n[How to Connect n8n to BrowserAct](https://docs.browseract.com)\n[How to Use & Customize BrowserAct Templates](https://docs.browseract.com)"
      },
      "typeVersion": 1
    },
    {
      "id": "60478ae3-7c6a-456d-b8b9-08feb41c4023",
      "name": "Step 1 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        176
      ],
      "parameters": {
        "color": 7,
        "width": 796,
        "height": 112,
        "content": "### \ud83d\udde3\ufe0f Step 1: Intent & Parameter Extraction\n\nThe workflow analyzes Telegram messages to identify the desired job role and location. If the user does not specify a city, the AI agent automatically defaults the search location to \"Brooklyn\" to ensure the scraper always receives valid inputs."
      },
      "typeVersion": 1
    },
    {
      "id": "55113049-eaf4-4ab1-8029-7ad4897387d2",
      "name": "Step 2 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1200,
        96
      ],
      "parameters": {
        "color": 7,
        "width": 588,
        "height": 108,
        "content": "### \ud83d\udd75\ufe0f Step 2: Live Job Scraping\n\nBrowserAct executes an automated session on Indeed, inputting the extracted Role and Location. It scrapes the latest job results, capturing key details like job titles, salaries, and benefit summaries."
      },
      "typeVersion": 1
    },
    {
      "id": "9f1878e6-77e4-4cdb-a91c-591448871297",
      "name": "Step 3 Explanation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1872,
        288
      ],
      "parameters": {
        "color": 7,
        "width": 908,
        "height": 108,
        "content": "### \ud83e\udde0 Step 3: AI Analysis & Formatting\n\nA specialized AI agent processes the raw job data. It removes duplicate entries, filters out spam, and formats the valid listings into engaging, emoji-rich HTML messages suitable for mobile reading."
      },
      "typeVersion": 1
    },
    {
      "id": "1b6402b3-8973-4610-95b5-c71d433a969a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -208
      ],
      "parameters": {
        "color": 6,
        "width": 640,
        "height": 368,
        "content": "@[youtube](X8GQS8nF9j0)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "59e12515-8601-4ad7-ba86-13ac58e0e5bc",
  "connections": {
    "Gemini": {
      "ai_languageModel": [
        [
          {
            "node": "Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Validate inputs": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze user Input",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Structured Output1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Job Data": {
      "main": [
        [
          {
            "node": "Analyze Job Data and Generate Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze Job Data and Generate Response",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Analyze user Input": {
      "main": [
        [
          {
            "node": "Process Initialization Alert",
            "type": "main",
            "index": 0
          },
          {
            "node": "Extract Job Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output1": {
      "ai_outputParser": [
        [
          {
            "node": "Analyze user Input",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyze Job Data and Generate Response",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Split Out Generated Data": {
      "main": [
        [
          {
            "node": "Send Job Post to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "User Sends Message to Bot": {
      "main": [
        [
          {
            "node": "Analyze user Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Job Data and Generate Response": {
      "main": [
        [
          {
            "node": "Split Out Generated Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}