Score inbound leads with OpenAI and log them to Google Sheets and Slack

Go to Workflow
0 views
Built by Bincy Bhanu. S Bincy Bhanu. S
Created on October 10, 2026

Description

Quick overview
This workflow receives inbound leads via a webhook, scores and categorizes them with OpenAI, logs every lead to Google Sheets, and sends a Slack alert for leads that meet or exceed a configurable score threshold.

How it works
Receives a lead submission via an HTTP POST webhook.
Normalizes the incoming payload to the expected lead fields (name, email, company, message) and applies workflow configuration values like the score threshold and target destinations.
Sends the lead details to the OpenAI Chat Completions API to generate a JSON score (0–100), tier (hot/warm/cold), and a short reason, continuing even if the API call fails.
Parses and validates the OpenAI response (or falls back to an unscored default), adds a timestamp, and prepares the final lead record.
Appends the lead record to a Google Sheets spreadsheet.
If the score meets the configured threshold, posts a hot-lead alert message to a Slack channel; otherwise, it ends without sending an alert.

Setup
Create a Google Sheet with a tab (for example, “Leads”) that includes columns for name, email, company, message, score, tier, reason, and receivedAt.
Add credentials for OpenAI, Google Sheets (OAuth2), and Slack.
In the workflow configuration values, set your Google Sheet ID, sheet/tab name, Slack channel, OpenAI model, and the hot lead score threshold.
Copy the webhook URL from n8n and configure your form/tool to POST lead submissions to that endpoint.

This workflow was created by Bincy Bhanu. S and shared publicly on the n8n community template library. n8nFind indexes it for discovery — the workflow remains the property of its original creator.

Nodes Used (4)

Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
Slack
n8n-nodes-base.slack