{
  "name": "Score New Salesforce Leads With AI and Surface the Hot Ones in Slack",
  "nodes": [
    {
      "name": "Salesforce — New Lead",
      "type": "n8n-nodes-base.salesforce",
      "typeVersion": 1,
      "parameters": {
        "operation": "getAll"
      },
      "notes": "Trigger on new leads.",
      "position": [
        260,
        300
      ]
    },
    {
      "name": "Score Lead",
      "type": "n8n-nodes-base.openAi",
      "typeVersion": 1,
      "parameters": {
        "resource": "text",
        "operation": "message",
        "modelId": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "user",
              "content": "Score this lead 0-100 against our ICP and give a one-line rationale as JSON: {{ $json }}"
            }
          ]
        }
      },
      "notes": "Swap in Anthropic or any LLM node if you prefer.",
      "position": [
        500,
        300
      ]
    },
    {
      "name": "Salesforce — Update Score",
      "type": "n8n-nodes-base.salesforce",
      "typeVersion": 1,
      "parameters": {
        "operation": "update"
      },
      "notes": "Write lead_score back to the record.",
      "position": [
        740,
        300
      ]
    },
    {
      "name": "Notify Slack",
      "type": "n8n-nodes-base.slack",
      "typeVersion": 2,
      "parameters": {
        "text": "=🔥 Hot lead ({{ $json.score }}): {{ $json.email }}"
      },
      "notes": "Connect this channel's credential.",
      "position": [
        980,
        300
      ]
    },
    {
      "name": "Respond / Finish",
      "type": "n8n-nodes-base.noOp",
      "typeVersion": 1,
      "parameters": {},
      "notes": "End of flow — extend with extra steps as needed.",
      "position": [
        1220,
        300
      ]
    }
  ],
  "connections": {
    "Salesforce — New Lead": {
      "main": [
        [
          {
            "node": "Score Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Score Lead": {
      "main": [
        [
          {
            "node": "Salesforce — Update Score",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Salesforce — Update Score": {
      "main": [
        [
          {
            "node": "Notify Slack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Slack": {
      "main": [
        [
          {
            "node": "Respond / Finish",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
