alaris-sms

n8n community node for sending SMS via Alaris SMS Gateway

Package Information

Downloads: 176 weekly / 176 monthly
Latest Version: 0.1.1
Author: Davide Tavano

Documentation

n8n-nodes-alaris-sms

n8n community node for sending SMS via Alaris SMS Gateway.

n8n is a fair-code licensed workflow automation platform.

Installation

Community Nodes (Recommended)

For users on n8n v0.187+, you can install this node directly from n8n:

  1. Go to Settings > Community Nodes
  2. Select Install
  3. Enter n8n-nodes-alaris-sms in Enter npm package name
  4. Agree to the risks of using community nodes
  5. Select Install

Manual Installation

To get started install the package in your n8n root directory:

npm install n8n-nodes-alaris-sms

For Docker-based deployments add the following line before the font installation command in your n8n Dockerfile:

RUN cd /usr/local/lib/node_modules/n8n && npm install n8n-nodes-alaris-sms

Operations

Send SMS

Send an SMS message via Alaris SMS Gateway.

Parameters:

  • To (required): Recipient phone number (e.g., 393331234567)
  • Message (required): SMS text content
  • Sender (ANI) (optional): Override default sender number/name

Output:

{
  "message_id": "uuid-of-sent-message"
}

Get Status

Check the delivery status of a sent message.

Parameters:

  • Message ID (required): The message ID returned from a send operation

Output:

{
  "status": "DELIVRD",
  "delivery_time": 1234567890,
  "mccmnc": "222010"
}

Status values:

  • SENT: Message sent
  • ENROUTE: Message in transit
  • DELIVRD: Message delivered
  • EXPIRED: Message expired
  • DELETED: Message deleted
  • UNDELIV: Message undelivered
  • ACCEPTD: Message accepted
  • UNKNOWN: Status unknown
  • REJECTD: Message rejected

Credentials

To use this node, you need to configure the following credentials:

  • Username: Alaris SMS Gateway username
  • Password: Alaris SMS Gateway password
  • Host: Gateway hostname (without protocol, e.g., sms.example.com)
  • Port: Port number (default: 443)
  • URL Path: API endpoint path (default: /api)
  • Use HTTPS: Enable HTTPS (default: true)
  • Use POST Method: Use POST instead of GET (default: true)
  • Verify SSL: Verify SSL certificates (default: true)
  • Sender (ANI): Default sender number/name
  • Long Message Mode: How to handle messages > 160 chars
    • cut: Cut at 160 characters
    • split: Split into multiple messages
    • split_sar: Split with SAR
    • payload: Send as payload
  • Dry Run: Simulate sending without actually sending (default: false)

Compatibility

  • n8n v1.0+
  • Node.js 18+

Development

Quick Test with Docker

# Start n8n with node pre-installed
task docker:up

# Open http://localhost:5678
# Node will be automatically available

See DOCKER.md for more details.

Prerequisites

  • Node.js 18+
  • npm or pnpm
  • Task (optional, for using Taskfile)
  • Docker & Docker Compose (for local testing)

Setup

# Clone repository
git clone https://github.com/yourusername/n8n-nodes-alaris-sms.git
cd n8n-nodes-alaris-sms

# Install dependencies
npm install
# or with Task
task install

Build

# Build TypeScript
npm run build
# or with Task
task build

Lint

# Run linter
npm run lint
# or with Task
task lint

# Fix lint issues
npm run lint:fix

Local Development with n8n

To test the node locally with n8n:

# Build the node
npm run build

# Link to global npm
npm link

# In your n8n installation directory
npm link n8n-nodes-alaris-sms

# Start n8n
n8n start

The node should now appear in your n8n instance under the "Alaris SMS" name.

Publish to npm

Before publishing, ensure:

  1. Update version in package.json
  2. Update repository URLs
  3. Update author information
# Dry run (see what would be published)
npm publish --dry-run
# or with Task
task publish:dry

# Publish to npm
npm publish
# or with Task
task publish

Technical Implementation

This node is a complete TypeScript rewrite of the original Python Alaris SMS class. The implementation:

  • No Python dependency: Pure Node.js/TypeScript implementation
  • Native n8n integration: Uses n8n's built-in HTTP request helpers
  • Production-ready: Proper error handling and continueOnFail support
  • Type-safe: Full TypeScript type definitions
  • Modular: Clean separation of concerns

Why TypeScript Rewrite?

Instead of wrapping the Python script via child_process or requiring a separate HTTP service, the logic was ported to TypeScript because:

  1. Simplicity: The Alaris API is straightforward HTTP requests
  2. Performance: No subprocess overhead
  3. Maintainability: Single codebase in the n8n ecosystem
  4. Portability: Works anywhere Node.js runs
  5. Type Safety: Compile-time checks prevent runtime errors

Example Workflow

{
  "nodes": [
    {
      "parameters": {
        "operation": "sendSms",
        "to": "393331234567",
        "message": "Hello from n8n!"
      },
      "name": "Alaris SMS",
      "type": "n8n-nodes-alaris-sms.alarisSms",
      "typeVersion": 1,
      "position": [250, 300],
      "credentials": {
        "alarisSms": {
          "id": "1",
          "name": "Alaris SMS account"
        }
      }
    }
  ]
}

License

MIT

Resources

Support

For issues and feature requests, please open an issue.

Discussion