Templates / Mine pharma complaint trends and trigger CAPA alerts with Claude and Slack

Mine pharma complaint trends and trigger CAPA alerts with Claude and Slack

Needs changes

by Oneclick AI Squad ✓ · 6 views · created 2026-09-03 · Document Extraction, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 19 nodes and runs on a schedule (every day) (plus 1 other trigger). Along the way it connects Anthropic Chat Model and Slack.

How it runs

Trigger: On a schedule (every day) (plus 1 other trigger).

  1. Set - Config (Edit Fields (Set)): sets 8 fields: complaintSourceApiUrl, capaTicketingApiUrl, trendLogApiUrl…
  2. HTTP - Fetch New Complaints (HTTP Request): calls an HTTP API
  3. JS - Normalize Complaint Records (Code): runs custom JavaScript code
  4. If: checks a condition and branches into true / false
  5. JS - Fan Out Complaints for Extraction (Code): runs custom JavaScript code
  6. AI Agent: runs an AI agent, with model: Anthropic - Complaint Extraction Model
  7. JS - Parse Extracted Fields (Code): runs custom JavaScript code
  8. JS - Cluster by Product & Defect Category (Code): runs custom JavaScript code
  9. JS - Compare Clusters Against Rolling Baseline (Code): runs custom JavaScript code
  10. JS - Fan Out Clusters for Routing (Code): runs custom JavaScript code

…plus 5 more steps. See the full node list below.

Services it uses

Anthropic Chat ModelSlack

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • AI Agent v1 (old agent modes) in AI Agent - Extract Structured Complaint Fields (v1.6): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Removed in 3.0Replace with
AI Agent v1 (old agent modes)
AI Agent - Extract Structured Complaint Fields (v1.6)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (12)

From the author

Quick overview This workflow polls a complaint-source API on a schedule, uses Anthropic Claude to extract structured defect signals from complaint narratives, clusters complaints by product and defect category, detects statistically unusual spikes against a…

Excerpt from Oneclick AI Squad's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.