agentsclimarketplace

Dingtalk table webhook

Skill songsunny00/MySkills/skills/dingtalk-table-webhook

根据不同角色,收集或编写日常常用skill

Install
npx -y skills add songsunny00/MySkills --skill dingtalk-table-webhook

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when the user wants to add a record into a DingTalk table through an automation webhook, especially when they describe the record in natural language, provide a Markdown file path as the content source, or need field validation, a field-summary preview, and explicit confirmation before sending. Image recognition is opt-in — only enabled when the user explicitly requests it.

SKILL.md

7.8 KB, ~1.7k tokens by cl100k_base, as published. Nobody here has run it

dingtalk-table-webhook

Overview

Turn natural-language record requests into a configured DingTalk table automation webhook payload.

Core principle: read project config → fill fields → validate → preview → confirm → send.

When a Markdown file path is provided, 原始内容 comes from that file (content passed through as-is); controlled default filling applies to other business fields.

When to Use

  • User wants to add a record to a DingTalk table via automation webhook
  • User describes the record in natural language or provides a Markdown file path
  • User needs field validation, enum checking, or a preview before sending

Do not use when the task is only to explain DingTalk APIs, for bulk import, or when there is no project config.

Required Inputs

  1. Read config from skills/dingtalk-table-webhook/dingtalk-table-webhooks.json. Do NOT read from skills-config/.
  2. If the file does not exist, tell the user to create it and stop.
  3. Never guess the webhook schema — follow config exactly.

Webhook URL: use webhook.env env var if set; otherwise webhook.url; otherwise stop and ask.

Do not echo full webhook URLs to the user.

Config Validation for Defaults

If a defaults node is present, validate before proceeding:

Default keyConstraint
sharerMust be stringArray; fields.sharer must exist and be type stringArray
categoryMust be in fields.category.options; fields.category must be type enum
triggerMust be a string; fields.trigger must exist and be type string
creatorMust be a string; fields.creator must exist and be type string

Any violation → config error, block execution. Never silently ignore.

Execution Flow

1. Select target table

Match user request against triggers in config (exact phrase match only, no fuzzy matching).

  • Longer matching trigger phrase wins over shorter.
  • One match → use it. No match + one table → use it. Otherwise → ask user.

2. Extract business fields

Extract only fields defined in the selected table's config. Do not invent values, auto-correct enums, or infer member IDs.

3. Markdown file input

Recognize markdownFile only from explicit labels: Markdown 文件:, Markdown 文件路径:, md路径:.

Do not extract from code blocks, example text, links, or generic file mentions.

If the label is present but value is empty → stop and ask. If multiple paths resolve to different files → ask user to choose.

4. Markdown file path resolution

  • Strip surrounding quotes.
  • Absolute paths: use directly. Relative paths: resolve from workspace root, then git root.
  • Do not scan directories or use the currently open editor file.

5. Controlled default filling (markdownFile present only)

Read the Markdown file first so title/content values are available. Explicit user input always wins.

FieldFallback order
titleUser input → first # heading → first non-empty text fragment → filename (without .md)
dateUser input → today YYYY-MM-DD
sharerUser input → defaults.sharer → leave empty (optional)
creatorUser input → defaults.creator → leave empty (optional)
categoryUser input → defaults.category技术动态 (only if in options)
triggerUser input → defaults.trigger前端分享 (only if fields.trigger exists)

The 技术动态 and 前端分享 last-resorts are narrowly scoped share-record defaults, not generic fallbacks. Final category must pass exact enum validation regardless of source. If no trigger field in config, do not inject a trigger value.

6. Content source

When markdownFile is present, ignore any chat-provided content. 原始内容 must come only from the file.

7. Markdown content generation

  1. Validate file path. Read as UTF-8.
  2. Images are skipped by default. Enable image recognition only when the user explicitly requests it (e.g. 识别图片, 需要识别图片, 处理图片).
  3. If images are skipped: use file content as-is.
  4. If images are enabled: replace each image reference at its original position with image output (see §8). All other content passes through unchanged — do not reformat or summarize non-image text.

