A portfolio-ready automation system built with n8n, Airtable, Telegram Bot API and webhooks. It receives incoming lead data, normalizes and validates it, prevents duplicates, stores clean records, logs operational events and sends Telegram notifications for new valid leads.
A lightweight CRM intake pipeline for service businesses that need reliable lead capture without manual duplicate checking or missed notifications.
Incoming leads often need to be copied into a CRM manually, which creates delays and inconsistent data quality.
Repeated submissions can create multiple records for the same contact unless the system checks normalized identifiers.
Without operational logs, it is difficult to know which requests succeeded, failed validation, or were rejected as duplicates.
The workflow accepts a JSON webhook request, cleans the data, validates required fields, checks Airtable for existing leads, writes clean records, logs every outcome and sends focused Telegram notifications only for new valid leads.
Email is required before the lead can enter the CRM. Invalid submissions are logged and rejected with a structured JSON response.
Email values are trimmed and converted to lowercase before lookup, preventing duplicate records caused by casing or whitespace.
Telegram alerts are sent only for actionable new leads. Duplicates and validation errors are logged without creating notification noise.
The main workflow branches into success, duplicate and validation-error paths. A separate error handler workflow catches unexpected workflow failures. Click any stage to inspect it.
The signal flows Webhook → Validate, then branches to Create + Telegram on success, or Log · reject on failure.
Receive Lead Webhook → Normalize Lead Data → Validate Email Exists → Search Existing Lead by Email → Check Duplicate Found → Create Lead in Airtable → Log Successful Lead Creation → Notify New Lead via Telegram → Respond Success.
If an existing Airtable record is found by normalized email, the workflow writes a duplicate log and returns a duplicate JSON response. No new lead record is created and no Telegram notification is sent.
If email is missing after normalization, the workflow writes a missing_email log and returns an error JSON response. No CRM lead is created.
A separate workflow uses an Error Trigger and writes workflow_error events to the Automation_Logs table when the main workflow fails unexpectedly.
Two Airtable tables separate business data from operational history.
| Field | Purpose |
|---|---|
| Name | Lead contact name |
| Normalized lookup identifier | |
| Phone | Contact number |
| Business Category | Lead business type |
| City | Lead location |
| Message | Original request context |
| Created At | Automatic timestamp |
| Field | Purpose |
|---|---|
| Status | success / duplicate / error |
| Related normalized email | |
| Name | Lead name when available |
| Event Type | lead_created, duplicate_lead, missing_email, workflow_error |
| Message | Human-readable event detail |
| Source | webhook or n8n_error_trigger |
The workflow reads incoming values from the webhook body and maps them into clean internal fields.
The system was verified with the production webhook endpoint, not the manual test endpoint.
| Scenario | Expected Result | Status |
|---|---|---|
| New lead | Lead created, success log written, Telegram sent, success response returned | ✓ Passed |
| Duplicate lead | No new lead created, duplicate log written, duplicate response returned | ✓ Passed |
| Missing email | No lead created, missing_email log written, error response returned | ✓ Passed |
| Normalized duplicate | Uppercase/spaced email normalized and detected as duplicate | ✓ Passed |
Every path returns a predictable response for API consumers.
Real screenshots from the completed build. ReqBin responses are documented as structured JSON cards above, so a separate ReqBin screenshot is not required. All visible records use sample/demo data created for this portfolio case study.
Webhook → normalization → validation → duplicate prevention → Airtable → logs → Telegram → response
Validated, normalized lead records stored in CRM table
Operational event history for success, duplicate, validation error and workflow error
New valid leads trigger a clean operational alert
Separate workflow captures unexpected failures and logs workflow_error events
This is a portfolio-ready automation system, not a full enterprise CRM platform.
This project demonstrates automation engineering thinking beyond simple tool usage.
Designed branch logic for success, duplicate and validation-error paths.
Handled JSON requests through a production webhook endpoint and returned structured responses.
Applied normalization before validation and duplicate lookup to reduce bad CRM records.
Added event logging for success, duplicate, validation error and workflow error outcomes.
Connected n8n, Airtable and Telegram Bot API into a coherent operating system.
Validated the workflow with a final scenario-based test matrix.