AutomationFlowsMarketing & Ads › Lead Scoring: Punteggio E Priorita' Automatici

Lead Scoring: Punteggio E Priorita' Automatici

02 - Lead scoring: punteggio e priorita' automatici. Uses googleSheets, telegram. Scheduled trigger; 8 nodes.

Cron / scheduled trigger★★★★☆ complexity8 nodesGoogle SheetsTelegram
Marketing & Ads Trigger: Cron / scheduled Nodes: 8 Complexity: ★★★★☆ Added:

This workflow follows the Google Sheets → Telegram recipe pattern — see all workflows that pair these two integrations.

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": "02 - Lead scoring: punteggio e priorita' automatici",
  "nodes": [
    {
      "parameters": {
        "content": "## 02 - Lead scoring: punteggio e priorita' automatici\n\nGira ogni ora sul foglio *Lead* riempito dal workflow 01, assegna a ogni nuovo lead un\npunteggio 0-100 e una priorita', riscrive le due colonne sul foglio e ti avvisa su\nTelegram solo quando arriva un lead ad alta priorita'.\n\n**Setup (5 min):**\n1. Aggiungi al foglio *Lead* due colonne: `punteggio` e `priorita`\n2. Collega le credenziali Google Sheets e Telegram (le stesse del workflow 01)\n3. Sostituisci `INSERISCI_ID_GOOGLE_SHEET` e `INSERISCI_CHAT_ID`\n4. Attiva il workflow\n\n**Come si calcola il punteggio:** email su dominio aziendale +30, sito indicato +25,\nazienda indicata +20, descrizione azienda trovata online +15, canale diverso dal form +10.\nDa 60 in su la priorita' e' alta, da 30 a 59 media, sotto 30 bassa.\nI pesi sono nel nodo *Calcola punteggio*: cambiali come vuoi, sono cinque righe.",
        "width": 540,
        "height": 340
      },
      "id": "3f1a6c02-77b1-4a2e-9d4c-1c9a0b5e7a11",
      "name": "Nota setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -780,
        -260
      ]
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours",
              "hoursInterval": 1
            }
          ]
        }
      },
      "id": "5c2d90b4-1e77-4a03-8b6f-2d51c7a94e22",
      "name": "Ogni ora",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -780,
        120
      ]
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "INSERISCI_ID_GOOGLE_SHEET"
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Lead"
        },
        "options": {}
      },
      "id": "8a4e11c9-0b63-4c78-9a15-63f0d2b8c733",
      "name": "Leggi lead dal CRM",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -560,
        120
      ]
    },
    {
      "parameters": {
        "jsCode": "// Calcola un punteggio 0-100 per ogni lead e assegna una priorita'.\n// Salta i lead che hanno gia' un punteggio: cosi' il workflow puo' girare ogni ora\n// senza riscrivere righe gia' lavorate.\n\nconst domini_gratuiti = [\n  'gmail.com', 'libero.it', 'hotmail.com', 'hotmail.it', 'outlook.com', 'outlook.it',\n  'yahoo.com', 'yahoo.it', 'live.it', 'alice.it', 'tiscali.it', 'virgilio.it', 'icloud.com'\n];\n\nconst risultati = [];\n\nfor (const item of $input.all()) {\n  const lead = item.json;\n\n  const gia_lavorato = String(lead.punteggio ?? '').trim() !== '';\n  if (gia_lavorato) continue;\n\n  const email = String(lead.email ?? '').trim().toLowerCase();\n  if (!email.includes('@')) continue;\n\n  const dominio = email.split('@')[1] || '';\n  const azienda = String(lead.azienda ?? '').trim();\n  const sito = String(lead.sito ?? '').trim();\n  const descrizione = String(lead.descrizione_azienda ?? '').trim();\n  const fonte = String(lead.fonte ?? '').trim().toLowerCase();\n\n  let punteggio = 0;\n  const motivi = [];\n\n  if (dominio && !domini_gratuiti.includes(dominio)) {\n    punteggio += 30;\n    motivi.push('email aziendale');\n  }\n  if (sito) {\n    punteggio += 25;\n    motivi.push('sito indicato');\n  }\n  if (azienda) {\n    punteggio += 20;\n    motivi.push('azienda indicata');\n  }\n  if (descrizione.length >= 40) {\n    punteggio += 15;\n    motivi.push('azienda riconosciuta online');\n  }\n  if (fonte && fonte !== 'form-sito') {\n    punteggio += 10;\n    motivi.push('canale ' + fonte);\n  }\n\n  if (punteggio > 100) punteggio = 100;\n\n  let priorita = 'bassa';\n  if (punteggio >= 60) priorita = 'alta';\n  else if (punteggio >= 30) priorita = 'media';\n\n  risultati.push({\n    json: {\n      email: email,\n      nome: String(lead.nome ?? '').trim(),\n      azienda: azienda,\n      sito: sito,\n      punteggio: punteggio,\n      priorita: priorita,\n      motivi: motivi.join(', ') || 'nessun segnale forte'\n    }\n  });\n}\n\nreturn risultati;\n"
      },
      "id": "b6c7f230-4d9a-41e5-ae02-7c14b9e5d844",
      "name": "Calcola punteggio",
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -320,
        120
      ]
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "INSERISCI_ID_GOOGLE_SHEET"
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "Lead"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "email": "={{ $json.email }}",
            "punteggio": "={{ $json.punteggio }}",
            "priorita": "={{ $json.priorita }}"
          },
          "matchingColumns": [
            "email"
          ],
          "schema": []
        },
        "options": {}
      },
      "id": "c1d8a475-92fb-4f61-b3ad-08e6c2a17955",
      "name": "Aggiorna punteggio sul Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -80,
        120
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": false,
            "leftValue": "",
            "typeValidation": "loose"
          },
          "conditions": [
            {
              "id": "d9e0b311-5a26-4f70-9c88-41b7e3a20d66",
              "leftValue": "={{ $json.priorita }}",
              "rightValue": "alta",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "e2f5c847-6b19-4a33-82de-95c0f1a4b877",
      "name": "Lead caldo?",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2.2,
      "position": [
        160,
        120
      ]
    },
    {
      "parameters": {
        "chatId": "INSERISCI_CHAT_ID",
        "text": "=Lead ad alta priorita'\nNome: {{ $json.nome || '-' }}\nAzienda: {{ $json.azienda || '-' }}\nEmail: {{ $json.email }}\nPunteggio: {{ $json.punteggio }}/100\nPerche': {{ $json.motivi }}",
        "additionalFields": {}
      },
      "id": "f4a2b968-3c50-4d81-b7e6-2a83d5c09188",
      "name": "Avviso lead caldo",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        400,
        20
      ]
    },
    {
      "parameters": {},
      "id": "a7b3d054-8e21-4c96-9f43-6b02e7a1c399",
      "name": "Solo registrato (nessun avviso)",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "position": [
        400,
        240
      ]
    }
  ],
  "connections": {
    "Ogni ora": {
      "main": [
        [
          {
            "node": "Leggi lead dal CRM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Leggi lead dal CRM": {
      "main": [
        [
          {
            "node": "Calcola punteggio",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Calcola punteggio": {
      "main": [
        [
          {
            "node": "Aggiorna punteggio sul Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggiorna punteggio sul Sheet": {
      "main": [
        [
          {
            "node": "Lead caldo?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Lead caldo?": {
      "main": [
        [
          {
            "node": "Avviso lead caldo",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Solo registrato (nessun avviso)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "tags": []
}
Pro

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

About this workflow

02 - Lead scoring: punteggio e priorita' automatici. Uses googleSheets, telegram. Scheduled trigger; 8 nodes.

Source: https://github.com/dabiH2/Automazioni-n8n/blob/main/02-lead-scoring-priorita.json — original creator credit. Request a take-down →

More Marketing & Ads workflows → · Browse all categories →

Related workflows

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

Marketing & Ads

This automation creates a seamless daily pipeline that: Pulls yesterday's website visitors from Leadfeeder Enriches company data using Apollo.io's powerful database Delivers enriched leads to your Goo

HTTP Request, Google Sheets, Error Trigger +1
Marketing & Ads

Description

Google Sheets, Telegram
Marketing & Ads

Who is this for? Solo founders, sales teams, and event organizers who need email outreach without expensive tools but want full control from Telegram.

Telegram, Google Sheets, Google Sheets Trigger +2
Marketing & Ads

This workflow runs on scheduled weekly and monthly triggers to generate unified marketing performance reports. It processes multiple websites by collecting analytics data, paid ads performance, and CR

Gmail, Google Sheets, Google Analytics +3
Marketing & Ads

This workflow automates the daily backfill of Google Analytics 4 (GA4) data into BigQuery. It fetches 13 essential pre-processed reports (including User Acquisition, Traffic, and E-commerce) and uploa

Google Analytics, Google BigQuery, Telegram