Block if: file is unreadable, missing, not .md, or produces blank output. Exception: file contains only images and all fail → keep failure notes, do not block.

8. Image handling (opt-in only)

When image recognition is enabled:

  • Flowchart-like image → output structured 节点 -> 节点 relations.
  • Other readable image → output a normal summary.
  • Unreadable or unsupported source → insert failure note at that position, do not block.

Supported sources: local paths (relative to MD file or absolute), inline ![alt](path), reference-style. Unsupported (failure note): http://https:// URLs, data: URIs, HTML <img> tags.

9. Validate

  • All required fields present (after default filling if markdownFile used)
  • Enum values exactly match configured options
  • Date fields in YYYY-MM-DD; if ambiguous → ask, do not guess
  • Array fields match configured type

Ask for all missing fields in one message.

10. Build payload

Use config keys (recordsKey, fieldsKey). Build as structured data and serialize with json.dump. Do not hand-build JSON strings.

11. Confirm before sending

Show:

  • Target table label
  • All field values
  • 原始内容来源: Markdown 文件 <path> (if applicable)

Ask for explicit confirmation. Never send on implied intent.

12. Send the webhook

After confirmation, pipe payload via stdin to the send script — no temp file needed:

import json, subprocess, sys
payload = { ... }
proc = subprocess.run(
    [sys.executable, "skills/dingtalk-table-webhook/scripts/send_webhook.py", "-", "<table_key>"],
    input=json.dumps(payload, ensure_ascii=False),
    capture_output=True, text=True
)
print(proc.stdout)
if proc.returncode != 0:
    print(proc.stderr)

Do NOT use the Write tool to produce a JSON file — it does not escape special characters correctly.

13. Report result

Report: table name, HTTP status, response summary. On failure, note likely cause (missing config, invalid enum, malformed payload, webhook rejection).

Interaction Rules

  • Ask for all missing required fields at once, not one per turn.
  • For invalid enums: show allowed options, do not silently map.
  • Do not expose full webhook URLs or write secrets to repo files.

Output Format

Before confirmation:

目标表:<label>

准备写入的记录:
- <field>: <value>
- 原始内容来源: Markdown 文件 <path>(如适用)

请确认是否发送。

After sending:

已发送到:<label>
- HTTP 状态:<status>
- 结果:<short summary>

Checklist

  • Config from skills/dingtalk-table-webhook/dingtalk-table-webhooks.json (not skills-config/)
  • defaults validated (types, enum membership)
  • Target table selected
  • Default filling applied (markdownFile present only)
  • Missing required fields collected in one turn
  • Enum values validated exactly
  • Markdown file read; non-image content passed through as-is
  • Images skipped unless user explicitly opted in
  • Chat content ignored when markdownFile present
  • Payload sent via stdin to send_webhook.py (no temp file, no Write tool for JSON)
  • Preview shown; explicit confirmation received
  • Result reported

Gives 0 of the 12 instructions most apis services skills give in ~1.7k tokens

Counted across 424 of the 426 authors here whose files we hold, read 2026-08-06

  • use plural nouns for resource namesin 41 of 424, across 32 files
  • use cursor-based pagination for large datasetsin 35 of 424, across 20 files
  • include rate limit headers in responsesin 25 of 424, across 13 files
  • Use kebab-case for multi-word resourcesin 23 of 424, across 13 files
  • version APIs in the URL pathin 19 of 424, across 9 files
  • use semantic HTTP status codesin 18 of 424, across 8 files
  • verify webhook signaturesin 18 of 424, across 11 files
  • use query parameters for filteringin 17 of 424, across 6 files
  • use async database operationsin 14 of 424, across 7 files
  • wrap successful responses in a data fieldin 13 of 424, across 3 files
  • prefix sorting parameters with a hyphen for descending orderin 13 of 424, across 3 files
  • set appropriate HTTP status codesin 13 of 424, across 6 files

Said here and by no other author read

  • select target table by exact trigger phrase
  • ask for all missing required fields in one turn
  • validate enum values exactly
  • read markdown file for content if provided
  • skip images unless explicitly requested
  • build payload as structured data

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.