[Scenario]HR & Admin Scenarios: AI for Attendance, Contracts & Notifications

Summary: Hand off the three most tedious HR/Admin tasks — attendance, contracts, notifications — to AI.

1. The Pain: HR & Admin's "Three Big Headaches"

Anyone who has worked in HR or admin has surely lived through moments like these — at the start of the month, you want to hand over last month's attendance sheet, but the Excel exported from DingTalk (钉钉) is a mess: late arrivals, early departures, missed clock-ins, cross-city business trips, off-site check-ins… Just cleaning up that data eats up a day or two.

Even more painful are contracts. The boss tosses a partnership contract at you and says "take a look first." You're not a lawyer, but you're expected to read the payment terms, liability clauses, and confidentiality clauses… Each word on its own makes sense, but put them together and it's like reading a foreign language. If you miss a single trap, the company loses money.

As for notifications — sending a company-wide email, a birthday benefit, a holiday subsidy, a transfer notice… Each one needs three drafts: one for the manager, one for HR, and one for the employee. By the time you've rewritten everything three times, even you can't tell which version is the final one.

These three tasks — attendance, contracts, notifications — together can swallow more than 60% of an HR/admin professional's daily workload. In this article, we'll hand each one to AI and see if it can pull us out of overtime.

Quick Glossary (Let's align on terms first)

  • Attendance: Recording employees' clock-in/clock-out times and automatically calculating work hours, lateness, early departures, overtime, and other data.
  • Contract Review: Reading every contract clause one by one to flag any "landmine" terms that could hurt the company.
  • Company-Wide Notification: An email, a DingTalk message, or a WeCom message — needs to reach everyone in the company (or a specified department), with content categorized accordingly.

2. Goals: What You'll Be Able to Do After Reading This

By the end of this article, you'll be able to produce three deliverables:

Case Deliverable Tool Combo
① Smart Attendance Monthly attendance Excel + Anomaly list DingTalk/WeCom export + Qwen/ChatGPT + WPS AI
② Contract Review Risk clause list + Suggested edits (for preliminary screening only) Qwen/ChatGPT (final review by legal counsel)
③ Company-Wide Notifications Three drafts: Email / DingTalk / WeCom WPS AI + DingTalk/WeCom mass-send

Note that Case ② has a legal boundary — AI can only do "preliminary screening" and flag potential traps. The final decision on whether to sign, and how to revise clauses, must be made by the company's in-house legal team or an external licensed attorney. We'll hammer this point again in the "Pitfall Guide."

3. Case Studies: Follow Along

Case ① Smart Attendance: 3 Steps to Generate a Monthly Attendance Sheet

Step 1: Export raw clock-in records from DingTalk/WeCom

Whether you use DingTalk (钉钉) or WeCom (企业微信), both have a "Smart Attendance" feature that auto-clocks-in and calculates hours. But the raw exported Excel file is "ugly": field names are pinyin abbreviations, timestamps are in Unix format (a "seconds-since-1970" machine-time that looks like a string of numbers to humans), and there are plenty of empty rows and totals rows — definitely not something you'd send to the boss as-is.

  • DingTalk (钉钉): 工作台 → 考勤打卡 → 报表 → 月度汇总 → 导出 Excel
  • WeCom (企业微信): 管理后台 → 应用 → 打卡 → 报表中心 → 导出

After exporting, you'll get an Excel file that looks roughly like this:

emp_id, name, dept, ts, type
1001, 张三, 销售部, 1717200000, in
1001, 张三, 销售部, 1717230000, out
...

A wall of English abbreviations — HR's eyes glaze over. No worries; hand it to AI in the next step.

Step 2: Feed the Excel to AI and let it organize

Open Qwen (https://tongyi.aliyun.com) or ChatGPT, start a new chat, drag the Excel file directly in, then paste the following prompt:

You are a seasoned HR professional. Below is the raw DingTalk clock-in data I exported (ts is a Unix timestamp, in seconds).

Please help me:
1. Convert ts to "YYYY-MM-DD HH:mm" format;
2. Group by employee name + date, and compute for each person, per day:
   - Clock-in time (the earliest "in" punch of the day)
   - Clock-out time (the latest "out" punch of the day)
   - Hours worked (clock-out − clock-in, minus a 1.5-hour lunch break)
   - Late or not (clock-in after 09:15 counts as late)
   - Left early or not (clock-out before 18:00 counts as leaving early)
3. Output the result as a Markdown table — the column headers are in Chinese (DingTalk export): 员工/日期/上班/下班/工时(h)/迟到/早退 — so I can paste it straight back into WPS/Excel;
4. Finally, add an "anomaly list" singling out everyone who was late, left early, or missed a punch.

What will you get?

The AI will reply with a clean Markdown table (a Markdown table is a lightweight table drawn with pipes and dashes that can be pasted into Word/WPS and auto-formatted as a real table) that looks like this:

员工 日期 上班 下班 工时(h) 迟到 早退
张三 2024-06-03 09:02 18:30 8.0
李四 2024-06-03 09:32 18:00 7.5
... ... ... ... ... ... ...

Plus an anomaly list:

Anomaly Alert (June 2024)

  • 李四 (Sales Dept): 3 late arrivals — 06-03, 06-12, 06-25
  • 王五 (Marketing Dept): 1 missed clock-in (no check-in all day on 06-18)

Step 3: Paste the Markdown table back into Excel / WPS

WPS Spreadsheet has a delightfully handy feature: New → Smart Table → paste the Markdown table directly in → it auto-generates an Excel table. If you're using WPS AI, you can even ask it to generate charts in a single sentence: monthly late-arrival rate, overtime ranking, department average hours — all chart-ready in one click.

Going further, use WPS AI's "Pivot Chart" — i.e., a PivotTable, a chart tool that quickly aggregates statistics by department/month — to build an interactive dashboard of last month's total hours, overtime, and lateness across the whole company, so the boss sees the whole picture at a glance. What used to take two days of overtime can now be wrapped up in 30 minutes.

Case ② Contract Review: AI Helps You "Spot the Traps" ⚠️ Legal Boundary

🚨 Legal Boundary Reminder (Read This First) AI in the contract scenario can only do "preliminary screening" — helping you highlight suspicious clauses. The final decision on whether to sign and how to revise clauses must be confirmed by the company's in-house legal team or an external licensed attorney. All prompts in this article are for learning reference only and cannot replace professional legal advice.

The premise of everything in this section is "AI handles the first pass, Legal handles the last pass." Skipping steps leads to trouble — please remember this.

Step 1: Upload the contract PDF to AI

Open Qwen or ChatGPT, start a new chat, and drag the contract PDF directly in (both GPT-4o and Qwen support PDF uploads). If the contract is in Word format, convert it to PDF first, or simply copy the body text and paste.

Step 2: Paste the "Contract Review Prompt"

You are a rigorous contract-review assistant (but you are not a lawyer — the final result must be confirmed by legal counsel).

Please review the contract below. Focus on the following three types of clauses and pick out 3–5 risk points in each category:

1. Payment clauses:
   - Are the payment terms reasonable (e.g., final payment due more than 90 days after delivery)?
   - Are there vague preconditions for payment that could jeopardize collection?
   - Are the invoicing requirements clear?

2. Breach-of-contract clauses:
   - Is the penalty ratio symmetric between the two parties?
   - Is the cap on damages reasonable?
   - Is the force majeure definition overly broad?

3. Confidentiality clauses:
   - Is the confidentiality period too long (e.g., more than 5 years)?
   - Is the scope of confidentiality vague enough to accidentally sweep in routine business?
   - Are post-departure confidentiality obligations reasonable?

Output in the following format:
- Clause location (which page / which article)
- Original excerpt (one sentence)
- Risk level (high / medium / low)
- Suggested revision (one sentence)

Finally, give me a "risk overview" sorted from highest to lowest risk.

What will you get?

The AI will list every "landmine" in the contract in the format you specified, for example:

Clause Location Original Excerpt Risk Level Suggested Edit
Article 4, Clause 2 "甲方应在验收合格后 180 个工作日内支付尾款" High 180 working days ≈ 8 months; recommend reducing to 30–60 working days
Article 7 "乙方承担一切间接损失" High Indirect losses usually shouldn't be borne by one party alone; recommend setting a clear cap
Article 9 "保密期为合同终止后 10 年" Medium 10 years is too long; 2–3 years is generally reasonable

The moment you have this list, the first thing to do: forward it to Legal. Let them make professional judgments based on the AI's preliminary screening results — it can save roughly 70% of first-pass review time — but never skip Legal.

Case ③ Company-Wide Notifications: Generate Three Drafts with One Sentence

Step 1: Clarify the notification elements

Before writing a notification, list these 5 elements clearly (if any are missing, the AI output will go off-track):

Element Example
Who sends it (Sender) Admin Dept · Manager Wang
Who receives it (Audience) All staff / Sales Dept / Tech Dept
What's it about (Topic) Dragon Boat Festival holiday arrangements (example dates are a fictional combination — always follow the State Council notice for the current year)
When (Time) 2024-06-10 to 2024-06-12
What to do (Action item) Make-up workday on June 8 (Saturday)

Step 2: Use WPS AI to generate the three drafts — email / DingTalk / WeCom

Open WPS Word, create a blank document → click the "WPS AI" button at the top right → choose "Write Notification" → fill in the elements above. WPS AI will generate all three at once:

  1. Email draft (formal, with signature block, can include logo)
  2. DingTalk draft (concise, emoji-friendly, can @everyone)
  3. WeCom draft (compromise tone, highlights key points, can include hyperlinks)

If you're only using Qwen or ChatGPT, you can also use this prompt:

Please draft a Dragon Boat Festival holiday notice for me in three versions:

[Version A: formal email] 300–500 words, formal and polite, with a signature block.
[Version B: DingTalk group message] Under 100 words, conversational, emoji welcome.
[Version C: WeCom notice] About 150 words, semi-formal, highlighting "which days are off and which day is the make-up workday".

Holiday arrangements:
- June 10 (Monday) through June 12 (Wednesday) off, 3 days in total
- Make-up workday on June 8 (Saturday)
- Holiday perk: zongzi gift boxes handed out on June 10

Step 3: Customize by department/role

If the notification content varies by department (e.g., "Sales gets 1.5x overtime pay on the make-up day, while management gets a fixed subsidy"), you can ask a follow-up:

Take [Version A] above and make a customized copy just for the Sales Department:
- Add one line: "Sales team members working the June 8 make-up day will be paid overtime at 1.5x their regular wage."
- Keep everything else unchanged.

The AI will give you two versions of [Version A]; paste each into its respective email.

Step 4: Mass-send

  • Email: Use WPS's "Mail Merge" (mail merge = "combine an Excel recipient list + an email template to auto-generate N personalized emails") to send with one click;
  • DingTalk (钉钉): DingTalk group's "Announcement" feature can @ specified departments;
  • WeCom (企业微信): Apps → Approvals/Notifications → select department → push with one click.

4. Principle Summary: Why Can AI Do These?

In one sentence: AI is an assistant that's "great at reading, great at writing, great at calculating."

  • Attendance: Essentially "read Excel + calculate data + output table" — AI is skilled at cleaning messy data into clean data;
  • Contracts: Essentially "read long text + find key points + list items" — AI does pattern matching (i.e., scanning a document by fixed rules to find "matches") tens of times faster than humans;
  • Notifications: Essentially "fill in templates + adjust tone" — AI excels at writing copy, switching styles, and adjusting tone for different audiences.

But remember: AI is good at "repetitive work" and "pattern recognition"; it's not good at "final decisions" and "professional judgment." So for contracts, AI can only do "preliminary screening" — a human still has to sign off.

5. Pitfall Guide: Mines We've Already Stepped On

  1. Attendance data privacy: When exporting Excel, mask employee ID numbers and bank card numbers; before uploading to AI, it's best to replace names with "Employee A," "Employee B," etc., to prevent sensitive personal information from leaking.
  2. Contract desensitization: Before uploading contracts to AI, redact the counterparty company name, contract amount, and key personnel names — or replace them with "Party A," "Party B," "XX million" — to prevent sensitive business information from leaking.
  3. AI cannot replace Legal: For important contracts, contracts where the deal value exceeds 500,000 RMB, or those involving equity/IP/labor arbitration, a professional attorney MUST review them; AI prompt output can only serve as a "reference checklist." This step cannot be skipped, no matter how urgent.
  4. Double-check numbers in notifications: When AI writes holiday notices, it most often gets the dates wrong (e.g., writing "October 6 holiday" instead of "June 10 holiday"). Before sending, always manually verify dates, weekdays, and make-up workdays.
  5. Don't let AI draft employee complaints/disciplinary decisions: Such content involves specific individuals, and AI-generated text may "appear neutral but actually be biased" — a single misused phrase can trigger a labor dispute. HR should draft these themselves, or only use AI for grammar polishing.
  6. Different AI tools have different "alignment levels": For the same prompt, ChatGPT and Qwen will produce different outputs. Try a small dataset first, and pick the tool with the most stable output as your primary one.
  7. Don't blindly trust "templates" for holiday notices: Each year's holiday schedule is different (workday swaps, make-up days, benefit distribution dates). AI templates can only serve as skeletons — specific dates and workday-swap arrangements must follow the official holiday notice issued by the State Council that year.

6. Advanced Extensions: Want to Go Deeper?

If today's article hasn't fully satisfied your appetite, here are 3 directions to keep going:

  1. Advanced attendance: Feed the Excel attendance sheet to WPS AI's "Pivot Chart" (PivotTable) — get department comparison charts and monthly trend charts in 1 minute; further, you can use Power Query (a built-in Excel data-cleaning tool that can automatically pull and organize data from multiple files/web pages) to merge each month's attendance into a year-long master table.
  2. Advanced contracts: Use Power Query to organize the company's contracts over the years into a database, and combine with DAX (Data Analysis Expressions — the formula language in Power BI used for "year-over-year, period-over-period, cumulative" metrics) to build a "Risky Contract Leaderboard" — see at a glance which supplier keeps playing tricks with penalty clauses.
  3. Advanced notifications: Use VBA (Visual Basic for Applications — a built-in Office programming language that lets you "record a sequence of operations and have the software repeat them automatically") to write a "One-Click Notification Generator" — select a department, pick a template, click a button, and AI auto-generates + auto-mass-sends. B7, Mail Merge at Scale with AI, walks through batch-generating notifications step by step — follow it and you can ship this.

Next Article Preview (E2: Finance Scenarios): Invoice organization, expense reimbursement review, budget comparison — how AI saves our accountant friends 20 hours every month. Stay tuned.


This article is part of vba.net's "AI-Powered Office" series (Scenario track). Author: He Xun (贺迅). This article is for informational purposes only and does not constitute legal advice. Contract review by AI is preliminary screening only; final review must be done by qualified legal counsel.