{
  "name": "Auto_Data_ML_Job_Application_v1",
  "nodes": [
    {
      "id": "1",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.cron",
      "parameters": {
        "mode": "everyDay",
        "hour": 8,
        "minute": 0
      }
    },
    {
      "id": "2",
      "name": "Fetch Jobs",
      "type": "n8n-nodes-base.httpRequest",
      "parameters": {
        "url": "https://api.jobright.ai/jobs/search",
        "method": "GET",
        "queryParametersUi": {
          "parameter": [
            {
              "name": "keywords",
              "value": "Senior Data Engineer, Machine Learning Engineer, Data Scientist"
            },
            {
              "name": "remote",
              "value": "true"
            },
            {
              "name": "visa",
              "value": "H1B likely"
            },
            {
              "name": "daysAgo",
              "value": "7"
            }
          ]
        },
        "options": {
          "responseFormat": "json"
        }
      },
      "credentials": {
        "httpBasicAuth": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "3",
      "name": "GPT-5 Tailoring",
      "type": "n8n-nodes-base.openAi",
      "parameters": {
        "model": "gpt-5",
        "prompt": "You are ResumeGPT, an AI job assistant for Salman Shaik (Senior Data/ML Engineer). Analyze each job description and output JSON with {summary, bullets[5], recruiter_email}.",
        "input": "={{$json[\"jobResult\"][\"jobSummary\"]}}",
        "responseFormat": "json"
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "4",
      "name": "Apply Logic",
      "type": "n8n-nodes-base.if",
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"applyLink\"]}}",
              "operation": "contains",
              "value2": "greenhouse.io"
            },
            {
              "value1": "={{$json[\"applyLink\"]}}",
              "operation": "contains",
              "value2": "lever.co"
            }
          ]
        }
      }
    },
    {
      "id": "5",
      "name": "Send Email",
      "type": "n8n-nodes-base.gmail",
      "parameters": {
        "fromEmail": "salman.sid1007@gmail.com",
        "subject": "Application for {{$json[\"jobTitle\"]}}",
        "message": "={{$json[\"recruiter_email\"]}}",
        "attachments": [
          "/path/to/salmanshaikDE.pdf"
        ]
      },
      "credentials": {
        "gmailOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "6",
      "name": "Log to Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "parameters": {
        "operation": "append",
        "sheetName": "Job tracker",
        "fields": "Date, Job Title, Company, Source, Link, Status",
        "options": {
          "data": [
            {
              "Date": "={{$now}}",
              "Job Title": "={{$json[\"jobTitle\"]}}",
              "Company": "={{$json[\"companyName\"]}}",
              "Source": "={{$json[\"companyURL\"]}}",
              "Link": "={{$json[\"applyLink\"]}}",
              "Status": "Applied"
            }
          ]
        }
      },
      "credentials": {
        "googleApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "id": "7",
      "name": "Slack Summary",
      "type": "n8n-nodes-base.slack",
      "parameters": {
        "channel": "#job-alerts",
        "text": "\u2705 Applied to {{$json[\"jobTitle\"]}} at {{$json[\"companyName\"]}}. Next run scheduled for tomorrow 8 AM."
      },
      "credentials": {
        "slackApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Daily Trigger": {
      "main": [
        [
          {
            "node": "Fetch Jobs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Jobs": {
      "main": [
        [
          {
            "node": "GPT-5 Tailoring",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "GPT-5 Tailoring": {
      "main": [
        [
          {
            "node": "Apply Logic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Apply Logic": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log to Sheet",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Slack Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}