[Integrated Practice]Low-Code + AI Approval Flow

Summary: Build leave, expense, and procurement approval flows with a low-code platform and AI nodes — let AI extract fields, raise risk alerts, and auto-classify requests. Get a minimum viable flow running in 30 minutes.

Key Terms You Should Know First

This article is dense, so every term that shows up for the first time gets a plain-English definition here — from here on, we treat them as common vocabulary:

  • Low-code — building applications without writing code; drag-and-drop components for forms and workflows. In this article I focus on four specific platforms: Power Automate (Microsoft, English UI, the default pick for overseas and multinational orgs), Feishu Bitable / multi-dimensional tables (飞书多维表格) (ByteDance, deep Feishu ecosystem integration), DingTalk Yida (宜搭) (Alibaba, deep DingTalk ecosystem integration), and Tencent WeDa + Tencent Docs Smart Sheets (腾讯微搭 / 腾讯文档智能表) (Tencent, integrated with WeChat / WeCom). "Tencent Docs Smart Sheets" is the lightweight approvals / spreadsheet-style option (lives inside Tencent Docs), and "Tencent WeDa" is the heavier application / complex-flow option (lives in the WeCom workspace); their positioning is laid out in the Section 3 comparison table.
  • Approval flow — a multi-step process: submit → line manager approval → higher-level approvers → finish. At every step the approver can choose Approve / Reject / Add an approver / Reassign.
  • AI node — a step inside the flow that lets an LLM do some work for you — read an attachment, classify a request, flag anomalies. Under the hood it's a large model (GPT-class) wrapped as a visual block: configure a prompt (the "tell the AI what to do and how" text), and you get the result back.
  • Connector — the "plug" between a low-code platform and an external service. Examples: SharePoint Connector, Outlook Mail Connector, Azure OpenAI Connector. Whether the platform can talk to a given service depends entirely on whether a connector exists.
  • Power Automate / AI Builder — Power Automate is the workflow orchestrator. AI Builder is its built-in "AI toolbox" of no-code actions — Extract information from text, Classify text, Process and save information from invoices, etc., all usable without writing code.
  • Premium connector / AI Builder license — Microsoft's paid "ticket" for advanced features. Connectors like HTTP Webhook require a Power Automate Premium license. AI Builder ≠ Premium license — AI Builder needs its own AI Builder capacity (sometimes bundled with Power Automate Premium, sometimes bought separately as AI Builder credits). If a tenant has no AI Builder capacity, running an AI node throws requires AI Builder entitlement. This point will come up repeatedly in the pitfalls section.

1. The Pain Point

You've seen this scenario before:

The boss drops it on you: "Starting next Monday, all leave, expense, and procurement requests go through online approval. The flow has to auto-decide — I can't sit there watching it."

So you open DingTalk's or Feishu's built-in approvals and find three awkward gaps:

  1. The fields are rigid. Leave reasons are a single free-text box — HR still has to manually pick sick leave / annual leave / personal leave.
  2. The flows are rigid. Annual leave auto-approves, sick leave needs a medical certificate, procurement over ¥5,000 goes through Finance — these rules aren't built in; you need plugins or developers.
  3. There's no AI at all. A leave reason like "my kid has a fever and the doctor said rest three days" is gibberish to the platform, so the manager has to judge by gut feel.

Traditional approval systems are workflow engine + form with no "thinking layer." This article fixes exactly that: low-code builds the skeleton + AI nodes add the thinking — a flow + intelligence approval flow, with a minimum viable version live in 30 minutes.

The walkthrough uses one real scenario end-to-end: a leave approval flow (auto-classify leave type + flag abnormal requests + auto-CC HR). At the end of the article I'll give a quick platform comparison for the three Chinese platforms (Feishu Bitable / DingTalk Yida / Tencent WeDa + Tencent Docs Smart Sheets) so you can pick based on your company's ecosystem.

