AutomationFlowsGeneral › Jobsearch Stale Alert

Jobsearch Stale Alert

JobSearch Stale Alert. Uses executeCommand, emailSend. Scheduled trigger; 4 nodes.

Cron / scheduled trigger★★★★☆ complexity4 nodesExecute CommandEmail Send
General Trigger: Cron / scheduled Nodes: 4 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "JobSearch Stale Alert",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 6
            }
          ]
        }
      },
      "id": "schedule-trigger",
      "name": "Every 6 Hours",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "command": "jobsearch list --status=stale --output=json"
      },
      "id": "get-stale",
      "name": "Get Stale Conversations",
      "type": "n8n-nodes-base.executeCommand",
      "typeVersion": 1,
      "position": [
        220,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "const stale = JSON.parse($input.item.json.stdout || '[]');\n\n// Filter to only conversations that became stale recently (within last 6 hours)\n// This prevents repeated alerts for the same conversation\nconst now = new Date();\nconst sixHoursAgo = new Date(now - 6 * 60 * 60 * 1000);\n\nconst newlyStale = stale.filter(c => {\n  const lastActivity = new Date(c.last_activity_at);\n  const staleDays = 7; // matches config\n  const staleDate = new Date(lastActivity.getTime() + staleDays * 24 * 60 * 60 * 1000);\n  return staleDate >= sixHoursAgo && staleDate <= now;\n});\n\nif (newlyStale.length === 0) {\n  return []; // No output means workflow stops here\n}\n\nreturn newlyStale.map(c => ({\n  json: {\n    company: c.company,\n    recruiter: c.recruiter_name || 'Unknown',\n    lastActivity: c.last_activity_at,\n    subject: `Stale Alert: ${c.company} needs follow-up`,\n    body: `Your conversation with ${c.company}${c.recruiter_name ? ` (${c.recruiter_name})` : ''} has gone stale.\\n\\nLast activity: ${c.last_activity_at}\\n\\nConsider sending a follow-up message.`\n  }\n}));"
      },
      "id": "check-newly-stale",
      "name": "Check Newly Stale",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        440,
        0
      ]
    },
    {
      "parameters": {
        "fromEmail": "jobsearch@example.com",
        "toEmail": "you@example.com",
        "subject": "={{ $json.subject }}",
        "text": "={{ $json.body }}"
      },
      "id": "send-alert",
      "name": "Send Alert",
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        660,
        0
      ],
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Every 6 Hours": {
      "main": [
        [
          {
            "node": "Get Stale Conversations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Stale Conversations": {
      "main": [
        [
          {
            "node": "Check Newly Stale",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Newly Stale": {
      "main": [
        [
          {
            "node": "Send Alert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

JobSearch Stale Alert. Uses executeCommand, emailSend. Scheduled trigger; 4 nodes.

Source: https://github.com/vijay-prabhu/jobsearch-mcp/blob/debc745522f8daa8a15cebf66b14e377ea1b7605/workflows/stale-alert.json — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

Complete backup solution that saves both workflows and credentials to local/server disk with optional FTP upload for off-site redundancy.

Read Write File, Email Send, Execute Command +3
General

IA Leilão Imóveis - Automação Semanal. Uses executeCommand, emailSend. Scheduled trigger; 8 nodes.

Execute Command, Email Send
General

Perfect for content publishing with organic scheduling patterns, social media automation, API systems that need to avoid rate limiting, or any automation requiring randomised timing control across mul

n8n, Read Write File, Stop And Error +1
General

Perfect for disaster recovery or migrating between environments, this workflow automatically identifies your most recent FTP backup and provides a manual restore capability that intelligently excludes

Email Send, Ftp, Read Write File +2
General

Perfect for disaster recovery or migrating between environments, this workflow automatically identifies your most recent backup and provides a manual restore capability that intelligently excludes the

Email Send, Execute Command, Stop And Error