# Feishu / Lark Sheets Sync Use this reference after any write-enabled workbook operation. ## Trigger After the local workbook is successfully saved by `--write-excel`, `--write-summary`, `--write-workbook`, email status write-back, social status write-back, or Facebook conversation write-back, check project-root `feishu_sync_config.json`. - If the config exists and `enabled=true`, automatically call the WorkBuddy `lark-sheets` plugin to sync. - If the config is missing, report that local write succeeded and Feishu sync is pending configuration. - If the plugin is unavailable or unauthorized, report the blocker but do not roll back local Excel. ## Default Scope Default sync target is `客户信息汇总表`. Channel sheets are legacy and should not be synced unless the user explicitly asks to mirror the full workbook. If `sync_conversation_sheet=true`, also sync `Facebook对话记录` after Facebook reply synchronization. Do not sync backups, preview HTML, preview JSON, send logs, run reports, screenshots, or SMTP credentials. ## Config The real config belongs in the project root, not inside the skill package. The skill only provides `assets/feishu_sync_config.example.json`. Suggested fields: ```json { "enabled": true, "spreadsheet_url": "", "spreadsheet_token": "", "summary_sheet_name": "客户信息汇总表", "conversation_sheet_name": "Facebook对话记录", "sync_conversation_sheet": true, "sync_scope": "summary_first" } ``` ## Write Strategy Use the local workbook as the source of truth. Overwrite the remote Sheet with the local table instead of appending rows, so repeated syncs do not create duplicates. After writing, read back the remote header and row count to verify the sync. ## Required Report Save a run report under `runs/YYYYMMDD//feishu-sync-report.json` with status, target spreadsheet, synced sheets, local row counts, remote row counts, and failure reason when any.