Auto-syncing Last Week's Daily Reports Every Monday: Writing Daily Reports into a Summary Table using Tencent Docs API

Introduction

The team is accustomed to writing daily reports in Tencent Docs on a daily basis. However, creating the weekly report involves manually extracting five days’ worth of content from a lengthy document and pasting it into the corresponding name column in a summary sheet. Doing this repeatedly every Monday morning is slow and prone to errors, such as missing a day or pasting into the wrong column. Below is an introduction to the SkillHub community Skill “Weekly Report Auto-Sync” (Coordinates: @user_93772aaf/weekly-report-sync): It uses OAuth to call Tencent Docs Open APIs to read daily reports, calculates last week’s workdays, writes the data back to the sheet by name column, and optionally sends a notification via WeCom (Enterprise WeChat) Webhook upon completion.

What is this

One-sentence positioning: A scheduled workflow Skill for office scenarios that calls the Tencent Docs API via HTTP to sync content from the previous week in a “Daily Report Document” to the column corresponding to your name in a “Summary Sheet.”

  • Publisher & Maintenance: Published by the community publisher user_93772aaf, sourced from the community. The SkillHub category is office-efficiency. The current store version is 1.0.2 (The SKILL.md metadata inside the package indicates 1.0.0, but the store version takes precedence).
  • Scheduling: The package declares cron: "10 9 * * 1", meaning it executes at 09:10 every Monday.
  • Dependencies: Tag requires_api_key=true. Before running, you need to configure the Tencent Docs application’s ClientID, ClientSecret, and the Document/Sheet IDs.

Core Functions

The following capabilities are derived from the step definitions in the SKILL.md within the installed Skill package. Logic not appearing in the documentation will not be included.

  1. Obtain Access Token
    Exchange client_credentials for an access_token at https://docs.qq.com/open/api/oauth2/token with the scope doc:read sheet:read sheet:write.

  2. Read Full Daily Report Text
    GET https://docs.qq.com/open/api/doc/v1/content?doc_id=... to obtain the full body of Daily Report Document A.

  3. Read Summary Sheet Headers
    GET the first row of headers from Summary Sheet B (range=A1:Z1) to locate the column by name.

  4. Calculate Last Week’s Dates
    Use date expressions to calculate the YYYY-MM-DD for last Monday through last Friday for subsequent text segmentation by date.

  5. Segment by Date and Write to Sheet
    Taking “Monday” in the document as an example: Locate the segment between last Monday and last Tuesday dates in the body text and write it to the corresponding name column in the summary sheet (the example range is row 2 of the name column). For other workdays, refer to the SKILL.md in your locally installed package (the current public package only shows the write operation for Monday).

  6. WeCom Notification (Optional)
    If wecom_webhook is configured, POST a text message to that address indicating synchronization completion, the name, and the date range of last week.

Installation and Activation

1. Install SkillHub CLI (if not already installed)

command -v skillhub && skillhub --version

If not installed, follow the official installation instructions (full installation or CLI only):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

Documentation: https://skillhub.cn/install/skillhub.md.

2. Install this Skill

When installing, you must use --dir to point to the current Agent’s skills directory; otherwise, if it defaults to ./skills/, it may not be recognized.

skillhub install weekly-report-sync --namespace user_93772aaf --dir <your skills directory>

Common client skills paths (excerpt from SkillHub installation instructions):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

Alternatively, you can let the AI install it based on the store page prompts: refer to https://skillhub.cn/install/skillhub.md and install @user_93772aaf/weekly-report-sync.

3. Configure Runtime Parameters

The required inputs declared by the Skill are as follows (names and types are subject to SKILL.md):

Field Description
client_id Tencent Docs ClientID
client_secret Tencent Docs ClientSecret
doc_a_id Daily Report Document ID (doc)
sheet_b_id Summary Sheet ID (sheet)
user_name Your name in the summary sheet header (used for column location)
wecom_webhook WeCom notification address (optional)

You need to create an application on the Tencent Docs Open Platform to obtain the above credentials; the Document and Sheet IDs must match the daily reports and summary sheets actually used by the team. For specific instructions on how to fill in inputs and hook up cron on SkillHub / OpenClaw, refer to the Skill execution instructions of your specific runtime environment.

Typical Usage

  1. Install @user_93772aaf/weekly-report-sync via SkillHub to the current Agent’s skills directory.
  2. Prepare on the Tencent Docs side: A daily report document written by date, a summary sheet with names as column headers, and enable API permissions.
  3. Fill in client_id, client_secret, doc_a_id, sheet_b_id, user_name according to SKILL.md; add wecom_webhook if notifications are required.
  4. After enabling the package’s cron (09:10 every Monday), the workflow “Get Token -> Read Document -> Calculate Last Week’s Dates -> Extract Content -> Write to Sheet -> Optional Notification” will run automatically at the scheduled time.

If manual verification is needed, you can trigger a full step in a runner that supports this Skill format and check if the corresponding cells in the summary sheet and the WeCom message have been updated.

Use Cases and Notes

Who it is for

  • Teams where daily reports are centralized in a single Tencent Docs doc, and weekly reports are filled into the same sheet organized by person.
  • Individuals who want to automatically aggregate “last week’s” segments at a fixed time on Mondays to reduce copy-pasting.

Limitations and Notes

  • Heavily dependent on Tencent Docs Open API and network accessibility; the risk of credential leakage requires securing client_secret according to company regulations.
  • Body text extraction relies on date strings appearing in the daily report being consistent with the YYYY-MM-DD rule; inconsistent formatting will result in empty or misaligned extractions.
  • The name must exactly match the header in the first row of the summary sheet; otherwise, column location will fail.
  • Store statistics (as of data capture): Rating 100000, Downloads 961, Installations 2. Skill capabilities are subject to the SKILL.md in the package. If there is an inconsistency with the store description, the installed package prevails.

Conclusion

“Weekly Report Auto-Sync” transforms weekly report organization from manual copying into a configurable API workflow, suitable for Tencent Docs daily report + summary sheet collaboration methods. See https://skillhub.cn/install/skillhub.md for installation and priority source instructions. See https://www.skillhub.cn/skills/user_93772aaf/weekly-report-sync for the Skill homepage, and https://api.skillhub.cn/user_93772aaf/weekly-report-sync for the API entry address.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye