Hướng Dẫn Power Automate SharePoint Document Automation: Tự Động Hoá Quy Trình Tài Liệu Doanh Nghiệp
TL;DR: Power Automate + SharePoint tự động hoá toàn bộ document lifecycle: upload → classify → route for approval → notify → archive. Dùng Standard connector (miễn phí với M365) cho 90% use cases. 5 flow patterns chính: document approval (single/multi-level), auto-classify, document routing, version backup, expiry notifications. Admin governance qua Power Platform admin center + SharePoint admin center.
Quy trình tự động hoá tài liệu với Power Automate + SharePoint — từ upload đến approval và archive.
Doanh nghiệp của bạn vẫn email qua lại "anh duyệt giúp file này"? Liên hệ PUPAM để triển khai document approval workflows tự động — file upload → auto-route approver → notify → archive, hoàn toàn miễn phí với Standard connectors.
SharePoint Document Triggers
| Trigger | Khi Nào Fire | Use Case |
|---|---|---|
| When a file is created | File mới upload | Auto-classify, notify |
| When a file is modified | File bị edit | Version alert, backup |
| When a file is created/modified | Cả hai | General processing |
| For a selected file | User click "Flow" | Manual trigger on file |
| When file properties change | Metadata update | Status change tracking |
Flow Pattern 1: Document Approval — Phê Duyệt Tài Liệu Tự Động
Single-Level Approval
Scenario: Upload hợp đồng vào folder "Chờ Duyệt" → auto-route cho manager phê duyệt.
Các bước thiết lập
- Trigger: When file created in folder
/Hop Dong/Cho Duyet - Get file properties — lấy metadata từ SharePoint Library (Site URL, Library, File ID)
- Start approval (Approvals connector — Standard, miễn phí)
- Type: Approve/Reject — First to respond
- Title:
Duyệt HĐ: @{triggerOutputs()?['body/{FilenameWithExtension}']} - Assigned to: manager email
- Details: link đến file trên SharePoint
- Condition — kiểm tra Outcome:
- If Approve: Copy file →
/Hop Dong/Da Duyet, update Status = "Đã Duyệt", send email + post Teams - If Reject: Move file →
/Hop Dong/Tu Choi, update Status = "Từ Chối", gửi email kèm rejection comments
- If Approve: Copy file →
Multi-Level Approval
Scenario: Hợp đồng > 100 triệu VNĐ → cần CEO duyệt sau Manager.
Sequential Approval (theo cấp)
- Level 1 — Manager approval → wait for response
- Condition: Amount > 100,000,000?
- Yes → Level 2: CEO approval → wait for response
- No → skip to final actions
- Final: Move file → approved/rejected folder, update metadata, notify all parties
Parallel Approval (đồng thời)
- Type: "Approve/Reject — Everyone must approve"
- Assigned to: manager, CFO, legal head
- ALL must approve → file approved
- ANY reject → file rejected
Flow Pattern 2: Auto-Classify Documents — Tự Động Phân Loại
Scenario: Upload file → auto-set metadata dựa trên folder path và filename.
Phân loại theo Folder (Switch action)
| Folder | DocType | Department | Retention |
|---|---|---|---|
/Invoices | Hóa Đơn | Kế Toán | 10 năm |
/Contracts | Hợp Đồng | Pháp Lý | 7 năm |
/HR | Nhân Sự | HR | 5 năm |
| Default | General | — | Notify admin |
Auto-tag theo Filename
- Contains "invoice" → tag Invoice
- Contains "report" → tag Report
- Extension
.pdf→ tag PDF
Notify Uploader
- Gửi notification: "File đã được phân loại: " — user biết file đã được xử lý
Cần thiết kế folder structure và metadata schema cho SharePoint Library? PUPAM hỗ trợ kiến trúc SharePoint document management tối ưu cho doanh nghiệp.
Flow Pattern 3: Document Routing — Chuyển Tài Liệu Đúng Nơi
Scenario: Central upload folder → auto-route đến department sites dựa trên metadata.
Quy trình routing
- Trigger: File created in "Incoming Documents"
- Get file content + đọc metadata (Department column)
- Switch theo Department:
- Sales → Copy đến Sales site + notify Sales team trong Teams
- Finance → Copy đến Finance site + start approval flow (financial docs cần duyệt)
- HR → Copy đến HR site (restricted access) + apply sensitivity label "Confidential"
- Cleanup: Delete/move file từ Incoming → "Processed"
- Log: Ghi nhận vào Excel — filename, date, department, status
Flow Pattern 4: Version & Backup
Scenario: Critical documents → tự động backup khi modified + alert stakeholders.
Quy trình backup
- Trigger: When file modified (specific library)
- Check: Modified by ≠ "System" (tránh infinite loop)
- Get file content → Create file tại backup location
- Filename format:
original_v{version}_{date} - Target: BackupSite/Documents/Archive
- Filename format:
- Condition: Major version change?
- Yes → Email stakeholders (who changed, version number, link)
- No → Log silently
- Retention: Nếu versions > 50 → delete oldest → giữ rolling 50 versions
Flow Pattern 5: Expiry & Retention — Tài Liệu Hết Hạn
Scenario: Hợp đồng sắp expire → notify 30 ngày trước, escalate 7 ngày, auto-archive khi hết hạn.
Quy trình expiry notification
- Trigger: Recurrence (Daily, 8:00 AM Vietnam time)
- Get items từ SharePoint — Filter: ExpiryDate ≤ 30 ngày tới AND Status ≠ Expired/Renewed
- Apply to each expiring document:
- 30 ngày → email "HĐ sắp hết hạn trong 30 ngày"
- 7 ngày → email + Teams urgent notification
- 0 ngày → update Status = "Expired", move to archive folder, notify legal team
- Weekly summary email to management — count expiring contracts, list cần renewal
Checklist Triển Khai Document Automation
- Thiết kế folder structure: upload → processing → approved → rejected → archive
- Tạo metadata columns trên SharePoint Library (DocType, Department, Status, ExpiryDate)
- Build approval flow — single hoặc multi-level tuỳ quy mô
- Setup auto-classify flow dựa trên folder path hoặc filename
- Configure document routing theo department metadata
- Build version backup flow cho critical documents
- Thiết lập expiry/retention notification flow (30/7/0 ngày)
- Thêm error handling — Scope try/catch + failure alert emails
FAQ
SharePoint document flows cần Premium license không?
Không — SharePoint connector = Standard, miễn phí với mọi Microsoft 365 license. Tất cả actions (create file, get properties, update, move, copy, delete) đều Standard. Approvals connector cũng Standard. Chỉ cần Premium khi: connect SQL/Dataverse cho metadata lookup, dùng AI Builder OCR, HTTP connector cho external API. Doanh nghiệp VN: 90% document automation workflows chạy hoàn toàn free. Admin verify qua Microsoft 365 admin center → Billing → Licenses.
Approval flow có gửi được cho người ngoài tổ chức không?
Có nhưng limited. Internal users (M365 accounts) = full experience (Teams notification, Approval center, email). External users nhận email với approve/reject buttons nhưng phải sign in Microsoft account. Workaround: (1) Email approve/reject links (reply "APPROVED"), (2) Microsoft Forms cho external input → trigger flow, (3) Power Pages cho customer-facing approval UI. Entra ID B2B guest accounts: invite external → full Approval experience. Admin manage guests qua Entra ID → External Identities.
Flow bị lỗi khi filename tiếng Việt có dấu?
Common issue — SharePoint URL encoding. Tên file "Hợp Đồng Số 1.pdf" → URL encode → gây lỗi Power Automate expressions. Fix: (1) Dùng File ID thay vì file path trong flow actions — ID là số, không bị encoding. (2) Naming convention không dấu: "Hop-Dong-So-1.pdf". (3) Expression: encodeUriComponent(filename). Best practice cho doanh nghiệp VN: naming convention không dấu + prefix code (VD: INV-2026-001).
Làm sao tránh infinite loop khi flow update file trigger lại chính nó?
Classic problem — 3 solutions: (1) Trigger condition: @not(equals(triggerOutputs()?['body/Editor/Email'], 'service-account@company.com')) — flow chỉ fire khi editor không phải service account. (2) Status column: check "ProcessedByFlow = Yes" → skip nếu đã xử lý. (3) Modified By check: skip nếu modified by = flow connection. Best practice: dedicated service account cho flow connections. Infinite loops = burn hết flow runs quota. Monitor qua Power Platform admin center → Flow analytics.
Document approval có integrate Teams Approvals center không?
Có — Approvals connector tự động integrate. Khi start approval, approver nhận: email notification với approve/reject buttons, Teams notification (Approvals app), Teams → Approvals tab hiện tất cả pending/completed, mobile push notification. Approver phê duyệt trực tiếp trong Teams — không cần mở SharePoint. Approval history viewable trong Teams + flow run history. Microsoft Purview audit logs track decisions cho compliance.
Có thể dùng Power Automate để extract text từ PDF trên SharePoint không?
Có — cần AI Builder (Premium). AI Builder Document Processing model extract text, tables, key-value pairs từ PDF/images. Kết hợp: file upload → AI Builder extract → populate SharePoint metadata tự động. Alternative miễn phí: dùng filename/folder convention để classify thay vì OCR. Hoặc: Microsoft Syntex (SharePoint Premium) cho advanced content processing — auto-classify + extract metadata từ documents at scale.
Nguồn Tham Khảo
- Power Automate + SharePoint Documentation — Microsoft Learn
- SharePoint Connector Reference — Power Automate
- Approvals in Power Automate — Microsoft Learn
- Power Automate Trigger Conditions — Microsoft Learn
- SharePoint Document Library Best Practices
- DLP Policies for Power Platform
- Microsoft Purview Compliance — Audit Logs
Hành Động Tiếp Theo
- Build approval flow đầu tiên — file upload folder "Chờ Duyệt" → Start approval → route Approved/Rejected (30 phút setup, Standard connector miễn phí)
- Thiết kế folder structure — tạo 5 folders chuẩn (Upload, Processing, Approved, Rejected, Archive) + metadata columns trên SharePoint Library
- Audit quy trình tài liệu hiện tại — liệt kê top 5 document workflows đang chạy thủ công → ưu tiên automation theo ROI (thời gian tiết kiệm × tần suất)
Bài Liên Quan Nên Đọc
- Power Automate Triggers Actions Connectors
- Power Automate Excel Data Processing
- Power Apps SharePoint List Forms Customization
- SharePoint Online Communication Sites Design
- Microsoft 365 Security Best Practices
Kết Luận
| Khía Cạnh | Chi Tiết |
|---|---|
| 5 Flow Patterns | Approval, Auto-Classify, Routing, Version Backup, Expiry Notifications |
| Licensing | SharePoint + Approvals = Standard (miễn phí M365), AI Builder = Premium |
| Admin Governance | Power Platform admin center (DLP), SharePoint admin center (library), Microsoft Purview (audit) |
Power Automate + SharePoint là document automation engine cho doanh nghiệp — từ approval workflows, auto-classify, routing đến version backup và expiry notifications. 90% use cases chạy hoàn toàn miễn phí với Standard connectors. Key best practices: trigger conditions tránh infinite loop, dedicated service account, error handling với Scope try/catch, naming convention không dấu cho tiếng Việt. Admin governance qua Power Platform admin center + SharePoint admin center + Microsoft Purview. Bắt đầu với 1 approval workflow → deploy → measure → mở rộng dần across departments.
Cần tự động hoá document workflows cho doanh nghiệp? Liên hệ PUPAM — approval flow design, SharePoint library architecture, document routing, retention & compliance setup.