n8n-nodes-fast2sms
v0.1.1
Published
n8n community node for the Fast2SMS SMS platform: DLT, DLT Manual and Quick routes, OTP, DLT Manager, delivery reports, logs, wallet and webhooks.
Maintainers
Readme
n8n-nodes-fast2sms
A feature-rich n8n community node for the Fast2SMS platform — India's popular bulk SMS, OTP and DLT messaging API.
Send SMS, verify OTPs, manage DLT templates, track deliveries, and automate webhook-driven workflows — all from within n8n.
✨ Features at a Glance
| Category | Operations | Highlights | |----------|-----------|------------| | 📱 SMS | Send, Send Bulk, Send & Wait for Delivery | DLT, DLT Manual & Quick routes | | 🔐 OTP | Send, Verify, Resend | Configurable expiry & length | | 📋 DLT Manager | Get Templates, Get Senders, Get Entities | Cached lookups, guided variable UI | | 📝 DLT Registry | Add Entity, Add Sender, Add Template | Bulk upload via Excel URLs | | 📊 Reports | Delivery Report, SMS Logs, Summary | Paginated, date-filtered | | 💰 Account | Get Wallet Balance | Real-time balance & SMS count | | 🔔 Webhooks | Create, Update, Delete, Get, Set Status | SMS & OTP services | | ⚡ Trigger | Delivery Webhook Trigger | Real-time delivery callbacks |
🚀 Installation
Via n8n Community Nodes UI (Recommended)
- Go to Settings → Community Nodes
- Click Install a community node
- Enter:
n8n-nodes-fast2sms - Click Install
Via npm
cd ~/.n8n
npm install n8n-nodes-fast2smsVia Docker
Add to your Dockerfile:
RUN cd /home/node/.n8n && npm install n8n-nodes-fast2sms⚙️ Setup
- Get your API Key from Fast2SMS Dashboard → Dev API
- In n8n, go to Credentials → New Credential → Fast2SMS API
- Paste your API key — that's it!
The credential test automatically verifies your key against the /dev/wallet endpoint.
📱 SMS Operations
Three Routes Supported
| Route | Best For | Sender ID | DLT Template | Price |
|-------|---------|-----------|--------------|-------|
| DLT | Production bulk SMS | Required | From DLT Manager | Account-specific |
| DLT Manual | Custom template text | Required | User-provided | Account-specific |
| Quick | Testing & dev | Auto (FSTSMS) | Not needed | ₹5.00/SMS |
Send SMS
Send to one or multiple recipients with automatic number validation, batching, and cost estimation.
- ✅ Smart batching — automatically splits large recipient lists into API-sized batches (100/batch)
- ✅ Number normalization — accepts
+91,0, or raw 10-digit formats - ✅ Duplicate detection — removes duplicate numbers before sending
- ✅ Segment estimation — calculates SMS segments and estimated cost before sending
- ✅ GSM-7 / UCS-2 detection — correctly counts extension characters (€, [, ], etc.) that cost 2 septets
Send & Wait for Delivery
Sends the SMS and holds the workflow until the delivery report resolves — no polling node needed.
- Two-stage architecture: inline polling (≤60s) and
putExecutionToWait(up to 1 hour) - Configurable resolve conditions: all delivered, any terminal, or any failure
- Graceful timeout handling with partial results
Personalised / Per-Recipient Messages
Turn on "Personalise per Recipient" to send a unique message to each input item via the /dev/custom endpoint. Each row gets its own text, variables, and recipient — validated up-front before anything is sent.
🔐 OTP Operations
| Operation | Description | |-----------|-------------| | Send | Dispatch an OTP via a pre-configured OTP template | | Verify | Check if the user-submitted OTP is correct | | Resend | Re-send the last OTP to the same number |
- Configurable OTP length (4–10 digits) and expiry (1–10,080 minutes)
- Numeric-only variable validation enforced locally before the API call
📋 DLT Manager (Read Operations)
Browse your approved DLT assets without leaving n8n:
- Get Templates — list all templates, optionally filtered by Sender ID
- Get Sender IDs — list approved sender IDs with entity names
- Get Entities — de-duplicated entity list derived from senders
- Get Template by ID — look up a single template with its variable slots
All lookups are cached (5-minute TTL) so opening dropdowns doesn't burn API calls.
📝 DLT Registry (Write Operations)
Register new DLT assets programmatically:
| Operation | What It Does | |-----------|-------------| | Add Entity | Register a new entity with screenshot proof | | Add Sender | Register a sender ID under an entity | | Add Sender (Excel) | Bulk-register senders via an Excel URL | | Add Template | Register a message template with screenshots | | Add Template (Excel) | Bulk-register templates via an Excel URL |
All URLs are validated to be publicly reachable http(s):// links.
📊 Reports & Logs
| Operation | Description | |-----------|-------------| | Get Delivery Report | Per-recipient delivery status for a request ID | | Get SMS Logs | Paginated logs with date range filtering | | Get Summary | Aggregate delivery stats for a date range |
Delivery reports can be returned as one item per recipient (split mode) or as a single summary object.
🔔 Webhook Management
Full CRUD for Fast2SMS delivery webhooks:
- Create — register a callback URL with event filters
- Get / Get Many — list registered webhooks
- Update — modify URL, events, headers, or payload format
- Delete — remove a webhook
- Set Status — activate / deactivate without deleting
Supports both SMS and OTP webhook services.
⚡ Trigger Node
The Fast2SMS Trigger node receives real-time delivery callbacks:
- Automatic mode — creates/deletes the webhook for you when the workflow activates
- Manual mode — bring your own webhook ID
- HMAC verification — optional shared-secret authentication with timing-safe comparison
- Payload normalization — snake_case API fields mapped to camelCase with ISO timestamps
🎯 Variable System
The DLT route uses positional {#var#} template variables. This node makes them safe and easy:
| Mode | Description |
|------|-------------|
| Guided | One labeled input box per variable, auto-named from template context |
| Pipe-delimited | Classic value1|value2|value3 format |
| List | JSON array of values |
Built-in validation catches:
- Wrong variable count
- Pipe characters inside values (escaping or stripping)
- Control characters that break SMS encoding
- Empty variables
- Template rendering verification (round-trip check)
🔒 Security
This package follows security best practices:
- 🔐 API keys — never logged, never in URLs; header-only authentication
- 🛡️ Timing-safe comparison — webhook HMAC verification uses SHA-256 +
timingSafeEqual - 🚫 Path traversal prevention — webhook IDs validated against strict
[A-Za-z0-9_-]+pattern - 🔑 Cache isolation — template cache keyed by SHA-256 hash of API key (cross-tenant safe)
- 📝 Header redaction — sensitive headers stripped from webhook payloads
- ⚠️ GET method warning — opt-in only, with clear data exposure warnings
📋 Compatibility
| Requirement | Version |
|-------------|---------|
| n8n | ≥ 1.69.0 |
| Node.js | ≥ 20.15 |
| Runtime dependencies | Zero — only n8n-workflow as peer |
🧪 Testing
# Run the full test suite
npm test
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverage154 tests covering phone normalization, variable validation, segment counting, datetime parsing, webhook path security, and more.
📦 Development
# Clone the repo
git clone https://github.com/AakashRawat04/n8n-nodes-fast2sms.git
cd n8n-nodes-fast2sms
# Install dependencies
npm install
# Build
npm run build
# Lint
npm run lint
# Link to your local n8n for testing
npm link
cd ~/.n8n
npm link n8n-nodes-fast2sms📄 License
MIT — use it however you like.
🤝 Contributing
Contributions are welcome! Please:
- Fork the repo
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