2. Target Outputs

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

  • Ship a working low-code approval flow (Power Automate as the main case study — minimum viable version in 30 minutes);
  • Drop in at least three AI nodes — ① smart extraction of key facts from the leave reason, ② auto-classification of leave type, ③ anomaly detection (sudden / frequent / milestone-collision);
  • Grab a reusable prompt template (appended at the bottom) that you can adapt for expense, procurement, and contract approvals;
  • Tell the three major Chinese low-code platforms apart and know which one fits your company.

Everything below is real, copy-and-paste-ready. All prompts work as-is.

3. Case Study

Preparation: pick a platform

The main case uses Power Automate (Microsoft) + SharePoint Lists (as the data store) + Outlook (as the notification channel) — because its AI node (AI Builder) is the most mature and its English error messages are the clearest. If you're on a domestic stack, jump straight to "Three Chinese Platforms — Quick Comparison" at the end of this section.

Snapshot comparison across the four platforms (data points pulled from each platform's public docs around 2024–2025; verify the actual capability boundaries in your own tenant):

Dimension Power Automate Feishu Bitable DingTalk Yida Tencent WeDa / Tencent Docs Smart Sheets
Ecosystem Microsoft 365 ByteDance / Feishu Alibaba / DingTalk Tencent / WeCom
Form builder Forms / SharePoint / Power Apps Bitable + form view Form designer WeDa: low-code form designer / Smart Sheets: tabular form view
Built-in AI AI Builder + Copilot Studio Feishu AI Field Shortcut, Smart Companion Yida AI Assistant, Qwen connector Smart Sheets AI Field / WeDa AI node / custom Tencent Cloud Hunyuan API connector (pick one)
Approval node Approvals (native) Approval flow component Process designer Flow engine
Cross-system connectivity 700+ connectors Feishu Open Platform + Webhooks DingTalk Open Platform + connectors WeChat ecosystem + HTTP
Cost gate AI nodes need AI Builder capacity (may bundle with Power Automate Premium, or buy AI Builder credits standalone) Some AI features are per-seat paid Base free; AI add-ons paid Smart Sheets base free; WeDa billed per seat/resource; Hunyuan API billed per token
Learning curve Medium (English-first) Low (Chinese-first, friendly UI) Low (Chinese-first, friendly UI) Medium

Tencent WeDa vs. Tencent Docs Smart Sheets: Lightweight approvals live in Smart Sheets (inside Tencent Docs — leave / expense style, drag fields + form view is enough). Heavy applications live in WeDa (WeCom workspace — multi-level approvals, cross-system integration, complex business apps). Both are Tencent products with different positioning — don't conflate them.

⚠️ The exact module name on the Tencent side (different labels for "AI Field" / "AI node" / "Hunyuan connector" have been iterating across versions in 2024–2025) — go by what you actually see in your account. Recommended paths: ① Tencent Docs Smart Sheets — Tencent Docs → open a Smart Sheet → header field type → pick "AI Field" → choose an action (classify / extract / summarize); ② WeDa — WeCom workspace → WeDa → app editor → drag an AI node from the node panel; ③ Custom Tencent Cloud Hunyuan API integration — enable Hunyuan in Tencent Cloud Console → grab the API key → in WeDa / Smart Sheets add a "custom connector + HTTP call." Pick one; this article doesn't walk through each separately.

Step 1: build the skeleton — leave request form (SharePoint List)

This step builds the Leave Request list as the data source for the approval flow. If you're not on the Microsoft stack, swap in Feishu Bitable or DingTalk Yida's form designer — the columns are identical.

1) Create a new SharePoint site → new List, name it "Leave Request", and add these columns:

