Overview
The Synology Chat node's "Send Message" operation allows you to send a direct message to a specific user on Synology Chat, optionally including text and a media attachment. This is useful for automating notifications, alerts, or updates directly to users within your Synology Chat environment.
Practical examples:
- Sending automated alerts to IT staff when a server goes down.
- Notifying a user about the completion of a workflow or task.
- Delivering scheduled reminders or reports with optional images or files.
Properties
| Name | Type | Meaning |
|---|---|---|
| User ID | Number | The destination User ID to whom the message will be sent. |
| Text | String | The text content of the message to send. |
| Media Link | String | (Optional) A URL to a media resource (e.g., image) to attach to the message. |
Output
The output for each processed item includes the following fields in the json object:
| Field | Description |
|---|---|
| operation | The operation performed ("sendMessage"). |
| userId | The User ID to whom the message was sent. |
| text | The text content that was sent. |
| mediaLink | The media link that was attached (if any). |
| response | The API response from Synology Chat after sending the message. This typically contains status and message details. |
Example output:
{
"operation": "sendMessage",
"userId": 12345,
"text": "Hello World!",
"mediaLink": "https://example.com/image.png",
"response": {
// Response data from Synology Chat API
}
}
Dependencies
- External Service: Requires access to a Synology Chat instance with API enabled.
- Credentials: Needs a configured n8n credential named
synologyChatApicontaining:token: API token for authentication.baseUrl: Base URL of your Synology Chat server.ignoreSSLErrors: (optional) Whether to ignore SSL errors.
- npm Dependency: Uses the
synology-chat-communicatorpackage.
Troubleshooting
Common issues:
- Invalid Credentials: If the API token or base URL is incorrect, the node will fail to authenticate. Double-check your credentials.
- User ID Not Found: If the specified User ID does not exist, the API may return an error indicating the user cannot be found.
- Media Link Issues: If the media link is invalid or inaccessible, the message may be sent without the attachment or fail.
- SSL Errors: If your Synology Chat uses self-signed certificates, set
ignoreSSLErrorsto true in your credentials.
Error messages:
"Cannot read property '...' of undefined": Likely due to missing or incorrect input properties.NodeOperationError: General error wrapper; check the error message for specifics.Authentication failed: Indicates issues with the provided API token or permissions.