SuperAPI AI Directory

dingtalk-oa

General & other

View repository

Updated 10-15 21:10

About this skill

DingTalk OA Approval Skill

🧪 EXPERIMENTAL · Experimental / Preview — multi mode currently does not meet the stable standard. All dingtalk-* skills have passed the dispatch verifier, but the interfaces, naming, and cross-skill references may be adjusted later; for production/shared environments, prioritize mono mode (dws skill setup --mode mono). For issues, please file an issue.

PREREQUISITE: Read the dws-shared skill first for auth, global flags, product routing, URL preflight, error codes, and safety rules. The dws binary must be on PATH.

⚠️ Command availability is subject to the current dws binary. Service discovery has been taken offline; this document is released along with the built-in skill; if dws <cmd> --help does not exist, it means the current version does not expose that command. If the command exists but the call fails, confirm the static endpoint directory and backend tool registration according to the endpoint or tool hint in the error. Before the actual call, you can use dws <cmd> --help or --dry-run to verify.

Command reference:oa.md。

Shortcuts (preferred when there is no dedicated script/recipe)

The following shortcuts come from a public catalog independent of the Runtime Schema. First route by this skill's intent table, scripts, and recipes: when a dedicated script/recipe exactly covers the scenario, execute it accordingly; otherwise, when the user's intent matches, shortcuts take precedence over hand-written atomic commands. Use dws shortcut list --service oa --format json to read parameters, constraints, risks, and examples, and use dws oa <shortcut> --help to verify the current Cobra flags; do not call + on the dws schema。

Shortcut Risk Applicable scenario
dws oa +list-cc read Get the list of approval forms cc'd to the current user
dws oa +list-executed read Get the list of approval forms the current user has already processed
dws oa +list-forms read Get the list of approval forms visible to the current user
dws oa +list-pending read Query approvals pending my handling (time range is in epoch milliseconds)
dws oa +list-submitted read Get the list of approval forms the current user has initiated
dws oa +my-initiated read List approval documents I have initiated (submitted)
dws oa +search-forms read Fuzzy-search approval forms visible to the current user by keyword

Intent table

User says Command
"Approvals pending my handling / pending approval within 7 days" python scripts/oa_pending_review.py --days 7
"Check approval details" dws oa approval detail --instance-id <processInstanceId>
"Approve / reject approval" dws oa approval approve --instance-id <id> --task-id <taskId> / reject --instance-id <id> --task-id <taskId> --remark "<原因>"(requires user confirmation)
"Batch approve / batch reject" python scripts/oa_batch_approve.py --action approve --days 7
"Cancel approval" dws oa approval revoke --instance-id <id>
"Approvals I have initiated" dws oa approval list-initiated --process-code <code> --start "<ISO-8601>"(processCode comes from dws oa approval list-forms)

Dangerous operations

approval approve / reject cannot be undone; you must first show the user a summary and obtain explicit consent, then add --yes。

Cross-product collaboration

  • Urge others to approve → @them in the group (dingtalk-chat), do not use escalate-ding in the #1 message script
  • Create a to-do after approval → switch to dingtalk-todo