Column name (internal) Display name Type Notes
Applicant Applicant Person or Group 申请人
LeaveType LeaveType Choice 病假 / 年假 / 事假 / 调休 / 产假 / 陪产假
StartDate StartDate Date
EndDate EndDate Date
TotalDays TotalDays Number Calculated column: EndDate - StartDate + 1
Reason Reason Multiple lines of text AI primarily reads this column
Attachment Attachment Attachment Medical certificate, ticket screenshot, etc.
AI_Category AI Category Single line of text Backfilled by AI node
AI_Urgency AI Urgency Choice 高 / 中 / 低
AI_RiskFlag AI Risk Flag Yes/No Backfilled by AI node
AI_Conflict AI Conflict Yes/No (Choice) Backfilled in Step 5: collides with project milestone = Yes
Status Status Choice 审批中 / 通过 / 驳回

2) In List settings, set the Applicant column default to the current user, so employees don't have to pick themselves every time.

Tip: English internal column names are the de facto convention in Power Automate. Power Automate expressions reference columns by internal name (Applicant), not display name. If you insist on Chinese names, write them as ['申请人'] in expressions — but that's a common trip-up.

Step 2: trigger — start the flow when a new request is created

Open Power Automate (https://make.powerautomate.com) → CreateAutomated cloud flow → name it "Leave Approval — AI Assisted" → choose the trigger When an item is created (SharePoint).

Configure:

  • Site Address: your SharePoint site URL.
  • List Name: Leave Request.

Save. This step wakes up the downstream AI and approval actions every time a new request is submitted.

Step 3: insert the first AI node — smart extraction from the leave reason (the core step)

Back in the flow editor, under the trigger click + New step → search AI Builder → pick Extract information from text (current canonical name) → expand the Custom entities panel → click + Add entity. The four entities below are how you fill out "custom entities."

Configuration:

  • Text input: pick Reason from dynamic content.
  • Custom entities: expand, add 4 entities, each with a name plus a plain-English description for the AI:
Entity name Description (for the AI)
ReasonSummary One-sentence summary of the leave reason, strictly ≤ 20 Chinese characters (punctuation included); truncate if exceeded; output only subject + action, e.g. "孩子高烧需陪护"
IsUrgent Is it urgent (true/false)? A sudden family event, child sick, family bereavement = true
NeedsAttachment Is supporting material needed (true/false)? Sick leave AND days ≥ 3 = true, OR any scenario needing a hospital certificate (surgery, hospitalization, prenatal checkup, etc.) = true; otherwise false
MentionedDates Specific dates or ranges mentioned in the text; if none, output "无"

This "entity description" is the AI's instruction sheet — the more specific you write it, the more accurate the AI is. For instance, the IsUrgent description above lists three concrete signals (sudden event / child sick / family bereavement); the AI is more likely to return true when those keywords appear.

Can't find the "Custom entities" panel? Some accounts / tenants (especially trials, region-restricted tenants, or tenants without AI Builder capacity) don't show the Custom entities expansion inside the AI Builder action. If that's you, switch to Step 4's "HTTP + Azure OpenAI custom prompt" pattern instead — rewrite the four entities as JSON output fields; same outcome.

Save and test: in the flow editor click Test → pick Manually → submit a leave request in SharePoint by hand, wait a few seconds, then come back and inspect the AI node output.

Expected output (JSON-style, visible in run history):

json
{ "ReasonSummary": "孩子突发高烧需陪护", "IsUrgent": "true", "NeedsAttachment": "true", "MentionedDates": "无" }

Step 4: insert the second AI node — auto-classification (optional, custom-prompt route)

If your Power Automate version / tenant doesn't expose AI Builder's Classify text, or you want finer-grained control over classification rules, take the HTTP + Azure OpenAI connector custom-prompt route. Same outcome, a few more setup steps.

Steps:

  1. Create an Azure OpenAI resource and deploy a GPT-4o-mini (or GPT-4) model. Note the endpoint + API key + deployment name;
  2. In Power Automate, add an HTTP action (Premium). Method = POST, URI = the Azure OpenAI chat completions endpoint, Headers fill in api-key and Content-Type: application/json, and Body uses the JSON below.

Body template (swap {{...}} with Power Automate dynamic-content expressions):

json
{ "messages": [ { "role": "system", "content": "You are an HR assistant. Classify each employee's leave reason into exactly one of the following 6 categories and assess its urgency. Category and urgency labels are kept in Chinese to match our HR system's field values. Output valid JSON only — no explanations, no markdown code blocks. Categories: 病假 (sick leave) / 年假 (annual leave) / 事假 (personal leave) / 调休 (comp time) / 产假 (maternity leave) / 陪产假 (paternity leave). Urgency levels: 高 (high) / 中 (medium) / 低 (low)." }, { "role": "user", "content": "Leave reason (verbatim): {{triggerOutputs()?['body/Reason']}}\n\nOutput strictly in this JSON format:\n{\n \"category\": \"<one of the 6 categories above>\",\n \"urgency\": \"<高, 中, or 低>\",\n \"risk_flag\": true/false,\n \"risk_reason\": \"If risk_flag=true, briefly state why (within 20 characters); otherwise leave empty.\"\n}" } ], "temperature": 0.2, "max_tokens": 200 }

Three plain-English rules for prompt design: ① Pin the role in the system message — this anchors the AI's identity and reduces drift. ② In the user message, give the AI both the candidate labels and a target JSON schema — this forces parseable, structured output. ③ Set temperature between 0.1 and 0.3 — keeps classification results stable across runs, no random variation.

3) Parse the AI response: the AI returns a JSON string. Power Automate has a Parse JSON action (under Data Operations) that splits it up. Use the JSON fields above as the schema.

