Puzzle #41
Instant Telegram Form Notification · n8n Automation Studio

Mortgage Lead Intake & Telegram Alert Stream

Submit a loan quote request to trigger the n8n webhook and instantly push the lead to Telegram.

Presets:
Client Website: PrimeLend / Credit Imobil

Mortgage & Lending Offers

Fixed rate mortgage - 2 years

7.9% interest
  • ✓ 2 years - fixed interest rate
  • ✓ Up to 2,500,000 MDL
  • ✓ Zero early repayment fees
See details >

Fixed rate mortgage - 4 years

8.29% interest
  • ✓ 4 years - guaranteed locked rate
  • ✓ Up to 3,000,000 MDL
  • ✓ Flexible grace period option
See details >

First House Plus

8.57% interest
  • ✓ Up to 2,500,000 MDL
  • ✓ Monthly government compensations
  • ✓ State subsidized program
See details >

Standard Mortgage Loan

9.15% interest
  • ✓ Up to 25 years repayment term
  • ✓ Low initial down payment (from 10%)
  • ✓ Available for primary or secondary housing
See details >

HomeLend Lead Alerts

bot · real-time sink

February 5
💻 New lead on the website
👤 Name: Ion Popescu
📞 Phone: +373 69 123 456
🔧 Service: Standard Mortgage Loan
08:32 ✓✓
⚡ Automated Telegram notification sink connected via n8n 1 alert
n8n Workflow v1.2 Active (Listening on /webhook/mortgage-quote)

Form Submission ➔ Telegram Delivery Pipeline

⚡

Webhook

POST /quote-intake

Ingests name, phone, offer from browser fetch().
200 OK
</>

Validate & Normalize

Code (JavaScript)

Standardizes +373 phone & trims text.
Clean data
✈

Telegram Bot

sendMessage

Markdown message delivered to chat.
Dispatched
↩

Respond to Webhook

JSON 200 OK

Returns leadId & timestamp to form.
Complete

Node Inspector: Validate & Normalize Lead (Code)

n8n-nodes-base.code
// Normalizes Moldovan phone number and structures Telegram message const body = $input.first().json.body || $input.first().json; const name = String(body.name || '').trim() || 'Anonymous Lead'; let phone = String(body.phone || '').trim().replace(/[^0-9+]/g, ''); if (phone.startsWith('0') && phone.length === 9) { phone = '+373' + phone.slice(1); } else if (!phone.startsWith('+') && phone.length > 6) { phone = '+373' + phone; } const service = String(body.service || 'Standard Mortgage Loan').trim(); // Format Telegram Message matching Challenge #41 specification const message = `💻 *New lead on the website*\n\n👤 *Name:* ${name}\n📞 *Phone:* ${phone}\n🔧 *Service:* ${service}`; return [{ json: { leadId: `LEAD-${Date.now().toString(36).toUpperCase()}`, name, phone, service, message } }];

Execution Gateway Mode

Choose between built-in simulated pipeline (zero external tokens needed) or live endpoint relay.

Internal Simulation

Realistic offline n8n & Telegram engine with sound

Live n8n / Bot Relay

Direct HTTP POST to your real webhook or Bot API

Production Deployment Guide

Quick 3-step setup to connect this form to your real Telegram channel.

1 Create Bot with @BotFather
Open Telegram, message @BotFather, run /newbot, choose a display name and username ending in bot, and save the HTTP API token.
2 Get Chat ID via @userinfobot
Message @userinfobot in Telegram to get your personal numeric ID. For a team group, add your bot to the group, send a message, and check /getUpdates.
3 Import n8n Workflow JSON
Download series-41-form-telegram-n8n.json, import into your n8n workspace, add your Telegram credentials, and copy your Production Webhook URL.
Real-Time HTTP & Webhook Packet Stream
POST /webhook/mortgage-quote-intake
Initial Seed · 08:32:00
Headers: { "Content-Type": "application/json", "Origin": "https://primelend.md" }
Body: { "name": "Ion Popescu", "phone": "+373 69 123 456", "service": "Standard Mortgage Loan", "leadId": "LEAD-L8K1P9X" }
Telegram Response: 200 OK — { "ok": true, "result": { "message_id": 1042, "date": 1789318900 } }

Automated 8-Point Architecture Diagnostics Suite

Verifies form validation, payload construction, n8n pipeline logic, Telegram formatting, and screenshot visual parity.

1

DOM Elements & Quote Modal Interface

Confirms existence of Name input, Phone input with +373 prefix, Lending Offer select, and Submit button.

Pending
2

Form Validation & Moldovan Phone Normalization

Tests phone normalization (+373 6X XXX XXX standard) and empty name fallback protection.

Pending
3

Webhook Payload Serialization

Verifies structured JSON payload adhering to n8n webhook intake contract.

Pending
4

n8n Node Pipeline Execution Simulation

Simulates sequential execution across Webhook ➔ Code ➔ Telegram ➔ Response nodes.

Pending
5

Telegram Message Template & Markdown Compliance

Verifies exact visual format: 💻 New lead on the website, 👤 Name, 📞 Phone, 🔧 Service.

Pending
6

Web Audio Synthesizer Telegram Chime

Ensures Web Audio API initializes and triggers two-tone frequency chime without external assets.

Pending
7

Screenshot Visual Parity Requirements

Validates 2Y Fixed (7.9%), 4Y Fixed (8.29%), First House Plus (8.57%), MDL limits, and February 5 pill.

Pending
8

Gateway Mode Switch & Resilience

Tests graceful fallback handling and credential privacy protection.

Pending