推送消息 icon

推送消息

构建推送消息节点

Overview

This node is designed to construct and push message notifications, specifically for report messages. It allows users to specify recipients, the type of message, and relevant parameters for a report. Common scenarios include sending automated report alerts or notifications to specified users within an organization. For example, it can be used to notify a group of users when a new business report is generated or when certain thresholds in data are met.

Properties

Name Type Meaning
推送用户 String The user(s) to receive the push notification. Multiple users should be separated by commas (e.g., aaa,bbb).
消息类型 Options The type of message to send. Currently supports "报表消息" (Report Message).
报表viewlet String The identifier or name of the report viewlet. Only required when 消息类型 is "报表消息".
参数 JSON Additional parameters for the report. Only required when 消息类型 is "报表消息".

Output

The node outputs a JSON object with the following structure:

{
  "target": "<推送用户>",
  "extParameters": "{\"classification\":\"<消息类型>\",\"type\":\"报表提醒\",\"viewlet\":\"<报表viewlet>\",\"params\":<参数>}"
}
  • target: The value provided in "推送用户".
  • extParameters: A stringified JSON object containing:
    • classification: The selected "消息类型".
    • type: Always set to "报表提醒" (Report Reminder) for this operation.
    • viewlet: The value from "报表viewlet".
    • params: The value from "参数".

Note: The node does not output binary data.

Dependencies

  • No external services or API keys are required.
  • No special n8n configurations or environment variables are needed.

Troubleshooting

  • Missing Required Fields: If any required property (such as "推送用户" or "消息类型") is missing, the node will throw an error and stop execution unless "Continue On Fail" is enabled.
  • Invalid JSON in 参数: If the "参数" field contains invalid JSON, the node may fail to process the item.
  • Error Handling: If an error occurs and "Continue On Fail" is enabled, the node will add an error field to the output for the failed item, along with the original input.

Links and References

Discussion