{
  "id": "xZwfHIGLbLq2GzfO",
  "name": "AI-Powered Women Job Discovery & Daily Digest using SerpAPI, GPT-4o-mini, and Telegram",
  "tags": [],
  "nodes": [
    {
      "id": "8a3fd462-6e90-46c6-9f03-c2daf9729efb",
      "name": "Sticky Note: Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1584,
        -304
      ],
      "parameters": {
        "width": 784,
        "height": 476,
        "content": "## \ud83e\udd1d Women's Daily Job Digest Bot\n\n### How it works\nEvery morning at 9 AM, this workflow searches Google Jobs for four specific job categories \u2014 returnship programs, diversity hiring, remote-friendly roles, and female hiring initiatives \u2014 all scoped to India. Results are merged, deduplicated, filtered by relevance keywords, ranked by recency, and then sent through an AI agent that validates each listing and formats it for human readability. Only the top 3 most relevant and recent jobs are sent to a Telegram channel each day.\n\n### Setup steps\n1. **SerpAPI** \u2014 Add your SerpAPI key inside each of the four HTTP Request nodes (replace the placeholder key).\n2. **OpenAI** \u2014 Connect your OpenAI credential to the `OpenAI Chat Model` node. The workflow uses `gpt-4o-mini` by default.\n3. **Telegram** \u2014 Connect a Telegram Bot credential and update the `chatId` in the `Send to Telegram` node with your channel or user ID.\n4. **Test** \u2014 Run a manual trigger test to confirm jobs are fetching, filtering correctly, and messages are arriving in Telegram.\n5. **Activate** \u2014 Enable the workflow. It will fire automatically every day at 9:00 AM."
      },
      "typeVersion": 1
    },
    {
      "id": "091e9cd0-9bb8-4d5e-9d2f-05648d2841e5",
      "name": "Sticky Note: Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -704,
        368
      ],
      "parameters": {
        "color": 7,
        "width": 292,
        "height": 296,
        "content": "## \u23f0 Trigger\nFires once daily at 9:00 AM (server time). Kicks off all four job searches simultaneously in parallel."
      },
      "typeVersion": 1
    },
    {
      "id": "1ffea671-5d56-489f-afd8-f072a52bedd5",
      "name": "Sticky Note: Fetching",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        64
      ],
      "parameters": {
        "color": 7,
        "width": 612,
        "height": 1072,
        "content": "## \ud83d\udce1 Job Fetching\nFour parallel Google Jobs searches via SerpAPI \u2014 returnship programs, diversity hiring, remote roles, and female-focused initiatives. All scoped to India. Results merge into a single stream before processing."
      },
      "typeVersion": 1
    },
    {
      "id": "774acb72-d104-4b1a-8091-4e6d145902d4",
      "name": "Sticky Note: Filter & Rank",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        256,
        384
      ],
      "parameters": {
        "color": 7,
        "width": 772,
        "height": 512,
        "content": "## \ud83d\udd0d Filter & Rank\nJob descriptions are regex-filtered for relevance keywords (women, diversity, returnship, female, remote). Passing jobs are then sorted by posting recency and trimmed to the top 3. This keeps the daily digest short and high-signal."
      },
      "typeVersion": 1
    },
    {
      "id": "1a6a444c-c937-43fb-911f-43cc9c0ade3c",
      "name": "Sticky Note: AI",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        384
      ],
      "parameters": {
        "color": 7,
        "width": 680,
        "height": 548,
        "content": "## \ud83e\udd16 AI Validation & Formatting\nEach job passes through an AI agent (GPT-4o-mini) that checks genuine relevance \u2014 rejecting generic senior roles or vague listings \u2014 and formats accepted jobs with an emoji tag, plain-language relevance note, and apply link. Jobs that don't qualify return IGNORE and are dropped."
      },
      "typeVersion": 1
    },
    {
      "id": "a7c27258-95ab-4dd4-b8c5-2711a910dbfd",
      "name": "Sticky Note: Telegram",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1760,
        368
      ],
      "parameters": {
        "color": 7,
        "width": 412,
        "height": 444,
        "content": "## \ud83d\udcec Telegram Dispatch\nFormatted job listings are bundled into a single daily digest message and sent to a Telegram chat. HTML parse mode is enabled so emoji tags and line breaks render correctly."
      },
      "typeVersion": 1
    },
    {
      "id": "cf50bacd-46d1-4ef1-a18e-0fd256d301d7",
      "name": "Sticky Note: Security",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2208,
        640
      ],
      "parameters": {
        "color": 3,
        "width": 400,
        "height": 162,
        "content": "## \ud83d\udd10 Credentials & Security\nReplace the SerpAPI key in all four HTTP nodes with your own key. Use named credentials for OpenAI and Telegram \u2014 never paste raw tokens into shared templates."
      },
      "typeVersion": 1
    },
    {
      "id": "ce416110-f502-4320-a5b0-aaabf9bda82b",
      "name": "Daily 9AM Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -592,
        512
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "faf2233c-3dc4-42d7-9abe-cf74a8531cea",
      "name": "Fetch: Women Returnship Jobs",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        256
      ],
      "parameters": {
        "url": "https://serpapi.com/search.json",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "engine",
              "value": "google_jobs"
            },
            {
              "name": "q",
              "value": "women returnship jobs"
            },
            {
              "name": "location",
              "value": "India"
            },
            {
              "name": "api_key",
              "value": "YOUR_SERPAPI_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "451bfce0-5a43-4cb5-8e23-139b6728f696",
      "name": "Fetch: Diversity Hiring Jobs",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        464
      ],
      "parameters": {
        "url": "https://serpapi.com/search.json",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "engine",
              "value": "google_jobs"
            },
            {
              "name": "q",
              "value": "diversity hiring jobs"
            },
            {
              "name": "location",
              "value": "India"
            },
            {
              "name": "api_key",
              "value": "YOUR_SERPAPI_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "4ce90190-e9b5-45e2-b263-ff1d47cd10b6",
      "name": "Fetch: Remote Jobs for Women",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -240,
        672
      ],
      "parameters": {
        "url": "https://serpapi.com/search.json",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "engine",
              "value": "google_jobs"
            },
            {
              "name": "q",
              "value": "remote jobs for women"
            },
            {
              "name": "location",
              "value": "India"
            },
            {
              "name": "api_key",
              "value": "YOUR_SERPAPI_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "c0bbe054-bdcb-46c2-a722-da647a367b4d",
      "name": "Fetch: Female Hiring Initiatives",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -256,
        880
      ],
      "parameters": {
        "url": "https://serpapi.com/search.json",
        "options": {},
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "engine",
              "value": "google_jobs"
            },
            {
              "name": "q",
              "value": "female hiring initiatives"
            },
            {
              "name": "location",
              "value": "India"
            },
            {
              "name": "api_key",
              "value": "YOUR_SERPAPI_KEY"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "0423600d-97c5-43cb-964c-d9e67f598959",
      "name": "Merge All Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        48,
        560
      ],
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "c20127de-e4a4-4f2e-861a-f04e7933c021",
      "name": "Extract Job Items",
      "type": "n8n-nodes-base.code",
      "position": [
        272,
        560
      ],
      "parameters": {
        "jsCode": "let jobs = [];\n\nfor (const item of items) {\n  const results = item.json.jobs_results || [];\n  \n  for (const job of results) {\n    jobs.push({\n      json: {\n        title: job.title,\n        company: job.company_name,\n        location: job.location,\n        description: job.description,\n        apply_link: job.apply_options?.[0]?.link || \"\",\n        source: job.via\n      }\n    });\n  }\n}\n\nreturn jobs;"
      },
      "typeVersion": 2
    },
    {
      "id": "7fe3158c-1b5d-41d5-a154-ee0f6d3d14c3",
      "name": "Keyword Filter",
      "type": "n8n-nodes-base.if",
      "position": [
        576,
        560
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "keyword-filter-1",
              "operator": {
                "type": "string",
                "operation": "regex"
              },
              "leftValue": "={{ $json.description }}",
              "rightValue": "women|diversity|returnship|female|remote"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "fc5fdf7b-7dbe-4873-90c2-bc8a7c61f0a3",
      "name": "Rank by Recency & Take Top 3",
      "type": "n8n-nodes-base.code",
      "position": [
        864,
        544
      ],
      "parameters": {
        "jsCode": "// Step 1: Helper function to convert \"2 days ago\" \u2192 number\nfunction parsePostedTime(text) {\n  if (!text) return 9999; // unknown \u2192 lowest priority\n\n  text = text.toLowerCase();\n\n  if (text.includes(\"hour\")) {\n    return parseInt(text) / 24;\n  }\n  if (text.includes(\"day\")) {\n    return parseInt(text);\n  }\n  if (text.includes(\"week\")) {\n    return parseInt(text) * 7;\n  }\n  if (text.includes(\"month\")) {\n    return parseInt(text) * 30;\n  }\n\n  return 9999;\n}\n\n// Step 2: Map jobs with time score\nlet jobs = items.map(item => {\n  const posted =\n    item.json.detected_extensions?.posted_at ||\n    item.json.posted_at ||\n    \"\";\n\n  return {\n    ...item,\n    score: parsePostedTime(posted)\n  };\n});\n\n// Step 3: Sort by most recent (lowest score = most recent)\njobs.sort((a, b) => a.score - b.score);\n\n// Step 4: Take top 3\njobs = jobs.slice(0, 3);\n\n// Step 5: Return cleaned items\nreturn jobs.map(job => ({ json: job.json }));"
      },
      "typeVersion": 2
    },
    {
      "id": "26fd9231-741a-4bbe-8fd5-f4d4db4b9f9e",
      "name": "AI Agent: Validate & Format Job",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1184,
        544
      ],
      "parameters": {
        "text": "=You are an assistant for a Women Job Opportunity Bot.\n\nYour job is to:\n1. Check if the job is truly relevant for:\n   - women hiring\n   - diversity hiring\n   - returnship programs\n   - female-only roles\n   - remote/flexible jobs suitable for women\n\n2. Reject low-quality or irrelevant jobs like:\n   - generic senior roles (Director, VP without diversity focus)\n   - unrelated roles\n   - spam or vague listings\n\n3. If relevant \u2192 format cleanly.\n\nOUTPUT FORMAT:\n\n[Optional Tag]\nChoose ONE if applicable:\n\ud83d\udc69 Women Focused\n\ud83c\udf0d Diversity Hiring\n\ud83c\udfe0 Remote Friendly\n\ud83d\udd01 Returnship Program\n\nRole: [Job Title]\nCompany: [Company Name]\nLocation: [Location]\n\nWhy it is relevant:\n[1 short simple sentence]\n\nApply:\n[Apply Link]\n\n---\n\nIf NOT relevant \u2192 return ONLY:\nIGNORE\n\n---\n\nJob Data:\n\nTitle: {{ $json.title }}\nCompany: {{ $json.company }}\nLocation: {{ $json.location }}\nDescription: {{ $json.description }}\nLink: {{ $json.apply_link }}",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 3
    },
    {
      "id": "9d03d799-c8cd-4c19-911e-86e872cf7819",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1168,
        784
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {},
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "4f31f61e-40ac-466e-b94c-b6acae27c875",
      "name": "Build Telegram Digest Message",
      "type": "n8n-nodes-base.code",
      "position": [
        1584,
        544
      ],
      "parameters": {
        "jsCode": "let message = \"\ud83d\udd25 Women Job Opportunities (Today)\\n\\n\";\n\nitems.forEach((item, index) => {\n  message += `${index + 1}. ${item.json.output}\\n\\n`;\n});\n\n// Optional footer (recommended)\nmessage += \"\u2728 Stay consistent. Opportunities come daily!\\n\";\n\nreturn [\n  {\n    json: {\n      message\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "877e7071-a2a6-4b91-87db-b47540e4b2ca",
      "name": "Send Daily Digest to Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1872,
        544
      ],
      "parameters": {
        "text": "={{ $json.message }}",
        "chatId": "YOUR_TELEGRAM_CHAT_ID",
        "additionalFields": {
          "parse_mode": "HTML"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b45c6299-cada-4fd5-8454-8018a246c629",
  "connections": {
    "Keyword Filter": {
      "main": [
        [
          {
            "node": "Rank by Recency & Take Top 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily 9AM Trigger": {
      "main": [
        [
          {
            "node": "Fetch: Women Returnship Jobs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch: Diversity Hiring Jobs",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch: Remote Jobs for Women",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch: Female Hiring Initiatives",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Job Items": {
      "main": [
        [
          {
            "node": "Keyword Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge All Results": {
      "main": [
        [
          {
            "node": "Extract Job Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent: Validate & Format Job",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Fetch: Diversity Hiring Jobs": {
      "main": [
        [
          {
            "node": "Merge All Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch: Remote Jobs for Women": {
      "main": [
        [
          {
            "node": "Merge All Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Fetch: Women Returnship Jobs": {
      "main": [
        [
          {
            "node": "Merge All Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rank by Recency & Take Top 3": {
      "main": [
        [
          {
            "node": "AI Agent: Validate & Format Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Telegram Digest Message": {
      "main": [
        [
          {
            "node": "Send Daily Digest to Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent: Validate & Format Job": {
      "main": [
        [
          {
            "node": "Build Telegram Digest Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch: Female Hiring Initiatives": {
      "main": [
        [
          {
            "node": "Merge All Results",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}