Skip to main content

Capture and score leads with SQL Server and Slack alerts

Workflow preview

Workflow preview
100%
Capture and score leads with SQL Server and Slack alerts preview
Open on n8n.io

1. Workflow Overview

Store leads in a SQL Server database via REST API with automatic scoring and Slack notifications. This workflow receives leads from web forms, validates email addresses, normalizes data from multip...

Best for

  • Lead Generation automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook, n8n-nodes-base.httprequest, n8n-nodes-base.switch, n8n-nodes-base.slack

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Manu.

Original n8n.io source

1.1 Workflow description

Title
Capture and score leads with SQL Server and Slack alerts
Workflow name
Capture and score leads with SQL Server and Slack alerts

Store leads in a SQL Server database via REST API with automatic scoring and Slack notifications.

This workflow receives leads from web forms, validates email addresses, normalizes data from multiple formats (Typeform, Webflow, custom forms), and stores contacts in SQL Server via REST API. It calculates a lead score from 0-100 based on data completeness and engagement signals, then routes high-scoring leads (70+) to Slack for immediate follow-up.

WORKFLOW PATHS: Valid lead: Webhook receives data → Normalize and validate → Store in SQL Server → Calculate score → Send Slack alert if hot → Return success response with contact ID Invalid email: Webhook receives data → Validation fails → Return 400 error response Workflow error: Any node fails → Error trigger → Send Slack alert with details

SETUP REQUIREMENTS: HTTP Header Auth credential with API key and base URL Slack credential for notifications (optional) SQL Server database with provided schema (3 tables, 6 stored procedures) Webhook URL added to your forms

CUSTOMIZATION: Lead scoring algorithm is editable in the "Calculate Lead Score" code node. Adjust points for email (10), full name (10), phone (10), company (10), high-value source (30), medium source (15), detailed message (15), and repeat visitor (15).

Slack message format is customizable in the "Format Slack Alert" code node.

This workflow is designed for teams that need to capture leads from multiple sources, store data in their own database, automatically qualify leads, and alert sales teams when high-quality leads arrive.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Overview

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Data validation

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Webhook - Lead Capture

Type / Role
n8n-nodes-base.webhook - webhook
Config choices
Version 1

Block 4 - Normalize Lead Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 5 - IF - Valid Email

Type / Role
n8n-nodes-base.if - if
Config choices
Version 1

Block 6 - Format Error Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Respond - Validation Error

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 8 - Database operations

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Prepare API Body

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - API - Upsert Contact

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4

Block 11 - Lead scoring and routing

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Calculate Lead Score

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - Score Router

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 2

Block 14 - Format Slack Alert

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Slack - Hot Lead Alert

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2

Block 16 - API - Update Score (Hot)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4

Block 17 - API - Update Score (Warm)

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4

Block 18 - Log Cold Lead

Type / Role
n8n-nodes-base.noOp - noOp
Config choices
Version 1

Block 19 - Webhook response

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 20 - Format Success Response

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 21 - Respond - Success

Type / Role
n8n-nodes-base.respondToWebhook - respondToWebhook
Config choices
Version 1

Block 22 - Error handling

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 23 - Error Trigger

Type / Role
n8n-nodes-base.errorTrigger - errorTrigger
Config choices
Version 1

Block 24 - Format Error

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Showing the first 24 of 25 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Capture and score leads with SQL Server and Slack alerts
Complexity advanced
Nodes 25
Categories Lead Generation, AI Summarization
Author Manu
Published 28 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13074/13074.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Capture and score leads with SQL Server and Slack alerts do?

Store leads in a SQL Server database via REST API with automatic scoring and Slack notifications. This workflow receives leads from web forms, validates email addresses, normalizes data from multip...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Lead Generation, AI Summarization use case.