Library / CRM & Sales Pipeline
CRM & Sales Pipeline
Score customer churn risk from PostgreSQL data and alert Slack with Gemini
Runs daily or on demand to score customers from PostgreSQL features, sends ambiguous cases to Gemini for diagnosis, and posts high-risk alerts to Slack.
What it does
## Customer Relationship Drift Detector ### How it works This workflow runs daily or on demand to identify customer relationship drift from stored customer features. It scores each customer with deterministic rules, sends higher-risk or ambiguous cases through an AI diagnosis path with ticket and communication context, then merges AI and non-AI results into a saved assessment. When an assessment requires action, it posts a high-risk alert to Slack for the CRM team. ### Setup steps - Configure PostgreSQL credentials and verify the customer feature, ticket/communication context, and assessment tables used by the SQL nodes. - Configure the Daily 07:00 Trigger timezone and cadence, and keep the Manual Trigger available for testing or ad hoc runs. - Add Google Gemini credentials for the Drift Diagnosis Agent and confirm the structured output parser schema matches the validation code. - Configure Slack credentials and select the destination channel for high-risk CRM alerts. - Review the rule-scoring thresholds and IF conditions so they match the organization’s definition of relationship drift and required CRM action. ### Customization Adjust drift scoring rules, AI escalation criteria, diagnosis prompt/output fields, assessment table columns, and Slack message content to match your customer health model and CRM process. @youtube
The steps
- Every Day at 7 AM
- Start Manually
- Fetch Customer Features
- Calculate Drift Score
- Check AI Analysis Need
- Retrieve Ticket Context
- Build Evidence Payload
- Drift Analysis Agent
- Gemini AI Model
- Parse Structured Output
- Check Diagnosis Validity
- Combine Analysis Streams
- Create Analysis Record
- Store Assessment Result
17 steps in total.
Similar automations
Email AutomationScore customer health and flag churn risk with Stripe, Zendesk, OpenAI, Slack and HubSpot24 stepsCRM & Sales PipelineSend WhatsApp win-back offers to at-risk gym members with OpenAI and ClickUp30 stepsCRM & Sales PipelineDaily Churn Check with Gemini Emails to At-Risk Customers17 stepsCRM & Sales PipelineOptimize Subscription Revenue with Stripe, Postgres and Gmail13 steps