Capture and clean inbound web form leads with an authenticated webhook

Go to Workflow
0 views
Built by PERLY PERLY
Created on July 16, 2026

Description

Quick overview
This workflow receives inbound web form submissions via an n8n webhook, validates requests using a shared secret header, and cleans and standardizes lead fields (name, email, message, timestamps) so you can reliably pass a structured record into your CRM.

How it works
Receives a POST request from your web form via an n8n webhook endpoint.
Validates the request by checking the x-perly-key header against the PERLY_WEBHOOK_SECRET variable and rejects unauthorized traffic.
Normalizes the lead payload by trimming values, lowercasing the email, splitting the full name into first/last name, validating the email format, and adding a received timestamp.
Hands off the cleaned lead record to a placeholder step where you connect your CRM or storage destination.

Setup
Set PERLY_WEBHOOK_SECRET as an environment variable (self-hosted) or as an n8n Variable (n8n Cloud).
Copy the webhook URL from the Webhook trigger and configure your form to POST to it with the header x-perly-key: .
Replace the placeholder “Connect your CRM here” step with your desired integration (for example HubSpot, Pipedrive, Airtable, or Google Sheets) and map the cleaned fields.

Requirements
n8n (Cloud or self-hosted). No external service, API key or AI credits needed.

Customization
All cleaning rules live in a single Code node, so you can add fields, change the normalisation or plug in your own validation without touching the rest of the flow.

Nodes Used (2)

Code
n8n-nodes-base.code
Google Sheets
n8n-nodes-base.googleSheets