Back to skills
extension
Category: OtherAPI key required

extracttodoitemsfromwecom

Extract todo items from WeCom/企业微信 robot messages and write them into WeCom document table task lists. Use when Hermes receives WeCom group bot messages, chat text, or copied messages that contain tasks, assignees, deadlines, remarks, or priorities, and needs to append them to the screenshot-style WeCom todo table by API first with UI filling as fallback.

personAuthor: user_febf9580hubcommunity

WeCom Todo Capture

Use this skill to turn WeCom messages into structured todo rows and append them to the configured WeCom document table without overwriting existing rows.

Workflow

  1. Confirm Hermes can receive the source message text. If the current group robot only supports outbound webhook sending, stop and ask for a message-receiving bridge, self-built app callback, or manual pasted text before parsing.
  2. Parse the message into the standard JSON contract below. Prefer scripts/parse_todo_message.py for repeatable extraction, then use model judgment for Chinese natural-language dates or unusual wording.
  3. Mark the result as low confidence when the task is unclear, the assignee is unknown, multiple assignees are possible, or a date phrase is ambiguous. Ask for confirmation only in those cases.
  4. Write by API first when WeCom document table credentials, document/table IDs, field IDs, and assignee mappings are available.
  5. If the API cannot be used, fill the WeCom document table UI by locating the first blank row or adding a new row. Never overwrite populated rows.

Parse Contract

Return this shape before writing:

{
  "todo_item": "",
  "assignee_display": "",
  "assignee_userid": "",
  "remark": "",
  "priority": "",
  "due_date": "",
  "confidence": 0.0,
  "needs_confirmation": false,
  "source_message": ""
}

Required first-version fields are todo_item, assignee_display or assignee_userid when present, and due_date when present. Leave due_date blank if the message does not include a deadline.

Only fill priority when the message explicitly says a priority, such as 紧急, 高优, 一般, or 低优. Do not default every task to 一般.

Use remark for follow-up context that is not the task title, such as 退货保, 授权链接, or other short qualifiers.

Quick parser usage:

python scripts/parse_todo_message.py --message "@Hermes 帮我记一下,泽欣-paisley 6月1日前处理 印尼 zoar-shopee 授权链接" --assignee "泽欣-paisley=paisley.userid"

For production mappings, pass --assignees path/to/private-assignees.json or --assignees-json from the calling service instead of hard-coding people in the skill.

Writing Rules

Use references/field-mapping.md before writing rows. The target columns are:

  • 是否完成: default unchecked/false
  • 待办事项: parsed task title
  • 负责人: mapped WeCom user/person field value
  • 跟进备注: parsed remark or blank
  • 优先级: parsed explicit priority or blank
  • 截止时间: parsed date or blank
  • 剩余时间情况: let the table formula/status compute it when possible; otherwise leave blank

Always append into a blank row or create a new row. Never update, delete, or replace existing task rows unless the user explicitly asks for that exact row to be changed.

References

  • Read references/field-mapping.md when mapping parsed JSON to table fields or deciding whether to confirm.
  • Read references/wecom-setup.md when Hermes intake, WeCom document API access, credentials, or UI fallback setup is unclear.