DingTalkStreamTriggerNode icon

DingTalkStreamTriggerNode

钉钉流式触发节点

Overview

This node acts as a trigger for real-time events from DingTalk's streaming API. It listens to incoming messages or notifications on a specified topic and emits them as workflow data. This is useful for automating workflows based on live DingTalk events, such as receiving chat messages, robot notifications, or other stream-based updates.

A practical example would be automatically processing incoming DingTalk robot messages to trigger downstream actions like logging, alerting, or integrating with other systems without polling.

Properties

Name Meaning
isAutoResponse Whether the node should automatically send a response back to DingTalk to prevent server-side retries. Options: true (default) or false.

Output

The node outputs JSON data with the following structure:

  • accessToken: The current access token used for authentication with DingTalk.
  • messageId: A unique identifier for the received message/event.
  • message: The parsed content of the incoming DingTalk event, represented as a JSON object.

This output allows subsequent nodes in the workflow to process the event details directly.

Dependencies

  • Requires an API key credential for DingTalk (client ID and client secret).
  • Uses the external dingtalk-stream library to connect and listen to DingTalk streaming events.
  • Needs proper configuration of the DingTalk API credentials within n8n.

Troubleshooting

  • Connection issues: If the node fails to connect, verify that the provided API credentials are correct and have sufficient permissions.
  • No events received: Ensure that the DingTalk service is sending events on the subscribed topic and that network connectivity is stable.
  • Automatic response disabled: If isAutoResponse is set to false, the server may retry sending the same event multiple times, causing duplicate triggers.
  • JSON parsing errors: Incoming messages are parsed as JSON; malformed data could cause errors. Check the source of the events for correctness.

Links and References

Discussion