WeCom To-Do Item Editing Skill
is the official command line program provided by WeCom, all operations are completed by executing
commands.
Perform write operations on WeCom to-do items via
, supporting four types of operations: create to-do, update to-do, delete to-do, change user status.
Behavior Strategy
Retry Policy: When encountering "HTTP error returned" or "HTTP request failed", retry actively, with a maximum of 3 retries.
Operations
1. Create To-Do
Create a new to-do item, you can specify the content, assignees and reminder time:
bash
wecom-cli todo create_todo '<json format input parameters>'
Parameter Description:
Need to comply with the format requirements in "Notes":
| Parameter | Type | Required | Description |
|---|
| string | ✅ | To-do content |
| object | ❌ | Assignee list, see Note 7 for format |
| string | ❌ | Reminder time, format: |
Call Example:
bash
wecom-cli todo create_todo '{"content": "<to-do content>", "remind_time": "2025-06-01 09:00:00"}'
Return Format:
json
{
"errcode": 0,
"errmsg": "ok",
"todo_id": "TODO_ID"
}
2. Update To-Do
Modify the content, assignees, status or reminder time of an existing to-do item:
bash
wecom-cli todo update_todo '<json format input parameters>'
Parameter Description:
Need to comply with the format requirements in "Notes":
| Parameter | Type | Required | Description |
|---|
| string | ✅ | To-do ID |
| string | ❌ | New to-do content |
| object | ❌ | New assignee list (full replacement, not append), see Note 7 for format. If you need to add new assignees, you need to query the existing assignees first, merge them and submit together |
| number | ❌ | New to-do status: -Completed, -In progress. Use for deletion |
| string | ❌ | New reminder time |
Call Example:
bash
wecom-cli todo update_todo '{"todo_id": "TODO_ID", "content": "<to-do content>", "remind_time": "2025-07-01 09:00:00"}'
Return Format:
json
{
"errcode": 0,
"errmsg": "ok"
}
3. Delete To-Do
Delete the specified to-do item:
bash
wecom-cli todo delete_todo '<json format input parameters>'
Parameter Description:
Need to comply with the format requirements in "Notes":
| Parameter | Type | Required | Description |
|---|
| string | ✅ | To-do ID |
Call Example:
bash
wecom-cli todo delete_todo '{"todo_id": "TODO_ID"}'
Return Format:
json
{
"errcode": 0,
"errmsg": "ok"
}
Deletion operation is irreversible, you should confirm with the user before execution.
Note:
has the same effect as setting
in
,
is preferred.
4. Change User To-Do Status
Change the current user's status in a to-do (Reject/Accept/Completed):
bash
wecom-cli todo change_todo_user_status '<json format input parameters>'
Parameter Description:
Need to comply with the format requirements in "Notes":
| Parameter | Type | Required | Description |
|---|
| string | ✅ | To-do ID |
| number | ✅ | User status: -Rejected, -Accepted, -Completed |
Call Example:
bash
wecom-cli todo change_todo_user_status '{"todo_id": "TODO_ID", "user_status": 2}'
Return Format:
json
{
"errcode": 0,
"errmsg": "ok"
}
Typical Workflows
Create To-Do and Assign to Colleague
User asks: "Help me create a to-do, ask Zhang San to finish the requirement document before next Monday"
- Step 1: Query Zhang San's userid through the wecomcli-lookup-contact skill, filter members with the name "Zhang San" from the returned results to get his userid
- Step 2: Create and assign the to-do:
wecom-cli todo create_todo '{"content": "<to-do content>", "follower_list": {"followers": [{"follower_id": "zhangsan", "follower_status": 1}]}, "remind_time": "2025-03-24 09:00:00"}'
must come from the
returned by the
interface of the
skill, guessing is prohibited. If there are multiple people with the same name in the search results, you need to display a candidate list for the user to confirm.
Mark To-Do as Completed
Two scenarios need to be distinguished:
Mark the to-do itself as completed (modify
) and
Mark my participation status as completed (modify
).
Scenario A: Mark the to-do itself as completed
User asks: "Mark the to-do 'Complete Q2 planning document' as completed" / "Close this to-do"
- Step 1: Get the to-do list through wecomcli-get-todo-list, find the todo_id of the target to-do:
wecom-cli todo get_todo_list '{}'
- Step 2: Get details through wecomcli-get-todo-detail to confirm it is the target to-do:
wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'
- Step 3: After confirmation, change the to-do status to completed:
wecom-cli todo update_todo '{"todo_id": "TODO_ID", "todo_status": 0}'
Scenario B: Mark my participation status as completed
User asks: "I have finished this to-do" / "Mark my part as completed"
- Step 1: Get the to-do list through wecomcli-get-todo-list, find the todo_id of the target to-do:
wecom-cli todo get_todo_list '{}'
- Step 2: Get details through wecomcli-get-todo-detail to confirm it is the target to-do:
wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'
- Step 3: After confirmation, change the current user's participation status to completed:
wecom-cli todo change_todo_user_status '{"todo_id": "TODO_ID", "user_status": 2}'
How to judge user intent: If the user says "mark as completed" and the to-do is created by himself without other assignees, it usually refers to Scenario A (mark the to-do itself as completed). If the to-do has multiple participants, the user may just want to mark his own part as completed (Scenario B). Confirm with the user when uncertain.
What the user provides is the to-do content description instead of ID, so you need to search and match through wecomcli-get-todo-list and wecomcli-get-todo-detail first. When multiple similar to-dos are matched, list the candidates for the user to confirm.
Update To-Do Content or Reminder Time
User asks: "Change the reminder time of the requirement document to-do to next Friday"
- Step 1: Find the target to-do:
wecom-cli todo get_todo_list '{}'
, then query details: wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID_1", "TODO_ID_2"]}'
- Step 2: Update after confirming the target:
wecom-cli todo update_todo '{"todo_id": "TODO_ID", "remind_time": "2025-03-28 09:00:00"}'
Delete To-Do
User asks: "Delete the 'Code Review' to-do"
- Step 1: Find the target to-do:
wecom-cli todo get_todo_list '{}'
, then query details: wecom-cli todo get_todo_detail '{"todo_id_list": ["TODO_ID"]}'
- Step 2: Delete after confirming with the user:
wecom-cli todo delete_todo '{"todo_id": "TODO_ID"}'
You must confirm with the user before deletion, example confirmation wording: "Are you sure to delete the to-do 'Code Review'? It cannot be recovered after deletion."
Notes
-
todo_id Source Rules
- must come from the results returned by , speculation or construction by yourself is prohibited
- Users usually provide to-do content descriptions instead of IDs, you should first query the list through wecomcli-get-todo-list and then match
- If multiple similar to-dos are matched, display a candidate list for the user to confirm
-
follower_id Source Rules
- is , which must be obtained through the interface of the skill
- Guessing userid based on user name is prohibited
- If there are multiple people with the same name in the search results, display a candidate list for the user to choose
-
Time Format
- All time parameters use format
- When users say relative time such as "tomorrow", "next Monday", calculate the specific date based on the current date
-
Status Value Meaning
- To-do status (): -Completed, -In progress, -Deleted
- User status (): -Rejected, -Accepted, -Completed
- Assignee status (): -Rejected, -Accepted, -Completed
-
Destructive Operation Confirmation
- You must confirm with the user before deleting a to-do ()
- It is recommended to confirm with the user before changing the status to "Reject" ()
-
Error Handling
- If is not , it means the interface call failed, inform the user of the error information in
-
Format of
(when used as an input parameter)
json
"follower_list": { // Assignee list
"followers": [ // Note that there is another layer of "followers" inside, its value is the real list array
{
"follower_id": "FOLLOWER_ID", // Assignee id
"follower_status": 1 // Assignee status: 0-Rejected, 1-Accepted, 2-Completed
}
]
}
is userid, which needs to be obtained through
query, speculation or construction by yourself is prohibited.
Related Skills
- Get To-Do List: — Query the to-do summary list to get todo_id
- Get To-Do Details: — Get complete content according to todo_id
- Address Book Query: of — Get member userid for