Nqdev: Tích hợp EsmsVN icon

Nqdev: Tích hợp EsmsVN

Send SMS and OTT messages using EsmsVN API.

OTT Message → Gửi tin nhắn ZNS

AI-generated

Overview

This node integrates with the EsmsVN API to send SMS and OTT messages, specifically supporting operations like sending Zalo Notification Service (ZNS) messages. It is useful for automating message delivery via Zalo Official Accounts, enabling businesses to communicate with customers through prioritized or regular Zalo messages.

Typical use cases include:

  • Sending transactional or promotional notifications to customers on Zalo.
  • Automating customer engagement workflows by triggering ZNS messages based on events.
  • Testing message templates in a sandbox environment before live deployment.

For example, a business can use this node to send a Zalo priority message (Zalo Ưu Tiên) to a customer’s phone number using a predefined ZNS template with dynamic parameters filled in.

Properties

Name Meaning
SmsType Type of SMS message to send. Options: "Zalo Ưu Tiên" (priority Zalo message), "Zalo Bình Thường" (regular Zalo message).
ZaloOA Select or specify the Zalo Official Account (OA) from which the message will be sent. Supports searching and listing available OAs or specifying by name.
Template ID Select or specify the ZNS template ID to use for the message. Supports searching and listing available templates or specifying by numeric ID. Not shown if SmsType is 26 (not applicable).
PhoneNumber Recipient's phone number in international format (e.g., +84912345678) or local format (e.g., 0912345678). Must match Vietnamese mobile number patterns.
Template Parameters Dynamic parameters to fill into the selected ZNS template. Allows adding multiple key-value pairs where keys are parameter names loaded dynamically based on the chosen template, and values are strings to substitute.
Options Additional optional settings:
- IsUnicode: Send message content as Unicode (supports Vietnamese and special characters).
- Sandbox: Send message in sandbox mode (for testing, no cost).
- Partner Source: Numeric partner source ID for routing.
- Logging Request: Enable logging of each API request for debugging purposes.

Output

The node outputs JSON data representing the result of the executed operation. The structure typically includes:

  • executionId: Unique identifier for the execution instance.
  • resource: The resource type used (e.g., OTT Message).
  • operation: The operation performed (e.g., sendZnsMessage).
  • status: Status of the operation, usually "completed" if successful.
  • timestamp: ISO string timestamp when the operation was performed.
  • Additional fields specific to the response from the EsmsVN API, such as message IDs, error codes, or confirmation details.

If multiple items are processed, the output is an array of such JSON objects.

The node does not explicitly handle binary data output.

Dependencies

  • Requires an API key credential for authenticating with the EsmsVN REST API.
  • Uses the base URL https://rest.esms.vn for all API requests.
  • Depends on internal helper methods to list Zalo OAs, templates, and template parameters dynamically.
  • No additional external services beyond EsmsVN are required.

Troubleshooting

  • Invalid Phone Number Format: The phone number must match the Vietnamese mobile number pattern starting with +84 or 0 followed by valid prefixes (3,5,7,8,9) and 8 digits. Errors occur if the format is incorrect. Fix by ensuring correct input format.
  • Unknown Resource Error: If the resource parameter is not recognized, the node throws an error indicating the resource is unknown. Ensure the resource is set to one of the supported values (e.g., ott_message).
  • Template Parameter Mismatch: If required template parameters are missing or invalid, the API may reject the message. Use the dynamic loading feature to select valid parameters.
  • API Authentication Failures: Ensure the API key credential is correctly configured and has necessary permissions.
  • Sandbox Mode Confusion: Messages sent in sandbox mode do not incur costs but also do not reach real recipients. Disable sandbox mode for production sends.
  • Logging Disabled: If troubleshooting issues, enable the "Logging Request" option to capture detailed API request logs.

Links and References

Discussion