Quick overview
This workflow collects medical insurance claims via an n8n form, validates them against policy data in n8n Data Tables, and either auto-approves/rejects or sends an AI-drafted recommendation to a senior reviewer on Telegram for approval, rejection, or revision, then logs and notifies the final decision.
How it works
- Receives a medical claim submission from an n8n Form Trigger.
- Looks up the submitted policy number in an n8n Data Table and applies rule-based eligibility checks to calculate deductible, remaining coverage, and maximum allowed payout.
- Automatically approves low-risk claims under the configured limit or automatically rejects invalid/ineligible claims based on the rule results.
- For claims requiring human review, uses DeepSeek (via the LangChain agent) to draft a recommended payout, decision note, and claimant message, then enforces a guardrail cap so the payout never exceeds the rule maximum.
- Sends the claim summary and AI draft to a senior reviewer in Telegram with a form to Approve, Reject, or Request changes, and loops up to three revision rounds when changes are requested.
- Builds a final decision record, logs it to an n8n Data Table, and sends the outcome and claimant message to Telegram.
Setup
- Create and populate two n8n Data Tables (one for policies and one for decisions) and update the Data Table IDs in the policy lookup and decision logging steps.
- Add a Telegram credential, then set the target Telegram chat ID used for the review request and final notification messages.
- Add a DeepSeek API credential for the LangChain chat model used to draft the senior-review decision text.
- Review and adjust the rule parameters in the code (for example the auto-approve limit, covered types format, and deductible/coverage fields) to match your policy schema and business rules.