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 when they arrive. This is useful for automating workflows based on live DingTalk events, such as receiving chat messages, bot interactions, or other DingTalk stream updates.
A practical example would be automatically processing incoming DingTalk bot messages to trigger follow-up actions like sending notifications, logging data, or updating external systems.
Properties
Name | Meaning |
---|---|
isAutoResponse | Whether the node should automatically send a response back to DingTalk to prevent retries from the server. Options: true (default), false |
Output
The node outputs JSON data with the following structure:
accessToken
: The current access token used for authenticating 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 downstream nodes to process the event details and metadata.
Dependencies
- Requires an API key credential for DingTalk API authentication (client ID and client secret).
- Uses the
dingtalk-stream
library to connect and listen to DingTalk streaming events. - Needs network connectivity to DingTalk's streaming service.
Troubleshooting
- Connection issues: If the node fails to connect, verify that the provided API credentials are correct and have necessary permissions.
- No events received: Ensure that the DingTalk account or bot is properly configured to send events to the streaming API.
- Automatic response disabled: If
isAutoResponse
is set to false, the server may retry sending the same event multiple times, causing duplicate triggers. - Invalid message format: Incoming messages are parsed as JSON; malformed data could cause errors. Check the source of the events for correctness.
Links and References
- DingTalk Developer Documentation
- dingtalk-stream npm package (for underlying streaming client)