Why hammer on JSON? If an AI node feeds into a downstream Condition branch (for example, risk_flag == true triggers the alert path), you have to reliably extract fields from the AI output. If you let the AI emit free text, downstream logic goes haywire — sometimes a Chinese comma, sometimes JSON nested inside JSON. So every AI node must emit JSON. That's rule #1 of production use.

Step 5: insert the third AI node — anomaly detection alerts

In the leave scenario, three anomaly types are worth auto-flagging:

  1. Frequent short leaves — same person, ≥ 3 requests within 30 days;
  2. Milestone collisions — the leave window overlaps a confirmed project milestone;
  3. Long leaves — a single request over 10 working days.

Pure SQL / Filter Query can knock out (1) and (3); AI is genuinely stronger on (2) because milestone descriptions are often unstructured text. Prompt template:

json
{ "messages": [ { "role": "system", "content": "You are a project manager's assistant. Your job is to judge whether a leave request conflicts with confirmed project milestones." }, { "role": "user", "content": "Requester: {{triggerOutputs()?['body/Applicant/DisplayName']}}\nLeave period: {{triggerOutputs()?['body/StartDate']}} to {{triggerOutputs()?['body/EndDate']}}\nLeave reason: {{triggerOutputs()?['body/Reason']}}\n\nProject milestone list (from the database): {{variables('ProjectMilestones')}}\n\nOutput JSON only:\n{\n \"conflict\": true/false,\n \"conflict_milestone\": \"If conflict=true, name the specific milestone it conflicts with; otherwise leave empty.\",\n \"suggestion\": \"A one-sentence suggestion for the approver (within 30 characters).\"\n}" } ], "temperature": 0.1 }

Wire the AI node's conflict field into a downstream Condition node: true routes to a "CC the CTO" branch; otherwise the standard approval branch.

Step 6: write the AI results back to SharePoint and run the approval

Back on the main flow:

  1. Update item (SharePoint): write AI_Category, AI_Urgency, AI_RiskFlag, AI_Conflict from the AI node outputs;
  2. Condition: branch on AI_Urgency
    • High: email + DingTalk / Teams double-notify the line manager, plus CC the HRBP;
    • Medium / Low: take the standard Approvals node and wait for line-manager approval;
  3. Approvals node: Start and wait for approval, approval type = Approve / Reject - First to respond, approver = Applicant's line manager (look up via the Office 365 Users connector);
  4. Condition on approval result: Approved → write back Status = 通过 + email the applicant; Rejected → write back Status = 驳回 + email + hand to HR for follow-up.

