← Workflows
TelegramGoogleSheetLeadGen

Universal Dynamic Contact Form Pipeline

A highly-polished, enterprise-grade website contact form handler featuring parallel routing, automated lead archiving in Google Sheets, real-time Telegram alerts, internal email notifications, and an optional user auto-responder all controlled by a centralized admin dashboard node.

Intermediate 11 nodes n8n 1.50+

Download workflow JSON Import this file in n8n — credentials are not included.

Download .json
Read-only · click canvas to explore

Loading workflow…

Setup Guide:

  1. Embed a standard HTML contact form on yourcompany.com/contact pointing to your n8n Webhook URL.
  2. Open the Workflow Settings node and configure your routing toggles (Google Sheets, Telegram, Admin Email, User Confirmation).
  3. Connect your Google Sheets account and insert your spreadsheet ID.
  4. Set up your Telegram Bot API token and copy your Chat ID.
  5. Link your SMTP/Email integration to dispatch admin alerts and automatic user receipts.

1. Workflow Architecture

  1. Trigger (Webhook): Listens for incoming POST requests at /contact-submit. This receives raw submission JSON from your website's front-end form.
  2. Workflow Settings: A centralized JavaScript Code node acting as an "Admin Dashboard". Instead of disabling individual nodes or editing connection paths, the site owner can toggle features (true/false) and edit configuration strings (Sheet IDs, emails, chat IDs) in one clean block.
  3. Data Optimizer (Process Payload): Maps and sanitizes incoming user fields (First Name, Last Name, Email, Phone, Company, Website URL, Budget, and Message) while attaching the control config. If a user leaves optional fields empty, it applies clean default fallbacks (e.g., "Not Provided", "Not Specified").
  4. Router (Parallel Conditional Branching):
    • Google Sheets Branch: An IF node checks if Google Sheets is enabled. If true, it appends all parsed contact details, including a UTC timestamp, to a specified spreadsheet.
    • Telegram Branch: An IF node checks if Telegram is enabled. If true, it formats a beautiful Markdown message and pings your private Telegram channel/chat.
    • Admin Email Branch: An IF node checks if Admin Notification is enabled. If true, it triggers an SMTP node to send a detailed lead sheet to your sales/operations inbox.
    • User Confirmation Branch: An IF node checks if User Confirmation is enabled. If true, it sends a warm, personal auto-reply confirming receipt and setting expectations.

2. Setup Instructions

A. The Front-End HTML Contact Form

To capture and send data to this pipeline, construct your website's contact form (e.g., on praxica.io/contact) using standard HTML. Ensure the name attributes match the fields expected by the n8n Process Payload node. Here is a premium boilerplate:

html
<form id="contactForm" action="https://your-n8n-instance.com/webhook/contact-submit" method="POST">
  <div class="form-grid">
    <input type="text" name="first_name" placeholder="First Name" required />
    <input type="text" name="last_name" placeholder="Last Name" required />
  </div>
  <input type="email" name="email" placeholder="Business Email" required />
  <input type="tel" name="phone" placeholder="Phone Number (e.g., +1234567890)" />
  
  <div class="form-grid">
    <input type="text" name="company" placeholder="Company Name" />
    <input type="url" name="website" placeholder="Website URL (e.g., https://yourco.com)" />
  </div>
  
  <div class="form-grid">
    <select name="budget">
      <option value="" disabled selected>Estimated Monthly Budget</option>
      <option value="<$5k">< $5,000 / mo</option>
      <option value="$5k-$10k">$5,000 - $10,000 / mo</option>
      <option value="$10k+">$10,000+ / mo</option>
    </select>
    
    <select name="referral_source">
      <option value="" disabled selected>How did you hear about us?</option>
      <option value="Google Search">Google Search</option>
      <option value="LinkedIn">LinkedIn</option>
      <option value="Twitter/X">Twitter/X</option>
      <option value="YouTube">YouTube</option>
      <option value="Referral/Word of Mouth">Referral/Word of Mouth</option>
      <option value="Other">Other</option>
    </select>
  </div>
  
  <textarea name="message" placeholder="How can we help you?" required></textarea>
  
  <button type="submit">Submit Request</button>
</form>


B. Configuring the n8n Workflow Settings Node

Double-click the Workflow Settings node to set your toggles and destinations:

javascript
return {
  // Administrator Configuration Switches (Set to true/false to enable/disable)
  enableGoogleSheets: true,
  enableTelegram: true,
  enableEmailNotification: true,
  enableUserConfirmationEmail: true,
  
  // Credentials & Routing Destinations
  googleSheetId: "your_google_sheet_id_here",
  adminNotificationEmail: "admin@yourcompany.com",
  telegramChatId: "your_telegram_chat_id_here"
};


C. Third-Party Integrations Setup

  • Google Sheets:
    1. Create a Google Sheet with a header row matching exactly: Date, First Name, Last Name, Email, Phone, Company, Website, Budget, Referral Source, Message.
    2. Copy the Sheet ID from the URL (the long string between /d/ and /edit).
    3. Enter it into the googleSheetId field in Workflow Settings.
    4. Authorize n8n to access your Google account inside the Sheets node.
  • Telegram Bot Alert:
    1. Search for @BotFather on Telegram, send /newbot, and follow the steps to generate your API Token.
    2. Search for @userinfobot to retrieve your personal Chat ID (or create a group, invite the bot, and obtain the group's Chat ID).
    3. Enter the Chat ID into the telegramChatId field in the settings.
    4. Paste the bot's API Token into n8n's Telegram Credentials.
  • SMTP Email Notifications:
    1. For Admin Notifications, set up your outbound email connector using GSuite/Google Workspace, Outlook, or SMTP (e.g., SendGrid, Mailgun).
    2. For User Auto-Response, utilize the same or a dedicated outbound SMTP connection to ensure top-tier email deliverability.

3. Advanced Fields to Consider (Aesthetic & Conversion Enhancers)

If you want to take your lead scoring and qualification to the next level, we highly recommend adding these optional fields to your form. The webhook will automatically capture them, and you can map them in the Process Payload node:

  1. Urgency / Timeline (timeline): A dropdown containing options like "Immediate (Within 48h)", "1-3 Months", or "Just Researching". This allows you to instantly flag high-priority leads in your Telegram notifications.
  2. Referral Source (referral_source): Fully integrated by default in the HTML form and mapped to your Google Sheets, Telegram, and Email alerts to provide instant marketing attribution.
  3. UTM Tracking Parameters (utm_source, utm_medium, utm_campaign): Hidden form fields that automatically capture traffic source variables. When appended to Google Sheets, this connects your marketing spend directly to your CRM pipeline.
  4. Preferred Contact Method (preferred_contact): A selection for "Email", "Phone Call", or "Telegram/WhatsApp" so you meet the lead on their terms.