{
  "name": "Job Follow-up Draft Starter",
  "nodes": [
    {
      "id": "1",
      "name": "Every Morning",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "days",
              "daysInterval": 1,
              "triggerAtHour": 8,
              "triggerAtMinute": 0
            }
          ]
        }
      }
    },
    {
      "id": "2",
      "name": "Get Applications",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        300,
        0
      ],
      "parameters": {
        "resource": "sheet",
        "operation": "read",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Applications"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Status",
              "lookupValue": "Applied"
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "3",
      "name": "7 Days Passed?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        600,
        0
      ],
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "typeValidation": "loose",
            "version": 2
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "c1",
              "leftValue": "={{ $now.diff(DateTime.fromISO($json['Applied on']), 'days').days }}",
              "rightValue": 7,
              "operator": {
                "type": "number",
                "operation": "gte"
              }
            }
          ]
        },
        "options": {}
      }
    },
    {
      "id": "4",
      "name": "Follow-up Draft",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        900,
        0
      ],
      "parameters": {
        "resource": "draft",
        "operation": "create",
        "subject": "=Follow-up: {{ $json['Role'] }} application",
        "message": "=Hello,\n\nI applied for the {{ $json['Role'] }} role at {{ $json['Company'] }} about a week ago and wanted to follow up politely on my application. I am still very interested in the role. Please let me know if you need anything more from my side.\n\nThank you,\n(your name)",
        "emailType": "text",
        "options": {
          "sendTo": "={{ $json['HR email'] }}"
        }
      }
    },
    {
      "id": "5",
      "name": "Mark Followed Up",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        1200,
        0
      ],
      "parameters": {
        "resource": "sheet",
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Applications"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Company": "={{ $('7 Days Passed?').item.json['Company'] }}",
            "Status": "Followed up"
          },
          "matchingColumns": [
            "Company"
          ],
          "schema": []
        },
        "options": {}
      }
    }
  ],
  "connections": {
    "Every Morning": {
      "main": [
        [
          {
            "node": "Get Applications",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Applications": {
      "main": [
        [
          {
            "node": "7 Days Passed?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7 Days Passed?": {
      "main": [
        [
          {
            "node": "Follow-up Draft",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Follow-up Draft": {
      "main": [
        [
          {
            "node": "Mark Followed Up",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}