End-to-end the flow looks like this:

[Trigger] New request created
   ↓
[AI node 1] Smart extraction (ReasonSummary / IsUrgent / NeedsAttachment)
   ↓
[AI node 2] Auto-classification (category / urgency)
   ↓
[AI node 3] Anomaly detection (risk_flag / conflict)
   ↓
[Update SharePoint] Write AI outputs back to the columns
   ↓
[Condition] urgency = 高 → "Expedited channel" (double-notify + CC HRBP)
[Condition] urgency ≠ 高 → "Standard channel" (Approvals node)
   ↓
[Approval-result Condition] Approved → Status=通过 + email applicant
                            Rejected → Status=驳回 + email + HR takes over
   ↓
[End]

Step 7: testing and go-live

1) Prepare five test cases (deliberately covering edge cases):

Applicant Leave type (manual) Reason (summary) Expected AI output Triggered AI node
Zhang San Personal "Accompanying a family member for a checkup — booked in advance" category=事假, urgency=低, conflict=false AI node 2 (classification)
Li Si Sick "Sudden high fever last night, doctor recommends 3 days of rest" category=病假, urgency=高, NeedsAttachment=true AI node 1 (extraction) + AI node 2 (classification)
Wang Wu Annual "Going home for Spring Festival, requesting 7 days in advance" category=年假, urgency=中, conflict=depends on milestones AI node 2 (classification) + AI node 3 (collision check, if a milestone matches)
Zhao Liu Sick "My kid has a fever, I need time off too" category=病假, urgency=高 AI node 1 (extraction) + AI node 2 (classification)
Test account Personal "I want 30 days off, can't share the reason" category=事假, urgency=高, risk_flag=true (this row hits Step 5's "long leave (>10 working days)" anomaly — per this article's advice, such cases are best caught by a rule / Filter Query; no need to force them through AI) Condition branch (Filter Query flags overlong) → AI node 3 summarizes risk_flag

2) In Power Automate click Test → Manually, trigger each case one by one, and confirm the AI node output and final approval routing.

3) Three pre-go-live checks:

  • Add a Trigger condition like "only fire when Status is empty" to avoid duplicate triggers;
  • Set SharePoint List permissions: everyone can create, own items visible to the author and admins, other employees see only their own department's;
  • Wrap the whole flow in Try-Catch (Scope + Configure run after) — if an AI node or an external API blows up, fall back to a human-approval branch so the flow never hangs.

Three Chinese Platforms — Quick Comparison (Pick What Your Stack Supports)

⚠️ Each row below is based on the platform's own public docs plus real-world usage through 2024–2025, but feature names / module locations / pricing rules iterate fast — your account may show something slightly different; trust what you see.

Feishu Bitable (ByteDance)

  • Entry point: Feishu workspace → Bitable → New table → "Automation" button on the right.
  • Form: Bitable's form view is drag-and-drop, friendlier than SharePoint.
  • AI node: use AI Field Shortcut (formerly "Shortcut AI") — pick the "AI Field" field type, choose one of the built-in actions (classify / extract / translate / summarize), write a prompt, and point at the input field. The lowest-friction option.
  • Approval: Bitable's "Automation" panel includes a "Start approval" action; the approver can be a single user, a role, or a department.
  • Strengths: Chinese UI, the most intuitive prompt setup, native integration with Feishu messages and calendar.
  • Watch out: cross-app integration is weak — to sync data to external systems, you need Webhooks or Feishu Open Platform.

