Dev.to
7/9/2026

AI-Powered B2B Lead Scoring on Autopilot via Google Sheets & Gemini
Short summary
This tutorial shows how to build an automated B2B lead scoring system using Google Sheets and the Gemini API via Google Apps Script, replacing expensive legacy CRM tools like Pardot or Marketo. A scheduled hourly trigger sends each lead row to Gemini for semantic analysis against your ICP, returning a 0-100 score and a human-readable reasoning sentence in strict JSON format. The included code handles structured output enforcement, conditional cell formatting for VIP leads, and safe type preservation for downstream automation.
- •Automate B2B lead scoring in Google Sheets using Gemini API and Apps Script hourly triggers
- •Gemini's responseMimeType JSON mode ensures structured output without breaking spreadsheet schemas
- •High-scoring leads are auto-highlighted; each score includes a one-sentence AI-generated justification for sales reps
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



