What does dingtalk-send-weekly-report-card do?
Read DingTalk weekly reports and generate, validate, and send customer satisfaction follow-up interactive cards.
This skill automates the following steps:
- Parse DingTalk weekly report data to extract relevant customer interaction details.
- Generate interactive card payloads tailored for customer satisfaction surveys.
- Validate the card structure against DingTalk's API requirements.
- Send the validated cards to specified recipients or groups via DingTalk Robot.
Usage
The skill is invoked by an AI agent to streamline the process of sending customer satisfaction follow-up cards. It typically requires:
- Read access to a DingTalk weekly report (e.g., via API or file).
- Configuration of the DingTalk Robot webhook URL.
- Optional customization of the card template.
Platforms
- DingTalk (DingTalk Robot, Interactive Cards)
- AI Agent Frameworks (e.g., Claude Code, Cursor, Codex)
How It Works
- The agent receives the weekly report data (JSON, CSV, or plain text).
- It extracts customer interaction entries and their statuses.
- For each entry requiring a follow-up, it generates an interactive card with satisfaction survey options.
- The card is validated against DingTalk's card schema.
- The validated card is sent via a POST request to the configured webhook URL.
Configuration
DINGTALK_WEBHOOK_URL: The webhook URL for the DingTalk Robot.CARD_TEMPLATE_ID(optional): The ID of a custom card template.REPORT_SOURCE: The source of the weekly report (e.g., API endpoint or file path).
Example
# Send a card for a specific customer entry
dingtalk-send-card --customer-id "12345" --satisfaction-score 4
Dependencies
- Python 3.8+
requestslibrary for HTTP calls.jinja2for card template rendering (if using templates).
Notes
- Ensure the DingTalk Robot has permission to send messages to the target group or user.
- Card payloads must follow the DingTalk Interactive Card documentation.