If you run a small business, you probably check your phone every few minutes in case a good customer has written. Most of the time it is a question that could wait. Occasionally it is the job that makes your month, and you see it four hours late.
For a mobile RV repair business in California we built a system that only calls the CEO in for customers with a budget of $2,000 or more and answers everyone else automatically. Lead response got 85% faster, and the CEO got his holidays back. Here is a free version you can set up in 20 minutes.
What you will have at the end
- A form where every enquiry gives a budget
- An instant, friendly email reply to every enquiry
- A Telegram message on your phone only when the budget is above your line
Step 1: the form
Create a Google Form with these questions, spelled exactly like this:
- Name
- Budget (USD): a short answer, or a dropdown of ranges like "2000" or "5000"
- What do you need?
Under Responses, click Link to Sheets to create a response sheet.
Step 2: a Telegram bot to message you
- In Telegram, open @BotFather, send /newbot and follow the steps. Copy the token it gives you.
- Send your new bot any message, such as "hi".
- Open https://api.telegram.org/botYOUR_TOKEN/getUpdates in a browser, with your token in place of YOUR_TOKEN. Find "chat":{"id": and copy the number after it. That is your chat ID.
Step 3: the script
In the response sheet, open Extensions → Apps Script and paste:
const THRESHOLD = 2000; // the budget that deserves your phone
function onLead(e) {
const v = e.namedValues;
const name = v['Name'][0];
const email = v['Email'][0];
const need = v['What do you need?'][0];
const budget = Number(String(v['Budget (USD)'][0]).replace(/[^0-9.]/g, ''));
if (budget >= THRESHOLD) {
alertPhone('Big lead: $' + budget + ' from ' + name + ' (' + email + ')\n' + need);
}
GmailApp.sendEmail(email, 'We got your request',
'Hi ' + name + ',\n\nThanks for getting in touch. A real person will reply within one working day.\n\nBest regards');
}
function alertPhone(text) {
const props = PropertiesService.getScriptProperties();
UrlFetchApp.fetch('https://api.telegram.org/bot' + props.getProperty('BOT_TOKEN') + '/sendMessage', {
method: 'post',
contentType: 'application/json',
payload: JSON.stringify({ chat_id: props.getProperty('CHAT_ID'), text: text }),
});
}Step 4: keep the token out of the code
Click the gear icon (Project Settings), scroll to Script properties, and add two: BOT_TOKEN with your token and CHAT_ID with your chat ID. Keeping secrets here, not in the code, means you can share the script without sharing the keys to your bot.
Step 5: switch it on
Open Triggers (the alarm-clock icon) → Add trigger. Choose the function onLead, event source From spreadsheet, event type On form submit. Save and authorise it.
Step 6: test both lanes
Submit the form twice: once with a budget of 500 and once with 5000. You should get one email reply each time, and one Telegram message, for the 5000 only.
Make it yours
- Prefer email to Telegram? Replace the alertPhone call with MailApp.sendEmail to your own address, and give it a subject Gmail can filter into a "VIP" label with a loud notification.
- Different line per service? Add a Service question and keep a small table of thresholds.
- Add a booking link to the auto-reply so smaller jobs can book themselves without waiting for you.
When to stop doing it yourself
This is the core of a speed-to-lead system. A full version adds SMS and call sequences, a CRM record for every lead, follow-ups when someone goes quiet, and a response-time report. Read how routing by deal value made response 85% faster, or let us build it with you.