Daily list of leads going cold, on Slack

Every workday, post the open leads nobody has contacted for 3+ days, grouped by salesperson.

Easy Saves ~3 hours/month Sales & CRMBy Flowngn team

Works with n8n · Make · Zapier

How it works

Trigger: Schedule — weekdays at 9:00
  1. Read the Leads sheet (name, company, owner, stage, last contact).
  2. Keep open leads with no contact for 3 days or more.
  3. Post the list to Slack, grouped by owner, oldest first.

Diagram

Weekdays 9:00Schedule TriggerGRead leadsGoogle Sheets{ }Leads going coldCodeSPost to salesSlack
Trigger App Code

Code

JavaScript used in the Code step — already included in the template below.

Leads going cold · Code node
// Leads sheet columns: name | company | phone | email | owner | stage | last_contact (YYYY-MM-DD)
// Lists open leads nobody has contacted for 3+ days, grouped by owner.
const DAY = 24 * 60 * 60 * 1000;
const CLOSED = ["won", "lost"];

const stale = $input.all()
  .map((item) => item.json)
  .filter((l) => !CLOSED.includes(String(l.stage).toLowerCase()))
  .map((l) => ({ ...l, days: l.last_contact ? Math.floor((Date.now() - new Date(l.last_contact)) / DAY) : null }))
  .filter((l) => l.days === null || l.days >= 3)
  .sort((a, b) => (b.days ?? Infinity) - (a.days ?? Infinity));

if (!stale.length) return [];

const byOwner = {};
for (const l of stale) (byOwner[l.owner || "Unassigned"] ||= []).push(l);

const message = Object.entries(byOwner)
  .map(([owner, leads]) =>
    `*${owner}*\n` +
    leads.map((l) => `• ${l.name}${l.company ? ` (${l.company})` : ""}: ${l.stage}, ${l.days === null ? "never contacted" : `${l.days} days ago`}`).join("\n"))
  .join("\n\n");

return [{ json: { count: stale.length, message } }];

Build it

Pick your tool — same automation, step by step.

Copy and paste straight into an n8n canvas (Ctrl+V), or download and use Import from File. Then connect your own credentials and replace every YOUR_… placeholder.

Workflow JSON
Show code (140 lines)
{
  "name": "Daily list of leads going cold, on Slack (Flowngn)",
  "nodes": [
    {
      "parameters": {
        "content": "## Daily list of leads going cold, on Slack\nEvery workday, post the open leads nobody has contacted for 3+ days, grouped by salesperson.\n\n**Setup**\n1. Open each node and connect your own credentials.\n2. Replace every YOUR_… placeholder.\n3. Test once, then activate.\n\nFree template from Flowngn",
        "height": 260,
        "width": 340
      },
      "id": "458223d5-3782-4a17-a45a-6fb8fafe73d6",
      "name": "Setup notes",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -420,
        -60
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 9 * * 0-4"
            }
          ]
        }
      },
      "id": "458223d5-3782-4a17-a45a-6fb8fafe73d6",
      "name": "Weekdays 9:00",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "operation": "read",
        "documentId": {
          "__rl": true,
          "value": "YOUR_SPREADSHEET_ID",
          "mode": "id"
        },
        "sheetName": {
          "__rl": true,
          "value": "Leads",
          "mode": "name"
        },
        "options": {}
      },
      "id": "458223d5-3782-4a17-a45a-6fb8fafe73d6",
      "name": "Read leads",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        300,
        0
      ]
    },
    {
      "parameters": {
        "jsCode": "// Leads sheet columns: name | company | phone | email | owner | stage | last_contact (YYYY-MM-DD)\n// Lists open leads nobody has contacted for 3+ days, grouped by owner.\nconst DAY = 24 * 60 * 60 * 1000;\nconst CLOSED = [\"won\", \"lost\"];\n\nconst stale = $input.all()\n  .map((item) => item.json)\n  .filter((l) => !CLOSED.includes(String(l.stage).toLowerCase()))\n  .map((l) => ({ ...l, days: l.last_contact ? Math.floor((Date.now() - new Date(l.last_contact)) / DAY) : null }))\n  .filter((l) => l.days === null || l.days >= 3)\n  .sort((a, b) => (b.days ?? Infinity) - (a.days ?? Infinity));\n\nif (!stale.length) return [];\n\nconst byOwner = {};\nfor (const l of stale) (byOwner[l.owner || \"Unassigned\"] ||= []).push(l);\n\nconst message = Object.entries(byOwner)\n  .map(([owner, leads]) =>\n    `*${owner}*\\n` +\n    leads.map((l) => `• ${l.name}${l.company ? ` (${l.company})` : \"\"}: ${l.stage}, ${l.days === null ? \"never contacted\" : `${l.days} days ago`}`).join(\"\\n\"))\n  .join(\"\\n\\n\");\n\nreturn [{ json: { count: stale.length, message } }];"
      },
      "id": "458223d5-3782-4a17-a45a-6fb8fafe73d6",
      "name": "Leads going cold",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        600,
        0
      ]
    },
    {
      "parameters": {
        "select": "channel",
        "channelId": {
          "__rl": true,
          "value": "#sales",
          "mode": "name"
        },
        "text": "=🧊 {{ $json.count }} leads need a follow-up today:\n\n{{ $json.message }}",
        "otherOptions": {}
      },
      "id": "458223d5-3782-4a17-a45a-6fb8fafe73d6",
      "name": "Post to sales",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2.2,
      "position": [
        900,
        0
      ]
    }
  ],
  "connections": {
    "Weekdays 9:00": {
      "main": [
        [
          {
            "node": "Read leads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Read leads": {
      "main": [
        [
          {
            "node": "Leads going cold",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Leads going cold": {
      "main": [
        [
          {
            "node": "Post to sales",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "tags": []
}

Open in the playground to edit →

Tips

  • Change the 3-day limit in the Code step to suit your sales cycle.

Related flows