{
  "name": "My workflow 9",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        832,
        320
      ],
      "id": "d4b24c91-62be-4cf4-b86c-a4fde15d87ba",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "content": "## Preprocessing",
        "height": 240,
        "width": 928
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        800,
        256
      ],
      "id": "d730bce7-ab55-4999-811c-65332a64b8fb",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        272,
        -288
      ],
      "id": "a5b6371b-57f7-4fa3-9da5-4155b5043405",
      "name": "When Executed by Another Workflow",
      "disabled": true
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "DOCUMENT_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "SHEET_ID",
          "mode": "id"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.6,
      "position": [
        1072,
        320
      ],
      "id": "401e6575-8a6f-43dd-ad5a-4632704ae25d",
      "name": "Fetch Details",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "url": "https://api.brightdata.com/dca/dataset",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "id",
              "value": "={{ $json.collection_id }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "ADD_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        496,
        -288
      ],
      "id": "45132cc2-6fd9-4a41-b20a-8ebeb23f4954",
      "name": "Get Data",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.brightdata.com/dca/trigger",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "queue_next",
              "value": "1"
            },
            {
              "name": "collector",
              "value": "COLLECTOR_ID"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "ADD_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "=[\n  {\n    \"url\": \"{{ $json.URL }}\"\n  }\n]",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1328,
        320
      ],
      "id": "e6eab0aa-d328-4a28-84bd-04a6e3e01c90",
      "name": "Start Scrape",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "d4499480-3eca-4d18-90c7-f83233113cae",
              "leftValue": "={{ $json.data }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "or"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        688,
        -288
      ],
      "id": "e8755613-7435-44e1-b753-71d5b7a3f274",
      "name": "If data exists"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "c9185c03-422e-4606-962c-14ff8db6f344",
              "name": "collection_id",
              "value": "={{ $('When Executed by Another Workflow').item.json.collection_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        576,
        48
      ],
      "id": "288b793d-cad0-40fb-8bed-1abb19bd555c",
      "name": "Pass collection"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        736,
        48
      ],
      "id": "02224a85-a1d2-4bdf-8ecc-6e2ecd0b13c3",
      "name": "Wait"
    },
    {
      "parameters": {
        "content": "## Poll",
        "height": 208,
        "width": 336,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        544,
        0
      ],
      "id": "8ad2de01-f9f2-49a0-b69d-790c4d8308d6",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## Get Job List\n",
        "height": 352,
        "width": 656,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        224,
        -368
      ],
      "id": "655ebac9-e331-4663-80bf-a25d91b62cfb",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.brightdata.com/dca/trigger",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "queue_next",
              "value": "1"
            },
            {
              "name": "collector",
              "value": "COLLECTOR_ID"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "ADD_API_KEY"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={{ $json.stdout }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1376,
        -272
      ],
      "id": "4f74f64e-1724-4ef6-b5c8-3bd87b50bd4b",
      "name": "Scrape JD",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Scrape JD",
        "height": 352,
        "width": 624,
        "color": 7
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        896,
        -368
      ],
      "id": "eb1a473d-9dcd-4207-9999-0ecfae90c10b",
      "name": "Sticky Note6"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "uNP7iWwXR4X621cK",
          "mode": "list",
          "cachedResultName": "Challenge"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "mode": "each",
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        1552,
        320
      ],
      "id": "c78f7863-34dc-43b6-8326-d72d4a58e059",
      "name": "Execute Job Scanner"
    },
    {
      "parameters": {
        "command": "=#!/bin/bash\necho '{{ $json.data }}' | jq -c '[ .[] | .jobLinks[]? | {url:.url} ]'\n"
      },
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        960,
        -256
      ],
      "id": "4f877887-c2df-4fb7-9b17-6aaeb6061346",
      "name": "Execute Command"
    },
    {
      "parameters": {
        "chatId": "CHAT_ID",
        "text": "={{ $json.output }}\n\nExecution:\n{{ $execution.id }}",
        "additionalFields": {}
      },
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        2416,
        -304
      ],
      "id": "a69b4608-947d-4137-a511-a3b28d4a7aed",
      "name": "Message Telegram",
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "content": "## Notify",
        "height": 352
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2368,
        -368
      ],
      "id": "941a8cd7-52b2-4599-ae7c-eccb5f59f281",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## AI",
        "height": 352,
        "width": 336,
        "color": 5
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        2016,
        -368
      ],
      "id": "634f6142-73ef-484d-ada7-1852cb3ac907",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "memory",
        "contextWindowLength": 10
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        2192,
        -144
      ],
      "id": "50628191-3f65-4659-8918-1292e3f719ba",
      "name": "Memory for high level"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=MISSION\nAnalyze to the provided json data, and decide if a role in the given data is relevant as per criteria.\n\nURL: {{ $json.data }}. If no or invalid data , quit. Also determine the company name from url.\n\nCRITERIA (INCLUDE)\n- Description: Suitable for fresher and new grads.\n- Experience: 0-1 years.\n- Role: SDE, Backend, Software Engineer, etc.\n\nCRITERIA (SKIP)\n- Experience: >2 years or senior titles (e.g., Lead, Manager).\n- Role: Non-dev (e.g., QA, Sales, HR, Support).\n\nPROTOCOL\nHalt immediately if blocked by a login wall\n\nOUTPUT\nReturn a result of all qualifying jobs in this format:\n\nName: Software Engineer \u2013 Entry Level,\nLink: https://lever.com/posts/abc123,\nReason: fresher-friendly, dev role, 0\u20131 yrs exp\n\nor\n\nNo jobs found for company X because...\n",
        "options": {
          "systemMessage": "## Persona\nYou are a specialized AI scout for finding fresher Software Development Engineer (SDE) roles in given data. You are efficient, precise, and security-conscious.\n\n## Core Directives\n1.  **Analyze:** Scrutinize job text for keywords, company reputation, and role relevance based on user criteria.\n2.  **Filter:** Aggressively discard senior positions, non-dev roles.\n3.  **Report:** Send valid findings like a message.",
          "maxIterations": 100,
          "returnIntermediateSteps": true
        }
      },
      "id": "77d091b0-6715-4455-bd6b-ae67127744d0",
      "name": "Decision Maker",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        2080,
        -304
      ],
      "retryOnFail": false,
      "typeVersion": 1.8,
      "waitBetweenTries": 5000,
      "onError": "continueRegularOutput"
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "typeVersion": 1,
      "position": [
        2064,
        -144
      ],
      "id": "dd9d358f-0bc8-4f9b-a04f-51e9e083a372",
      "name": "Decision Maker model",
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1.1,
      "position": [
        1856,
        64
      ],
      "id": "af2e29d4-22d5-43de-bec8-20f23f7f14ab",
      "name": "Wait1"
    },
    {
      "parameters": {
        "content": "## Poll",
        "height": 208,
        "width": 336,
        "color": 3
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1664,
        16
      ],
      "id": "51f3f97c-5259-4cef-b90e-ba7208f7fd9f",
      "name": "Sticky Note5"
    },
    {
      "parameters": {
        "content": "## Get JD Data",
        "height": 352,
        "width": 464,
        "color": 4
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        1536,
        -368
      ],
      "id": "f5a3a982-74d4-4745-8f45-e3bb28115ed6",
      "name": "Sticky Note7"
    },
    {
      "parameters": {
        "url": "https://api.brightdata.com/dca/dataset",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpBearerAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "id",
              "value": "={{ $json.collection_id }}"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "ADD_API_KEY"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1616,
        -272
      ],
      "id": "6cf07eb4-f407-43d8-ab73-a2ff77d0a218",
      "name": "Get JD Data",
      "credentials": {
        "httpBearerAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "loose",
            "version": 2
          },
          "conditions": [
            {
              "id": "d4499480-3eca-4d18-90c7-f83233113cae",
              "leftValue": "={{ $json.data }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              }
            }
          ],
          "combinator": "and"
        },
        "looseTypeValidation": true,
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1824,
        -272
      ],
      "id": "2b3a48a7-a5c2-4f6d-8659-48f2cec52fe2",
      "name": "If JD data exists",
      "alwaysOutputData": false
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "c9185c03-422e-4606-962c-14ff8db6f344",
              "name": "collection_id",
              "value": "={{ $('Scrape JD').item.json.collection_id }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        1696,
        64
      ],
      "id": "525307d3-96c2-48a9-9ef8-52ca36b010b1",
      "name": "Pass jd collection"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "6f7c66ef-c08f-45cc-9d0c-3a9407815719",
              "leftValue": "={{ $json.stdout }}",
              "rightValue": "[]",
              "operator": {
                "type": "string",
                "operation": "notStartsWith"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        1152,
        -256
      ],
      "id": "b2eac437-05d5-4cfa-86e1-4ef8c687db95",
      "name": "If"
    }
  ],
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Fetch Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Get Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Details": {
      "main": [
        [
          {
            "node": "Start Scrape",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Data": {
      "main": [
        [
          {
            "node": "If data exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Start Scrape": {
      "main": [
        [
          {
            "node": "Execute Job Scanner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If data exists": {
      "main": [
        [
          {
            "node": "Execute Command",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Pass collection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pass collection": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait": {
      "main": [
        [
          {
            "node": "Get Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape JD": {
      "main": [
        [
          {
            "node": "Get JD Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Command": {
      "main": [
        [
          {
            "node": "If",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Memory for high level": {
      "ai_memory": [
        [
          {
            "node": "Decision Maker",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Decision Maker": {
      "main": [
        [
          {
            "node": "Message Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Decision Maker model": {
      "ai_languageModel": [
        [
          {
            "node": "Decision Maker",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Get JD Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get JD Data": {
      "main": [
        [
          {
            "node": "If JD data exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If JD data exists": {
      "main": [
        [
          {
            "node": "Decision Maker",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Pass jd collection",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pass jd collection": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If": {
      "main": [
        [
          {
            "node": "Scrape JD",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "255f0ee7-162c-4f81-8ffd-5facc5a6e655",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "kZJ1icg8bnXDLcxF",
  "tags": []
}