PrismDesk

PrismFlow Automation Guide

PrismFlow is PrismDesk’s built-in guarded workflow engine designed around one core principle: automate repetitive capture, aggregation, and draft entry — while keeping humans firmly in charge of high-impact submissions.


1. 16 Atomic Step Types

Record interactions visually or assemble workflows using 16 typed step primitives:

Category Step Types Capabilities
Navigation & Input navigate / wait / wait_for / click / fill Reliable page navigation, visibility waits, and form filling (supports native inputs plus Ant Design & ElementUI selects/date pickers)
Data Capture paginate_extract / extract_from_tabs / capture_api_json / wait_download_parse / extract_table Multi-page click/scroll/network pagination, cross-tab table aggregation, direct L2 JSON capture, and downloaded CSV/XLSX parsing
Analysis & Diff sql_query / snapshot_diff / ai_summarize Local WASM SQL aggregation + ECharts, baseline diff anomaly detection, and conditional AI summaries triggered only on alerts (if_alert)
Guarded Output for_each_row / export_report / mcp_tool Row-by-row validated draft filling, native multi-sheet .xlsx / .html / Markdown reports, and external MCP tool connectors

2. Six Built-In Templates

  1. Paginated Alert Capture & SQL Summary: Automatically traverses up to 10 pages and summarizes alerts in local SQL + ECharts.
  2. Incident Ticket Draft Assistant: Pre-fills troubleshooting fields for visual review without ever clicking submit.
  3. Multi-Tab Daily Report Aggregation: Collects tables across all open tabs in the active workspace and compiles a multi-sheet report.
  4. Promo SKU Batch Drafting with Price Floor Guardrails: Validates every CSV row against discount floors (e.g. promo >= 50% of list price) before filling drafts.
  5. Scheduled KPI Watch & Snapshot Diff Briefing: Read-only periodic inspection that wakes AI only when metric deltas breach configured thresholds.
  6. L2 API List Capture & Feedback Root-Cause Summary: Sniffs complete backend JSON lists past virtual-scroll limits for SQL clustering and AI synthesis.

3. Hard Safety Guardrails

3.1 Batch Draft Validation Rules

for_each_row supports declarative field validation: required, min, max, min_ratio_of_field, max_ratio_of_field, after_field, and regex. Any violating row is immediately flagged and halted, and PrismFlow strictly fills drafts without auto-clicking submit.

3.2 Read-Only Lock on Scheduled Inspections

AutomationScheduler enforces isWorkflowReadOnlySafe at the code level:

  • Allowed unattended: Pure read-only analytical pipelines (capture, SQL, snapshot diff, local report export, AI summary).
  • Strictly blocked unattended: Any workflow containing click, fill, for_each_row, or mcp_tool.

4. Native Multi-Sheet Reports & 7 Ops MCP Connectors

  • Zero-Dependency Reporting: Pure TypeScript XLSX/ZIP generation bundles SQL summaries, snapshot diff tables, and raw extracted tables into a multi-sheet .xlsx, standalone .html, or Markdown report.
  • Operations MCP Connector Suite: Connects cleanly via standard MCP with HITL approvals on every write:
    1. bitable_query_records — Read online multi-dimensional tables
    2. bitable_upsert_records — Upsert cleaned rows (HITL required)
    3. doc_append_daily_report — Append daily/weekly Markdown reports (HITL required)
    4. im_send_ops_card — Push structured cards to Feishu / WeCom / DingTalk (HITL required)
    5. mail_create_report_draft — Create email drafts without auto-sending (HITL required)
    6. doc_extract_ops_sheet — Parse unstructured quotations/schedules into structured JSON
    7. ops_create_collab_ticket — Open cross-team incident tickets with source page URLs (HITL required)