Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

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

  1. Every Day at 7 AM
  2. Start Manually
  3. Fetch Customer Features
  4. Calculate Drift Score
  5. Check AI Analysis Need
  6. Retrieve Ticket Context
  7. Build Evidence Payload
  8. Drift Analysis Agent
  9. Gemini AI Model
  10. Parse Structured Output
  11. Check Diagnosis Validity
  12. Combine Analysis Streams
  13. Create Analysis Record
  14. Store Assessment Result

17 steps in total.

Similar automations