Node.js WhatsApp API Integration
Send WhatsApp Business messages from any Node.js application using the official Zaptilo npm package. Built for Indian fintech, e-commerce, and SaaS teams running Express, Fastify, NestJS, or serverless on AWS Lambda. Install with npm install zaptilo-whatsapp and start sending in under 2 minutes.
Why use Zaptilo with Node.js?
- Official npm package — full Promise/async-await support
- Pay-as-you-go WhatsApp Business API pricing in INR — from ₹0.04/message
- Zero monthly fees — ideal for Indian startups and growth-stage SaaS
- Works seamlessly with Express, Fastify, NestJS, BullMQ, Lambda
- India-based support, GST-compliant invoicing
Step 1: Install the package
npm install zaptilo-whatsappStep 2: Send your first message
const { Zaptilo } = require('zaptilo-whatsapp');
const client = new Zaptilo({
token: process.env.ZAPTILO_API_TOKEN,
baseUrl: 'https://web.zaptilo.ai',
});
// Send a text message
await client.sendMessage('919876543210', 'Hello from Node.js!');
// Send a template
await client.sendTemplate('919876543210', 'order_confirmation', 'en', [
'Rahul Sharma',
'ORD-12345',
]);Step 3: Send from an Express endpoint
const express = require('express');
const { Zaptilo } = require('zaptilo-whatsapp');
const app = express();
app.use(express.json());
const wa = new Zaptilo({
token: process.env.ZAPTILO_API_TOKEN,
baseUrl: 'https://web.zaptilo.ai',
});
app.post('/webhook/order', async (req, res) => {
const { customerPhone, customerName, orderId } = req.body;
await wa.sendTemplate(
`91${customerPhone}`,
'order_confirmation',
'en',
[customerName, orderId]
);
res.json({ ok: true });
});
app.listen(3000);Step 4: Use BullMQ for high-volume sends
For OTP delivery, marketing campaigns, or order alerts, queue WhatsApp sends so HTTP requests stay fast:
const { Queue, Worker } = require('bullmq');
const queue = new Queue('whatsapp');
// Producer
await queue.add('send', { phone, template, values });
// Worker
new Worker('whatsapp', async (job) => {
await wa.sendTemplate(job.data.phone, job.data.template, 'en', job.data.values);
});Use cases for Indian Node.js teams
Razorpay payment receipts
Send receipts on Razorpay webhook from your Express server.
OTP for login/signup
Replace SMS OTPs with WhatsApp OTPs — cheaper and higher delivery in India.
Shopify / WooCommerce orders
Send order updates from your Node.js storefront backend.
Food delivery alerts
Live order tracking from Swiggy/Zomato-style apps.
Cab/ride confirmations
Trigger driver assignment WhatsApp messages instantly.
EdTech notifications
Class reminders, fee dues, exam alerts from your LMS backend.
Frequently asked questions
How do I install the Zaptilo Node.js SDK?
Run `npm install zaptilo-whatsapp` in your Node.js project. Import the Zaptilo client, initialize it with your API token and base URL (https://web.zaptilo.ai), then call sendMessage, sendMedia, or sendTemplate.
Does the Zaptilo Node.js SDK support TypeScript?
Yes. The npm package ships with TypeScript type definitions, so it works seamlessly with Express, Fastify, NestJS, and any TypeScript Node.js project.
How do I send WhatsApp messages from a webhook in Node.js?
Wire your Express route to receive the webhook, parse the payload, then call wa.sendTemplate(phone, templateName, language, values). For high-volume sends, push to a BullMQ queue and process in a worker.
What is the cheapest way to send WhatsApp from Node.js in India?
Zaptilo offers pay-as-you-go pricing in INR starting from ₹0.04 per message at volume — no monthly subscription, no setup fee, GST invoice. It is the most cost-effective WhatsApp Business API for Indian Node.js teams.
Start sending WhatsApp from Node.js
Free signup. INR pricing. No subscription. India-based support team.
Get Started FreeSee also: Laravel · Python · Spring Boot