Automate Content Triage with Human Approval
Goal
Build a content-triage flow that never publishes or deletes data automatically.
Prerequisites
Prepare a test form, a review queue, and a workspace containing only simulated data.
Steps
- Use a new form response or message as the trigger and read only title, body, and submission time.
- Add deterministic rules to reject empty content, duplicates, and clearly invalid input first.
- Ask AI for fixed JSON containing category, summary, risk flags, and confidence.
- Validate the JSON; send parse failures and low-confidence results to a manual queue.
- Write every result to a review table and create downstream work only after a person selects Approve.
- Test normal, ambiguous, prompt-injection, and oversized inputs.
Expected result
Every input has a visible classification record, and every external write requires human approval.
Troubleshooting
- JSON is unstable: reduce fields and add schema validation.
- Tasks are duplicated: store the trigger event ID and deduplicate before writing.
- Sensitive information reaches the model: redact it before the AI step.