DingTalk Yida (Alibaba)

  • Entry point: DingTalk workspace → Yida → New app → choose "Process form."
  • Form: drag-and-drop designer; more field types than Feishu (linked forms, sub-forms, formulas all included).
  • AI node: Yida AI Assistant plus a Qwen connector, a touch more complex than Feishu but more flexible (custom prompts, multi-turn dialogue supported).
  • Approval: the process designer is Yida's strongest piece — conditional branches, parallel nodes, and sub-flows are even more granular than Power Automate.
  • Strengths: the heaviest-duty flow engine; if your business approvals are very complex (say, 5 levels with parallel countersign), Yida is the most stable choice.
  • Watch out: Yida AI Assistant is available to DingTalk Enterprise Edition (钉钉企业版) accounts — basic extraction, classification, and field generation need no whitelist, but advanced capabilities (custom-trained-model hosting, industry-specific add-on packs, external API quota boosts) require DingTalk Enterprise Edition premium entitlements or a separate application. Confirm your account is DingTalk Enterprise Edition (钉钉企业版) before you start — otherwise the AI node appears greyed out.

Tencent WeDa + Tencent Docs Smart Sheets (Tencent)

  • Entry point: Lightweight approvals → Tencent Docs → Smart Sheets; heavy applications → WeCom workspace → WeDa.
  • Form: Smart Sheets' form view handles lightweight needs (drag fields + configure views); for complex applications, go WeDa.
  • AI node (pick one):
    • Tencent Docs Smart Sheets AI Field — path: Tencent Docs → open a Smart Sheet → header field type → "AI Field" → choose action (classify / extract / summarize / translate) → write prompt → point at input field.
    • WeDa AI node — path: WeCom workspace → WeDa → app editor → left node panel → search "AI node" → drag in → pick a Hunyuan model + write prompt.
    • Custom Tencent Cloud Hunyuan API integration — enable Hunyuan in Tencent Cloud Console → grab the API key → in Smart Sheets or WeDa add a "custom connector + HTTP call" — for when you've fine-tuned your own Hunyuan model. ⚠️ Note: specific module names ("AI Field", "AI node", "Hunyuan connector") have been renamed across 2024–2025 versions — go by what your account actually shows.
  • Approval: WeDa's flow engine supports multi-level approval + conditional branches, plenty for most needs; Smart Sheets' "Automation" button is enough for lightweight approvals.
  • Strengths: the smoothest WeChat / WeCom integration; if your company lives on WeCom, this is the path of least resistance.
  • Watch out: Smart Sheets and WeDa are two different products — don't conflate. Light approvals use Smart Sheets, heavy applications use WeDa. (Section 3's comparison table also calls this out separately.)

Which one should you pick?

Your company's situation Recommendation
Overseas / multinational, full Microsoft 365 stack Power Automate + AI Builder (main case in this article)
Mainly on Feishu, business not overly complex Feishu Bitable + AI Field Shortcut
Approval flows are very complex (5+ levels / countersign / sub-flows) DingTalk Yida
Mainly on WeCom, want tight WeChat ecosystem integration Tencent WeDa / Smart Sheets

4. Principles, in Brief

