Conditional Lead Response System with Gmail and Telegram - n8n Workflow

Automate lead responses based on business hours using this robust n8n workflow. Integrate Google Sheets, Gmail, and Telegram for conditional routing and instant alerts.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Marketing and Sales teams who need to guarantee timely lead acknowledgment.
Businesses operating within strict, defined office hours.
Users seeking ready-to-use n8n templates for CRM automation.
Developers looking to implement conditional logic based on time constraints within an n8n node structure.

Overview

Handling lead submissions promptly is crucial for conversion. This powerful n8n workflow solves the challenge of providing context-aware responses, ensuring professionalism regardless of when a lead submits an inquiry.

When a new lead appears in Google Sheets (typically from a Google Form), this n8n automation takes over. It first validates the submission time against configured business hours (9 AM–6 PM, Mon–Fri). If the lead arrives during business hours, a 'We'll contact you soon' email is sent. If it arrives after hours, a 'We'll respond tomorrow' email is dispatched. This conditional routing is handled efficiently by the core logic n8n node.

Furthermore, regardless of the response path, the n8n workflow ensures immediate internal team awareness by pushing a notification to Telegram. This minimizes response time while guaranteeing the lead receives appropriate immediate acknowledgment. This complete n8n solution is one of the essential n8n templates for modern sales operations.

How it Works

This n8n workflow begins with the dedicated n8n trigger node:


  1. Google Sheets Trigger: The n8n trigger monitors a specified Google Sheet for new rows (new lead submissions).

  2. Wait 5 Minutes: A delay n8n node is executed to ensure the data is fully stabilized before processing.

  3. Check Business Hours (Function n8n node): A custom JavaScript function analyzes the lead's timestamp, determining if the submission falls within the defined business hours (9 AM to 6 PM, Monday to Friday). It outputs a flag indicating the timing.

  4. IF Business Hours? (Conditional n8n node): This core n8n node uses the flag to split the flow into two paths:

True Path (Business Hours): Executes the 'Send Gmail (Business Hours)' n8n node, sending a warm, standard response.
False Path (After Hours): Executes the 'Edit Fields' n8n node for data consistency, followed by the 'Send Gmail (After Hours)' n8n node, setting expectations for a response on the next business day.

  1. Notify Telegram: Both paths merge into the final Telegram n8n node, which sends a detailed internal alert to the sales team, providing lead context and contact information, ensuring no lead is missed by the n8n workflow.

Installation Guide

To deploy this automated n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON and import it directly into your n8n instance.

  2. Google Sheets Trigger Setup: Configure the 'Google Sheets Trigger1' n8n trigger by selecting the correct Google Sheet and worksheet containing your lead form responses. You will need to set up Google Sheets OAuth2 credentials.

  3. Gmail Credentials: Set up or select your existing Gmail OAuth2 credentials for the 'Send Gmail (Business Hours)' and 'Send Gmail (After Hours)' n8n node instances. Ensure the Gmail account has permission to send emails.

  4. Telegram Credentials: Configure the Telegram n8n node credentials (API key and Chat ID) to ensure team notifications are correctly routed. You must replace the placeholder Chat ID with your team's group ID.

  5. Custom Logic Review (Optional): Review the 'Check Business Hours' Function n8n node code if your business hours differ from the standard Mon-Fri, 9 AM-6 PM.

  6. Activate: Save the n8n workflow and set the toggle to 'Active' to start monitoring new leads.

Node Details

Google Sheets Trigger1 (n8n trigger):
Function: Serves as the primary n8n trigger, initiating the n8n workflow whenever a new lead row is updated in the specified Google Sheet.
Key Configuration: Polls for rowUpdate every minute.
Wait 5 Minutes (Delay n8n node):
Function: Introduces a necessary 5-minute buffer delay to ensure data integrity before proceeding with time-sensitive analysis.
Check Business Hours (Function n8n node):
Function: This custom n8n node analyzes the lead submission timestamp, converts the Excel serial format, and applies custom logic to determine if the current time falls within defined business operations (Mon-Fri, 9 AM-6 PM).
IF Business Hours? (IF n8n node):
Function: Routes the n8n workflow execution based on the isBusinessHours boolean output from the previous Function n8n node, directing traffic to either the business-hours path or the after-hours path.
Send Gmail (Business Hours) (Gmail n8n node):
Function: Dispatches a standard, personalized acknowledgment email for leads submitted during operational hours.
Send Gmail (After Hours) (Gmail n8n node):
Function: Dispatches a personalized email specifically acknowledging the after-hours contact, managing expectations by promising a response the next business day.
Notify Telegram (Telegram n8n node):
* Function: Sends a comprehensive internal team notification alert detailing the new lead's name, email, and timing context to a Telegram chat, completing the communication loop for this n8n workflow.

Related n8n Workflows

Free

Nodes: 8 Nodes
Updated: December 26 2025
View all
Created by

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

Featured*