Package Information
Available Nodes
Documentation generatingβ¦
Documentation
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-fast2sms
Via 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 |
| 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:coverage
154 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