How to Integrate SMSPort with n8n (Official Community Node)
Connect your SMSPort account to n8nβthe leading fair-code workflow automation platform. Using the official n8n-nodes-smsport community node, you can send pre-approved Meta WhatsApp templates, deliver dynamic free-form session messages, sync CRM contacts, and trigger automated multi-step workflows based on real-time WhatsApp eventsβwith zero custom webhook coding.
Overview
n8n enables self-hosted and cloud workflow automation across hundreds of databases, CRMs, APIs, and SaaS tools. The official SMSPort n8n community node provides first-class native nodes for your n8n workflow canvas:
- Official npm Package:
n8n-nodes-smsport - GitHub Repository:
smsport-in/n8n-nodes-smsport - Supported n8n Versions: n8n v1.0.0+ and v2.x (Cloud, Docker, Desktop, and npm CLI)
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Trigger Source β βββ> β n8n Workflow β βββ> β SMSPort Node β βββ> WhatsApp
β (Shopify / CRM) β β (Filter / Map) β β(Template/Msg) β Cloud API
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββStep 1: Install the SMSPort Node in n8n
Method A: Via n8n Web UI (Recommended for Cloud & Docker)
- Open your n8n workspace console.
- In the left navigation, click Settings (gear icon) β Community Nodes.
- Click the Install a community node button.
- In the npm package name input field, paste:
n8n-nodes-smsport - Check the box agreeing to install the community package, then click Install.
- Once installation completes, SMSPort and SMSPort Trigger nodes will immediately appear in your node search palette.
Method B: Via CLI (Self-Hosted Linux / Docker / Windows)
If you run self-hosted n8n in a Docker container or local terminal, install the package into your n8n custom nodes directory:
Docker Installation:
docker exec -it npm install --prefix /home/node/.n8n/nodes n8n-nodes-smsport Local / NPM Installation:
cd ~/.n8n/nodes
npm install n8n-nodes-smsport(Note for Windows users: Because Windows executes via npm.cmd, installing via terminal avoids the n8n UI subprocess error).
Step 2: Authenticate with your SMSPort API Key
- In SMSPort, navigate to Integrations β API Integration (or open
/setup/api-integration). - Generate or copy your secret API Key (starts with
sk_live_...). - In your n8n workflow editor:
- Add the SMSPort node to your canvas.
- Under Credential to connect with, click Create New Credential.
- Paste your SMSPort API Key into the API Key field.
- Click Save (n8n verifies the key automatically against
https://api.smsport.in/api/v1/ping).
- Once verified, the connection status will turn green (
Connection tested successfully).
Step 3: Available Actions & Trigger Nodes
The integration provides two dedicated nodes: the standard SMSPort Action Node and the real-time SMSPort Trigger Node.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Available SMSPort Actions β
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ€
β 1. Send Message Template β Pre-approved Meta templates with live β
β β variables ({{1}}, {{2}}) & CTA URLs. β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β 2. Send Message (Dynamic) β Free-form text, images, documents/PDF,β
β β or interactive quick reply buttons. β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β 3. Create or Update Contact β Sync customer leads, phone numbers, β
β β tags, and custom CRM attributes. β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β 4. Get Contact by Phone β Retrieve customer profile, metadata, β
β β and marketing subscription status. β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β 5. Search Contacts β Query contacts matching phone number β
β β or name substring. β
ββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Available SMSPort Triggers β
ββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ€
β 1. New Incoming Message β Real-time webhook fires when a β
β β customer replies on WhatsApp. β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β 2. Message Status Updated β Real-time webhook on status changes β
β β (sent, delivered, read, failed). β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ€
β 3. New Contact Created β Fires when a new contact record is β
β β created in your SMSPort workspace. β
ββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββAction 1: Send WhatsApp Template (Transactional & Alerts)
Sends pre-approved Meta WhatsApp Message Templates. Can be delivered at any time, even if the customer has never interacted with your business before. Ideal for order confirmations, OTPs, appointment reminders, and shipping updates.
Configuration Fields:
- Sender Phone Number: Select your active WhatsApp sender phone number from the dynamic dropdown (fetched automatically from your SMSPort account).
- Recipient Phone Number (Required): Destination phone number with country code in international E.164 format (e.g.,
+919876543210or dynamic expression={{ $json.phone }}). - Template Name (Required): Select the pre-approved template from the dynamic dropdown.
- Language Code: Template language code (e.g.,
en,en_US,hi). Default isen. - Body Variables (
{{1}},{{2}}, ...): Provide comma-separated values or array items matching your template placeholders (e.g.,{{ $json.name }}, {{ $json.order_id }}). - Header Media URL (Optional): If your template header contains an Image or Document, provide a public HTTPS URL.
- Button Dynamic URLs (Optional): If your template has dynamic Call-to-Action URLs, map the variable suffix.
Action 2: Send WhatsApp Message (Within 24-Hour Session)
Sends free-form rich messages inside an active 24-hour customer service window (initiated by a customer reply).
Message Types Supported:
- Text: Standard formatted text with emojis, bold (
*text*), and line breaks. - Image: Direct image delivery via public HTTPS URL with an optional caption.
- Document / PDF: PDF invoices, receipts, or brochures with a custom file name and caption.
- Interactive Reply Buttons: Text message accompanied by up to 3 clickable quick-reply buttons (e.g.,
Confirm,Reschedule,Cancel).
Policy Note: WhatsApp Cloud API rules restrict free-form messaging outside the 24-hour service window. For proactive outreach, always use Send WhatsApp Template.
Action 3: Contact Management (Create, Get, Search)
- Create or Update Contact: Syncs customer profiles from lead forms, Stripe payments, or webhook payloads. Automatically merges existing phone numbers. Accepts First Name, Last Name, Email, Tags (comma-separated), and custom metadata.
- Get Contact by Phone: Looks up a contact record by E.164 phone number to inspect opt-in status and custom attributes before sending.
- Search Contacts: Queries contacts matching a search string.
Trigger Node: SMSPort Trigger (Real-Time Webhooks)
The SMSPort Trigger node allows n8n to listen directly for events occurring in your SMSPort workspace:
New Incoming Message (
message.inbound):- Fires the moment a customer sends a text, button response, or media file to your WhatsApp number.
- Outputs sender phone number, message text, media URL, and timestamp.
- Perfect for building AI chatbot workflows, customer support routing, and CRM ticket logging.
Message Status Updated (
message.status):- Fires whenever a message transitions through
sent,delivered,read, orfailed. - Outputs message ID, recipient number, status timestamp, and error code (if failed).
- Fires whenever a message transitions through
New Contact Created (
contact.created):- Fires whenever a new contact is added to SMSPort via CSV import, API, or live chat.
Step 4: Popular Automation Recipes in n8n
Recipe 1: Shopify / WooCommerce New Order β Instant WhatsApp Confirmation
- Trigger: Shopify Node (
Order Created) or Webhook Node. - Action: SMSPort Node β Send WhatsApp Template.
- Recipient:
={{ $json.customer.phone }} - Template:
order_confirmation - Variables:
={{ $json.customer.first_name }}, {{ $json.order_number }}, {{ $json.total_price }}
- Recipient:
Recipe 2: Google Sheets Lead Form β Sync Contact & Send Welcome Message
- Trigger: Google Sheets Node (
Row Added). - Action 1: SMSPort Node β Create or Update Contact (
Name,Phone, Tag:Website Lead). - Action 2: SMSPort Node β Send WhatsApp Template (
welcome_offer).
Recipe 3: Customer WhatsApp Reply β AI Agent Processing (LangChain / OpenAI)
- Trigger: SMSPort Trigger Node (
New Incoming Message). - Logic: n8n AI Agent Node / OpenAI Node generates response based on company knowledge base.
- Action: SMSPort Node β Send WhatsApp Message (Text message reply inside the active 24h window).
Field Formatting & Best Practices
- E.164 Phone Format:
- Destination phone numbers must always include the
+sign and international country code without spaces or dashes (e.g.,+919876543210or+14155552671). - In n8n expressions, you can sanitize numbers using:
={{ $json.phone.replace(/[^0-9]/g, '').replace(/^/, '+') }}.
- Destination phone numbers must always include the
- Public HTTPS Media URLs:
- Meta WhatsApp servers fetch media directly from the URL provided. Ensure media URLs are publicly accessible via standard HTTPS (not behind private session authentication or local file paths).
- Template Sync:
- Templates created in Meta Business Manager sync to SMSPort within 60 seconds. The n8n node dropdown automatically fetches your latest approved templates via
/api/v1/templates.
- Templates created in Meta Business Manager sync to SMSPort within 60 seconds. The n8n node dropdown automatically fetches your latest approved templates via
Need Assistance?
- npm Package Page: npmjs.com/package/n8n-nodes-smsport
- GitHub Issues: github.com/smsport-in/n8n-nodes-smsport/issues
- API Reference: SMSPort Public API Reference
- Direct Support: Contact our engineering team from your SMSPort Workspace console or email support@smsport.in.