Forward Message
AI-generatedOverview
This node is designed to forward messages within the Zalo messaging platform. It allows users to specify an existing message by its ID and forward it to a different conversation thread, which can be either a user or a group chat. This functionality is useful in scenarios where you want to automate message forwarding, such as relaying important notifications, duplicating messages across multiple chats, or integrating with other workflows that require message redistribution.
Practical examples include:
- Automatically forwarding customer support messages from one agent's chat to a supervisor group.
- Relaying alerts or announcements from a bot to multiple user threads.
- Archiving conversations by forwarding messages to a dedicated group chat.
Properties
| Name | Meaning |
|---|---|
| Message ID | The ID of the message to be forwarded. This can be obtained from a trigger node capturing incoming messages. |
| Message Content | Optional content to include with the forwarded message. May be required depending on API constraints. |
| Target Thread ID | The ID of the destination conversation thread where the message will be forwarded. |
| Target Thread Type | The type of the target conversation: either "User" (individual chat) or "Group" (group chat). |
Output
The node outputs JSON data containing details about the forwarding operation:
success: Boolean indicating if the forwarding was successful.operation: The name of the operation performed ("forwardMessage").originalMessageId: The ID of the original message being forwarded.messageContent: The content of the message forwarded, if any.targetThreadId: The ID of the destination thread.targetThreadType: The type of the destination thread ("user" or "group").forwardedMessageId: The ID of the newly forwarded message returned by the API.response: The full response object from the API call.timestamp: The timestamp when the forwarding occurred.debug: An object containing debug information including step details and input parameters.
If the node encounters errors during execution, the output will include error details and success will be false.
The node does not output binary data.
Dependencies
- Requires access to the Zalo API via an authenticated API client.
- Needs an API key credential configured in n8n for authentication with the Zalo service.
- The node internally uses helper methods and shared utilities for error handling and API communication.
Troubleshooting
Common Issues
- Missing or invalid Message ID: The node requires a valid message ID to forward. If this is missing or malformed, the node will throw an error.
- Invalid Target Thread ID or Type: Forwarding requires specifying a valid destination thread ID and type. Incorrect values will cause failures.
- API Authentication Failure: If the API credentials are not set up correctly or have expired, the node will fail to authenticate.
- Unsupported Operation: The node checks if the requested operation is supported; unsupported operations will result in errors.
Error Messages and Resolutions
"Credentials got returned!"— Indicates missing or invalid API credentials. Ensure the API key is properly configured in n8n."Message ID is missing"— The provided message ID is empty or invalid. Provide a correct message ID."Target Thread ID is missing"— The destination thread ID is not specified. Fill in the required field.- Errors related to API calls will include the original error message from the Zalo API. Check network connectivity and API limits.
Links and References
- Zalo Official API Documentation
- n8n Documentation on Creating Custom Nodes
- Zalo Messaging Platform Overview
This summary is based solely on static analysis of the provided source code and property definitions.