Skip to main content
AltFTool original, tested in n8nLead GenerationCRM

Lead capture form with data cleanup and scoring - n8n workflow template

The n8n Form Trigger hosts a "Request a callback" form for you, with fields for name, email, company, phone, budget and a message. No external form tool is needed. Each submission goes through a Code node that tidies the data before it reaches your CRM: names are trimmed and…

Written and tested by AltFTool

Starts on
Form submission
Nodes
6 nodes
Level
Beginner
Setup
About 5 min

Workflow preview

How this workflow runs

  1. 1

    Lead form

    Starts the workflow from a public form submission, capturing the submitted fields.

  2. 2

    Clean and score lead

    Runs custom JavaScript to transform or manipulate the data flowing through the workflow.

  3. 3

    Business email?

    Branches the workflow based on a true/false condition.

  4. 4

    Mark as qualified

    Sets or transforms workflow data — prepares, renames, or injects fields before the next step.

  5. 5

    Mark for review

    Sets or transforms workflow data — prepares, renames, or injects fields before the next step.

  6. 6

    Save lead to Google Sheets

    Reads from or writes rows to a Google Sheets spreadsheet.

Overview and setup

How it works

The n8n Form Trigger hosts a "Request a callback" form for you, with fields for name, email, company, phone, budget and a message. No external form tool is needed.

Each submission goes through a Code node that tidies the data before it reaches your CRM: names are trimmed and title-cased (including names such as O'Neil-Smith), emails are lower-cased, phone numbers are reduced to digits with an optional leading plus, and the company name is guessed from the email domain when it is left blank. The node also flags free email providers and gives every lead a simple score out of 100 based on email type, company, phone and budget.

An IF node marks business-email leads as qualified and the rest as review, then both paths meet at an optional Google Sheets node.

Set up steps

  1. Import the workflow and open Lead form to see the test URL.
  2. Click Execute workflow, fill in the form and look at Clean and score lead.
  3. Optional: enable Save lead to Google Sheets, connect your Google account, choose a spreadsheet and create a Leads tab with matching headers.
  4. Activate the workflow to publish the form at its production URL.

Customise it

  • Add or rename form fields, then update the field names in the Code node.
  • Adjust the scoring weights or the free-mail list.
  • Replace Google Sheets with a CRM node such as HubSpot or Pipedrive, or send qualified leads to a sales channel.

n8n nodes used (5 types)

What every node does (6)
  • Lead form (Form Trigger)Starts the workflow from a public form submission, capturing the submitted fields.
  • Clean and score lead (Code)Runs custom JavaScript to transform or manipulate the data flowing through the workflow.
  • Business email? (If)Branches the workflow based on a true/false condition.
  • Mark as qualified (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Mark for review (Set)Sets or transforms workflow data — prepares, renames, or injects fields before the next step.
  • Save lead to Google Sheets (Google Sheets)Reads from or writes rows to a Google Sheets spreadsheet.

FAQ

Lead capture form with data cleanup and scoring: questions

How do I import the "Lead capture form with data cleanup and scoring" workflow into n8n?

Copy the workflow JSON from this page, open the n8n editor, click on an empty canvas and paste with Ctrl+V (Cmd+V on macOS). You can also download the .json file and choose Import from File in the workflow menu. Save the workflow, then attach credentials before activating it.

Which nodes and credentials does "Lead capture form with data cleanup and scoring" use?

It uses Form Trigger, Code, If, Set and Google Sheets. Any node that connects to an external service needs your own credential — open each node after import and select or create one. Trigger, logic and transformation nodes usually need no credentials.

Can it run on n8n Cloud and on self-hosted n8n?

The workflow format is the same on both. If a node appears as unknown or outdated after import, update n8n to a recent version or, on self-hosted instances, install the required community node package. Features such as $env access are available on self-hosted instances only.

How can I customise "Lead capture form with data cleanup and scoring"?

Start by changing the trigger (schedule, webhook or app event) and the destination nodes to match your stack — it is listed under Lead Generation, CRM. Edit prompts, field mappings and filters in the relevant nodes, use expressions like {{ $json.field }} to map data, and test with a manual execution before activating.

n8n is a trademark of n8n GmbH. AltFTool is not affiliated with, endorsed by or sponsored by n8n. Community templates are credited to their creators and link to the original listing; AltFTool originals are written and tested by the AltFTool team.