GenAiHub

Last checked 23 October 2026 — responded normally.

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

Quick overview

Live
Open / InstallLast updated October 23, 2026

Description

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 rolling baseline, and escalates anomalies by creating a CAPA ticket and sending a Slack alert. How it works Runs on a schedule (or manually) to start a new complaint-mining cycle. Fetches recently logged complaints from a complaint system API and removes complaints already processed using workflow static data. If no new complaints are found, ends the run without calling Anthropic. Sends each new complaint narrative to an Anthropic Claude agent to extract product, batch/lot, defect category, and severity, and falls back to safe defaults if parsing fails. Aggregates extracted complaints into clusters keyed by product and defect category, then compares each cluster’s volume to its rolling historical mean using a z-score and updates the stored baseline. For clusters flagged as statistical anomalies, creates a CAPA escalation via an HTTP API and posts an alert to a Slack channel. Logs every cluster (escalated and non-escalated) to a trend-store API for ongoing tracking. Setup Configure HTTP Header Auth credentials for the complaint-source API, CAPA ticketing API, and trend-store API used by the three HTTP Request steps. Add an Anthropic (Claude) API credential/connection for the AI Agent’s language model. Add a Slack credential and ensure the target channels exist (for example, the default #quality-capa-escalations). Update the endpoint URLs, Slack channel names, and the z-score/baseline settings in the configuration step to match your systems and desired sensitivity. An n8n automation workflow template by Oneclick AI Squad.

Community Metrics

Views
0
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

Oneclick AI Squad

Platform

web

Pricing model

free

Categories

  • Automation
  • AI

Tags

  • n8n
  • workflow
  • http-request
  • slack
  • code
  • ai-agent
  • anthropic-chat-model

Capabilities

  • 5 nodes

Information

TypeWorkflow
Sourcen8n
AddedSeptember 4, 2026

Comments

?

Others in the same category, ranked by how often they are opened.