Zalo icon

Zalo

Zalo Node

Overview

This node sends messages via a specified API to either individual users or groups. It supports sending messages in two formats: a raw JSON structure for advanced/customized message content, or a predefined simple message format with optional attachments and metadata like urgency and time-to-live (TTL). This flexibility makes it useful for automating chat notifications, alerts, or group communications within workflows.

Common scenarios:

  • Sending personalized alerts or reminders to a user.
  • Broadcasting announcements or updates to a group chat.
  • Delivering formatted messages with styles and urgency levels.
  • Attaching files or media to messages.

Practical example:

  • A workflow triggers when a support ticket is updated, sending an urgent styled message to the assigned user's chat thread.
  • A marketing automation sends a group message with promotional content and attached brochures.

Properties

Name Meaning
Thread ID The identifier of the target user or group thread to which the message will be sent.
Thread Type Specifies whether the message is sent to a single user (User) or a group chat (Group).
Send Option Choose between sending a Raw Json message (custom JSON format) or a Message (predefined format).
Raw Json The full JSON object representing the message content, used only if Send Option is Raw Json.
Message The text content of the message, used only if Send Option is Message.
Attachment File path(s) for any attachments to include with the message, applicable only for Message option.
TTL (Milliseconds) Time-to-live for the message in milliseconds; how long the message should persist before expiring. Only for Message option.
Urgency The importance level of the message; options are Default, Important, or Urgent. Applies only for Message option.

Output

The node outputs JSON data representing the result of the send message operation. This typically includes confirmation details such as message ID, status, timestamps, or error information if the send failed.

If binary data is output (not explicitly shown in the code), it would represent any file attachments or media returned by the API after sending.

Dependencies

  • Requires access to the target messaging API endpoint.
  • Needs appropriate API authentication credentials configured in n8n (e.g., an API key or token).
  • Uses standard Node.js modules for HTTP requests and JSON handling (implied but not explicitly shown).

Troubleshooting

  • Missing or invalid Thread ID: The node requires a valid thread ID; ensure this is correctly provided and corresponds to an existing user or group.
  • Incorrect Thread Type: Selecting the wrong thread type may cause the API to reject the message; verify if the target is a user or group.
  • Malformed Raw JSON: When using the raw JSON option, invalid JSON syntax or incorrect message schema can cause errors. Validate JSON before sending.
  • Attachment Path Issues: For attachments, ensure file paths are correct and accessible by n8n.
  • API Authentication Errors: Check that the API credentials are properly set up and have sufficient permissions.
  • Timeouts or Network Errors: Network connectivity issues can prevent message delivery; verify network access to the API.
  • Error Messages: The node may throw errors related to API response codes or validation failures. Review the error message details and adjust inputs accordingly.

Links and References


Note: The source code was heavily obfuscated, so the above summary is based on static analysis of the provided property definitions and typical patterns for such a node.

Discussion