SuperAPI AI Directory

wecomcli-schedule

Office & productivity

View repository

Updated 10-16 10:20

About this skill

WeCom schedule management skill

wecom-cli is a command-line program provided by WeCom. All operations are completed by executing the wecom-cli command.

Interact with the WeCom schedule system through wecom-cli schedule <接口名> '<json入参>' .

Notes

  • Schedule list query only supports30 days before and after the current day, time format YYYY-MM-DD or YYYY-MM-DD HH:mm:ss
  • When participant userids are involved, you must first use the wecomcli-contact skill to obtain them; when duplicate names exist, show candidates for the user to choose (do not expose userids)
  • Before creating/modifying/canceling, first confirm the target schedule and participant information
  • errcode != 0 Display error information when; returned start_time/end_time is a Unix timestamp (seconds), which needs to be converted to a readable format
  • Pay attention to time format conversion: API input parameters use string format (such as YYYY-MM-DD HH:mm:ss), but return values are mostly Unix timestamps, and format conversion is required when using them

API list

get_schedule_list_by_range — query schedule ID list

wecom-cli schedule get_schedule_list_by_range '{"start_time": "YYYY-MM-DD HH:mm:ss", "end_time": "YYYY-MM-DD HH:mm:ss"}'

Returns schedule_id_list array. Only supports 30 days before and after the current day.

get_schedule_detail — get schedule details

wecom-cli schedule get_schedule_detail '{"schedule_id_list": ["SCHEDULE_ID_1", "SCHEDULE_ID_2"]}'

Supports 1~50 IDs, returns schedule title, time, location, participants, etc. See API details。

create_schedule — create schedule

wecom-cli schedule create_schedule '{"schedule": {"start_time": "YYYY-MM-DD HH:mm:ss", "end_time": "YYYY-MM-DD HH:mm:ss", "summary": "日程标题", "attendees": [{"userid": "USER_ID"}], "reminders": {"is_remind": 1, "remind_before_event_secs": 3600, "timezone": 8}}}'

See API details | reminders field。

update_schedule — modify schedule

Only pass in the fields that need to be modified; fields not passed remain unchanged.

wecom-cli schedule update_schedule '{"schedule": {"schedule_id": "SCHEDULE_ID", "summary": "更新后的标题"}}'

See API details。

cancel_schedule — cancel schedule

wecom-cli schedule cancel_schedule '{"schedule_id": "SCHEDULE_ID"}'

add_schedule_attendees / del_schedule_attendees — manage participants

  • Add participants:
wecom-cli schedule add_schedule_attendees '{"schedule_id": "SCHEDULE_ID", "attendees": [{"userid": "USER_ID"}]}'
  • Remove participants:
wecom-cli schedule del_schedule_attendees '{"schedule_id": "SCHEDULE_ID", "attendees": [{"userid": "USER_ID"}]}'

check_availability — query availability

wecom-cli schedule check_availability '{"check_user_list": ["USER_ID_1", "USER_ID_2"], "start_time": "YYYY-MM-DD HH:mm:ss", "end_time": "YYYY-MM-DD HH:mm:ss"}'

Supports 1~10 users, returns each user's list of busy periods. See API details。


Typical workflows

Query schedules

Classic query examples:

  • "What schedules do I have today?"
  • "Help me check whether there is a meeting this Wednesday afternoon"
  • "What is tomorrow's schedule?"
  • "Check whether there have been any schedules about project review recently"
  • "What are my schedules from Monday to Friday next week?"

Process:

  1. Calculate the time range according to the user's intent (such as "today"→00:00:00 to 23:59:59 of the current day, "this week"→Monday to Sunday of this week)
  2. Call get_schedule_list_by_range to get the schedule ID list
  3. Call get_schedule_detail to batch get details, and convert Unix timestamps to readable time
  4. If the user mentions keywords (such as "project review"), match and filter in summary ; if not found, gradually expand the range to the upper limit of 30 days before and after
  5. When displaying the schedule list, include key information such as title, time, location, and participants, so users can quickly understand

Create Schedule

Classic query examples:

  • "Help me create a meeting from 2 PM to 3 PM tomorrow afternoon, titled Requirements Review"
  • "Schedule a full-day team building activity on Friday"
  • "Create a schedule: discuss the product plan with Zhang San and Li Si at 10 AM the day after tomorrow, location: 3rd-floor meeting room"
  • "Help me create a schedule, next Monday 14:00-15:00, remind me 15 minutes in advance"
  • "Set up a schedule for tomorrow morning, invite Wang Wei to attend"

Process:

  1. Parse the user's intent and extract information such as time, title, location, participants, and reminder settings
  2. If participants are involved, first use wecomcli-contact to query the userid; if there are duplicate names, display candidates for the user to choose
  3. If the user does not specify a reminder, set a reminder 15 minutes in advance by default (remind_before_event_secs: 900)
  4. If the user says "all day", set is_whole_day: 1, and set the time from 00:00:00 to 23:59:59 on that day
  5. After confirming the schedule information (title, time, location, participants, etc.) with the user, call create_schedule

Modify Schedule

Classic query examples:

  • "Move tomorrow's Requirements Review to 3 PM the day after tomorrow"
  • "Help me modify the title of this afternoon's meeting to Technical Plan Review"
  • "Change the location of my 2 PM schedule today to an online Tencent Meeting"
  • "Postpone Friday's team building activity by one hour"
  • "Help me add a description to tomorrow's weekly meeting: discuss Q2 planning"

Process:

  1. First locate the target schedule through the query workflow (match based on keywords such as the time and title mentioned by the user)
  2. If multiple schedules are matched, display a candidate list for the user to confirm
  3. Confirm with the user the fields to be modified and the target values
  4. Call update_schedule, and pass in only the fields that need to be modified

Cancel Schedule

Classic query examples:

  • "Cancel tomorrow afternoon's Requirements Review"
  • "Help me delete Friday's team building schedule"
  • "I don't want to have the 3 PM meeting today anymore, help me cancel it"

Process:

  1. First locate the target schedule through the query workflow
  2. Confirm with the user the schedule information to be canceled (title, time, etc.) to avoid accidental operations
  3. After confirmation, call cancel_schedule

Manage Participants

Classic query examples:

  • "Add Zhang San to tomorrow's Requirements Review meeting"
  • "Help me remove Li Si from Friday's schedule"
  • "Invite Wang Wei and Zhao Min to tomorrow afternoon's meeting"
  • "Remove Liu Qiang from the participants of my technical sharing the day after tomorrow"

Process:

  1. Use wecomcli-contact to obtain the target person's userid; if there are duplicate names, display candidates for the user to choose
  2. Locate the target schedule through the query workflow
  3. Call add_schedule_attendees or del_schedule_attendees to complete adding/removing

Query Free/Busy and Schedule a Meeting

Classic query examples:

  • "Help me check whether Zhang San and Li Si are free tomorrow afternoon"
  • "Check my and Wang Wei's free time this week, I want to set up a meeting"
  • "I want to have a meeting with Xiaoming and Xiaohong from the product team to see when everyone is available"
  • "Find a time slot tomorrow afternoon when everyone is available and schedule a 1-hour meeting"

Process:

  1. Via wecomcli-contact get the userids of the relevant people
  2. Call check_availability to query each user's busy time slots within the specified time range
  3. Analyze all users' busy time slots, calculate the common free time slots, and recommend them to the user
  4. After the user confirms a time slot, call create_schedule to create the meeting and automatically add the participants