Low-code + AI is, at its core, two layers:

  1. The visual flow engine (Power Automate / Feishu Automation / Yida Process Designer / WeDa Flow Engine) carries the skeleton — triggers, conditional branches, parallel nodes, human approval nodes. Same job BPM tools did 20 years ago; the UI is just drag-and-drop now.
  2. AI nodes (AI Builder / AI Field Shortcut / Yida AI / custom HTTP + LLM) carry the thinking layer — turning unstructured text (leave reason, OCR'd attachment content) into structured fields, so the flow engine can branch on them, raise alerts, and auto-route.

When to use AI, when to use rules? One heuristic:

  • Structured fields (amount, date, name) → rules (SQL / Filter Query). Cheap, stable, explainable.
  • Unstructured fields (reason text, attachment contents, email body) → AI. That's where AI genuinely shines.
  • Fuzzy standards ("is it urgent?", "do we need an additional approver?") → AI, with a clear prompt.
  • Deterministic standards (amount > ¥5,000 → CFO approval) → rules; don't burn tokens on this.

Remember this line: AI is the "translator" of the approval flow, not the "decision-maker." The real decision (approve or reject) is still human. AI's job is to convert messy information into something a human can decide on.

5. Pitfalls to Dodge

  1. AI nodes aren't free — AI Builder on Power Automate needs its own capacity. Many folks wire it up enthusiastically, only to find at run-time either requires AI Builder entitlement or Actions in this flow require a Premium license. These two errors are not the same thing — diagnose before you fix:

    • HTTP / custom-connector error (require a Premium license) → Fix: have IT apply for a Power Automate Premium license (covers HTTP Webhook and other advanced connectors).
    • AI Builder error (requires AI Builder entitlement) → Fix: apply for AI Builder capacity separately (sometimes approved together with Premium; or buy AI Builder credits on a pay-per-call basis).
    • Want to avoid the cost altogether → Switch to Feishu's / DingTalk's / Tencent Docs Smart Sheets' AI Field feature; base AI capability is sufficient and free on most accounts. Or use Microsoft's own Azure OpenAI (enterprise contract — but note that the "HTTP" or custom-connector actions are themselves premium connectors, so the corresponding license can't be skipped).
  2. Don't feed sensitive info straight to public LLMs. Leave reasons can contain names, phone numbers, hospitals, conditions. Don't paste them straight into OpenAI / Zhipu (智谱) / DeepSeek's public API. Either go through an enterprise private deployment (Microsoft Azure OpenAI private deployment, Alibaba Qwen Enterprise Edition, Tencent Hunyuan Enterprise Edition all qualify), or insert a redaction step before the AI node (a regex that swaps phone numbers / ID numbers / emails for ***). ⚠️ Privacy isn't a small matter — fixing it after a compliance incident is too late.

  3. Always schema-validate AI output — don't take it at face value. The AI may return "category": "调休或年假" (two values), or "urgency": "高啊" (with a stray particle), or half a JSON and a parse error. A Parse JSON node with an explicit schema is your safety net. For extra safety, add a line to your AI prompt: "if the info is too thin to judge, output {\"category\": \"unknown\", \"urgency\": \"中\", \"risk_flag\": false}" — give the AI a graceful fallback rather than forcing it to guess.

  4. AI timeout / failure must have a fallback branch — don't let the flow hang. Calling AI is just an HTTP request — it can time out (default 30s), get rate-limited (429), or hit a 503. Power Automate's Scope + "Configure run after" gives you try-catch; the Azure OpenAI connector should have Retry Policy (exponential backoff, 3 retries). Fallback policy = skip the AI, route straight to a human approver — the business keeps moving.

  5. Make form fields AND prompts AI-friendly. Don't name fields f1, txt1, 附件1 — the AI has no idea what they mean. Field name = field meaning (for example, ReasonSummary rather than f1), and reference the field by name in your prompt — the AI picks it up much faster. Also, keep the same field name meaning consistent across Lists — don't have Reason mean "leave reason" in one List and "rejection reason" in another, or the AI gets confused when joining across Lists.

6. Advanced Extensions

You now have a working, mildly intelligent approval flow. To go further, here are several advanced paths; pick by scenario:

  • Multimodal AI (OCR + invoice recognition). The hardest part of expense approval is invoices — employees upload all sorts of shapes and sizes. AI Builder's "Process and save information from invoices" action can directly read invoice amount, tax rate, and invoice number, replacing manual reconciliation. The Chinese platforms have similar capability in Feishu's AI Field Shortcuts, DingTalk Yida, and Tencent Hunyuan — different names, different levels of polish.
  • Multi-level approval + countersign / OR-sign. This article showed single-level approval. Real business often wants "manager + HR + Finance" three-level, or even countersign (everyone must approve), or OR-sign (any one approver is enough). Power Automate's Start and wait for approval action supports these modes; Yida's process designer is even more granular.
  • Combine with RPA (Robotic Process Automation). If after approval you still need data entry into ERP / Finance, attach a Power Automate Desktop or UiBot RPA bot to the last step, automatically creating the ERP record — end-to-end automation.
  • Dashboard + retrospective. Once every approval lands in SharePoint / Bitable, use Power BI or Feishu Bitable's "Dashboard" view to build an approval-efficiency dashboard — average approval latency, leave distribution by department, anomaly trends — handy for the HR quarterly review.
  • Custom-trained model (cautious option). If prompt engineering doesn't get you there and you have a large archive of historical approvals, fine-tune a small bespoke model, specializing in the binary "is it urgent?" classification. The trade-offs: training cost + data labeling + ongoing maintenance. Worth doing only if you process 1,000+ approvals per month.
  • Loop back to C4 (AI Knowledge Base). If your approval flow often has to consult "travel policy" or "procurement ceilings," let an AI node first call into the knowledge base you built in C4, have it recommend an amount based on company policy, and then enter approval. Approvals + knowledge base, working together — that's the true endgame of intelligent approval flows.

CTA: This article is an L4 Integrated Practice piece. If you've got the leave flow running end-to-end after the steps above, here are two strong next moves: ① Sketch out the field tables for your expense / procurement / contract approvals using the same pattern. ② Curate your AI-node prompts into your own "AI node prompt library" for direct reuse next time. Future C-series articles will walk through each of those scenarios in turn — stay tuned.


Appendix: All Prompt Templates Used in This Article (Copy-Paste Ready)

Template A: Smart extraction (AI Builder Extract Custom Entities)

Entity name        Description
ReasonSummary      One-sentence summary of the leave reason; strict ≤ 20 Chinese characters (punctuation included); truncate if exceeded; output only subject + action.
IsUrgent           Is it urgent (true/false)? A sudden family event / child sick / family bereavement = true.
NeedsAttachment    Is supporting material needed (true/false)? Sick leave AND days ≥ 3 = true, OR any scenario needing a hospital certificate (surgery, hospitalization, prenatal checkup, etc.) = true; otherwise false.
MentionedDates     Specific dates or ranges mentioned in the text. If none, output "无".

Template B: Auto-classification (Azure OpenAI custom prompt)

json
{ "messages": [ {"role": "system", "content": "You are an HR assistant. Classify each employee's leave reason into exactly one of the following 6 categories and assess its urgency. Category and urgency labels are kept in Chinese to match our HR system's field values. Output valid JSON only — no explanations, no markdown code blocks. Categories: 病假 (sick leave) / 年假 (annual leave) / 事假 (personal leave) / 调休 (comp time) / 产假 (maternity leave) / 陪产假 (paternity leave). Urgency levels: 高 (high) / 中 (medium) / 低 (low)."}, {"role": "user", "content": "Leave reason (verbatim): {{triggerOutputs()?['body/Reason']}}\n\nOutput strictly in this JSON format:\n{\n \"category\": \"<one of the 6 categories above>\",\n \"urgency\": \"<高, 中, or 低>\",\n \"risk_flag\": true/false,\n \"risk_reason\": \"If risk_flag=true, briefly state why (within 20 characters); otherwise leave empty.\"\n}"} ], "temperature": 0.2, "max_tokens": 200 }

Template C: Anomaly / milestone-collision detection

json
{ "messages": [ {"role": "system", "content": "You are a project manager's assistant. Your job is to judge whether a leave request conflicts with confirmed project milestones."}, {"role": "user", "content": "Requester: {{triggerOutputs()?['body/Applicant/DisplayName']}}\nLeave period: {{triggerOutputs()?['body/StartDate']}} to {{triggerOutputs()?['body/EndDate']}}\nLeave reason: {{triggerOutputs()?['body/Reason']}}\nProject milestone list: {{variables('ProjectMilestones')}}\n\nOutput JSON only:\n{\n \"conflict\": true/false,\n \"conflict_milestone\": \"If conflict=true, name the specific milestone it conflicts with; otherwise leave empty.\",\n \"suggestion\": \"A one-sentence suggestion for the approver (within 30 characters).\"\n}"} ], "temperature": 0.1 }