Skip to content

spydernet3/Text-messaging-alert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Let’s break it down carefully πŸ‘‡


🧠 Metadata

Goal: Send SMS from Google Sheets to user mobile numbers automatically.

Tools/Platforms:

Google Apps Script

SMS API (Twilio / Fast2SMS / Textbelt / Msg91 etc.)

Google Sheet (with Name, Phone, Message columns)


🌲 Step Tree

  1. Prepare Google Sheet

Column Example Data

A (Name) John B (Phone) +919876543210 C (Message) Your meeting is at 10 AM today.

  1. Choose an SMS API Provider

Free APIs (limited):

Textbelt β€” 1 free SMS/day

Paid/Enterprise:

Twilio

Fast2SMS

MSG91

ClickSend

  1. Get Your API Key

Sign up β†’ Generate API Key β†’ Copy it securely.

  1. Open Google Apps Script

In your Sheet β†’ Extensions > Apps Script

Paste the code below.


βœ… Script Example (Textbelt Free API)

function sendSmsFromSheet() { const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1"); const data = sheet.getRange("A2:C").getValues(); const apiKey = "textbelt"; // free demo key (1 SMS/day)

data.forEach(row => { const name = row[0]; const phone = row[1]; const message = row[2]; if (phone && message) { const payload = { phone: phone, message: Hi ${name}, ${message}, key: apiKey }; const options = { method: "post", contentType: "application/json", payload: JSON.stringify(payload) }; const response = UrlFetchApp.fetch("https://textbelt.com/text", options); Logger.log(response.getContentText()); } }); }


βš™οΈ Script Example (Twilio API – More Reliable)

function sendSmsUsingTwilio() { const accountSid = "YOUR_TWILIO_SID"; const authToken = "YOUR_TWILIO_AUTH_TOKEN"; const fromNumber = "YOUR_TWILIO_PHONE_NUMBER";

const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1"); const data = sheet.getRange("A2:C").getValues();

data.forEach(row => { const name = row[0]; const phone = row[1]; const message = row[2]; if (phone && message) { const payload = { To: phone, From: fromNumber, Body: Hi ${name}, ${message} }; const options = { method: "post", headers: { Authorization: "Basic " + Utilities.base64Encode(accountSid + ":" + authToken) }, payload: payload }; UrlFetchApp.fetch(https://api.twilio.com/2010-04-01/Accounts/${accountSid}/Messages.json, options); Logger.log(SMS sent to ${phone}); } }); }


⚑ Advantages

Advantages Description

πŸ’¬ Auto-Send SMS Sends messages directly from Sheets βš™οΈ Trigger Support Can run daily or on-demand πŸ“± Personalized Custom message per user 🌎 Multi-Provider Works with Twilio, MSG91, Textbelt πŸ” Secure API key-based authentication 🧠 Smart Filtering Skip empty rows automatically πŸ”„ Reusable Works for alerts, reminders, or reports πŸ“ˆ Scalable Integrates with thousands of records


βš–οΈ Pros & Cons

Pros Cons

Automated SMS sending Some APIs charge per message Custom per-user message Free APIs limited per day Works with time triggers Requires API key setup Easy to edit message format Internet connection required Supports multiple providers No image/media messages Logs SMS status Demo API has daily limits Secure authentication β€” Scalable via paid plans β€”


πŸ“Š Comparison Table

Feature Textbelt Twilio Fast2SMS MSG91

|Free SMS | βœ… (1/day) ❌ ❌ ❌| Indian Numbers βœ… βœ… βœ… βœ… Global Reach βœ… βœ… ❌ ❌ Authentication API Key SID + Token API Key Auth Key Delivery Reports βœ… βœ… βœ… βœ… Setup Time 2 min 5 min 3 min 3 min Cost Free/Paid Paid Paid Paid Reliability Medium High High High


🧰 Useful Platforms

Google Sheets

Google Apps Script

Twilio API / Textbelt API / MSG91 API

Trigger setup (Apps Script β†’ Triggers β†’ Time-driven)


πŸ’¬ FAQ

Q1: Can I send WhatsApp messages instead? πŸ‘‰ Yes, via Twilio WhatsApp API β€” similar setup.

Q2: Can it handle 1000+ users? πŸ‘‰ Yes, but use a paid API (Twilio/MSG91) to avoid rate limits.

Q3: Can I attach dynamic messages (like OTPs or reports)? πŸ‘‰ Yes, use cell placeholders for custom messages.


πŸ§ͺ Case Study

Company: TechRemind Pvt Ltd Use Case: Automated daily reminders to 50 employees about productivity report submission. Result:

Reduced manual follow-ups by 95%

Sent 1,500+ messages/month automatically Reference: Twilio Case Studies


πŸ“° Recent News

(Oct 2025): Twilio launched enhanced India SMS compliance support β€” Read more.

Textbelt v2.1 adds message delivery tracking improvements β€” textbelt.com.


🧭 Final Recommendation

πŸ”Ή For testing, use Textbelt (Free key) πŸ”Ή For production use, prefer Twilio or MSG91 (faster, reliable, global) πŸ”Ή For India-specific bulk alerts, use Fast2SMS


About

Send text messages using gsheet

Resources

Stars

Watchers

Forks

Releases

No releases published