Automatically identify at-risk customers by analyzing engagement across HubSpot, Salesforce, Pipedrive, and Zendesk, then alert your team via Slack, email, and task boards before renewals expire.
This agent works seamlessly with these platforms to deliver powerful automation.
Send, receive, and manage Gmail messages with full email automation capabilities
Issue tracking and project management software for agile development teams
Connect to PostgreSQL databases to query and manage data
Send messages, manage channels, and automate workflows in Slack workspaces
Visual project management with boards, lists, and cards for organizing tasks and...
Customer service and support platform with ticket management, user administratio...
The Churn Guardian Agent is your proactive early-warning system for customer retention. This intelligent workflow automatically monitors accounts with upcoming subscription renewals (30 days out), analyzes engagement data from multiple sources, calculates churn risk scores, and triggers appropriate alerts and actions based on risk levels. Instead of manually checking multiple platforms and spreadsheets, your Customer Success team receives prioritized, actionable insights delivered directly to their inbox and project management tools.
Key benefits include:
Perfect for: SaaS companies with subscription models, Customer Success teams managing 50+ accounts, businesses using multiple CRM/support platforms, and organizations looking to implement data-driven retention strategies.
This workflow is designed for:
You'll get the most value if you're currently using multiple tools (CRM, support desk, analytics) and struggling to get a unified view of account health before renewals.
Why it's needed: Stores your subscription data, tracks renewal dates, and logs all churn assessments for historical analysis and reporting.
Setup steps:
subscriptions table with columns: account_id, account_name, renewal_date, mrr, contract_value
churn_logs table with columns: account_id, assessment_date, churn_score, risk_level, engagement_data (JSONB)Configuration in TaskAGI:
Why it's needed: Retrieves support ticket volume and sentiment to gauge customer satisfaction and engagement levels.
Setup steps:
yourcompany.zendesk.com)Configuration in TaskAGI:
.zendesk.com)Why it's needed: Creates visual task cards for medium and high-risk accounts, enabling your CS team to track intervention efforts.
Setup steps:
https://trello.com/app-key to get your API KeyConfiguration in TaskAGI:
Why it's needed: Creates formal issues for high-risk accounts requiring cross-functional intervention (product, engineering, leadership).
Setup steps:
yourcompany.atlassian.net)Configuration in TaskAGI:
Why it's needed: Sends real-time alerts to your CS team channel when high-risk accounts are detected, enabling immediate action.
Setup steps:
https://api.slack.com/apps and click Create New App
chat:write scope under Bot Token Scopesxoxb-)/invite @Churn Guardian
Configuration in TaskAGI:
Why it's needed: Sends detailed email notifications to CS team members and daily summary reports to leadership.
Setup steps:
automation@yourcompany.com) or use an existing service accounthttps://myaccount.google.com/apppasswords
Configuration in TaskAGI:
Note: Update the email addresses in nodes 3744, 3747, 3748, and 3753 to match your team's addresses (csm-team@yourcompany.com and success-team@yourcompany.com).
Set when the workflow runs each day:
09:00 (9 AM in your timezone - adjust to start of your workday)This ensures fresh assessments are ready when your team starts their day.
Define the scoring thresholds that determine risk levels:
{
"days_until_renewal": 30,
"high_risk_threshold": 70,
"medium_risk_threshold": 40,
"engagement_weights": {
"hubspot_score": 0.25,
"salesforce_health": 0.20,
"pipedrive_activity": 0.15,
"zendesk_tickets": 0.20,
"feature_usage": 0.20
}
}
Adjust these values based on your business:
high_risk_threshold: Scores above this trigger urgent alerts (default: 70)medium_risk_threshold: Scores above this trigger moderate alerts (default: 40)engagement_weights: Adjust importance of each data source (must sum to 1.0)Configure the PostgreSQL query to identify accounts for assessment:
Query:
SELECT
account_id,
account_name,
renewal_date,
mrr,
contract_value,
csm_owner
FROM subscriptions
WHERE renewal_date = CURRENT_DATE + INTERVAL '30 days'
AND status = 'active'
ORDER BY contract_value DESC
Customize:
30 days to match your preferred lead time (e.g., 45 days for enterprise accounts)AND tier = 'enterprise' to focus on high-value segmentsORDER BY to prioritize differently (e.g., by mrr DESC)This loop processes each account individually. No configuration needed - it automatically iterates through results from Step 3.
The loop exposes these variables for subsequent nodes:
{{nodes.3729.account_id}} - Unique account identifier{{nodes.3729.account_name}} - Company name{{nodes.3729.renewal_date}} - Subscription renewal date{{nodes.3729.mrr}} - Monthly recurring revenue{{nodes.3729.contract_value}} - Total contract valueThese nodes run in parallel to gather engagement data:
HubSpot - Get Engagement (Node 3730):
https://api.hubapi.com/crm/v3/objects/companies/{{nodes.3729.account_id}}
Authorization: Bearer YOUR_HUBSPOT_API_KEY
Salesforce - Get Account (Node 3731):
https://yourinstance.salesforce.com/services/data/v57.0/sobjects/Account/{{nodes.3729.account_id}}
Pipedrive - Get Deal Activities (Node 3732):
https://api.pipedrive.com/v1/deals/{{nodes.3729.account_id}}/activities
api_token=YOUR_PIPEDRIVE_TOKEN&start_date={{30_days_ago}}
Zendesk - Get Organization Tickets (Node 3733):
{{nodes.3729.account_id}}
Analytics API - Feature Usage (Node 3734):
https://analytics.yourcompany.com/api/usage
{
"account_id": "{{nodes.3729.account_id}}",
"date_range": "last_30_days",
"metrics": ["dau", "mau", "feature_adoption", "session_duration"]
}
Combines all collected data into a unified object. Configuration:
{
"account_info": "{{nodes.3729}}",
"hubspot": "{{nodes.3730}}",
"salesforce": "{{nodes.3731}}",
"pipedrive": "{{nodes.3732}}",
"zendesk": "{{nodes.3733}}",
"analytics": "{{nodes.3734}}"
}
Scoring API Call (Node 3736):
Analyze this customer data and predict churn risk (0-100):
- Engagement: {{nodes.3735.hubspot.engagement_score}}
- Support tickets: {{nodes.3735.zendesk.ticket_count}}
- Feature usage: {{nodes.3735.analytics.mau}}
- Last contact: {{nodes.3735.salesforce.last_contact}}
Return JSON: {"churn_score": X, "reasoning": "..."}
Engagement API Call (Node 3737): Similar to above, but focuses on engagement quality and recommendations.
Normalize Scoring Response (Node 3738): Ensures consistent data structure from AI responses.
Compute Churn Score (Node 3739): JavaScript function that combines AI scores with rule-based logic:
const aiScore = nodes[3738].churn_score;
const ticketCount = nodes[3735].zendesk.ticket_count;
const usage = nodes[3735].analytics.mau;
let finalScore = aiScore;
// Penalty for high ticket volume
if (ticketCount > 10) finalScore += 15;
// Penalty for low usage
if (usage < 5) finalScore += 20;
// Cap at 100
finalScore = Math.min(finalScore, 100);
return {
churn_score: finalScore,
risk_level: finalScore > 70 ? 'HIGH' : finalScore > 40 ? 'MEDIUM' : 'LOW',
factors: {
ai_score: aiScore,
ticket_penalty: ticketCount > 10,
usage_penalty: usage < 5
}
};
The workflow branches based on churn score:
HIGH Risk Path (Score > 70):
Check HIGH Risk (Node 3740): Condition: {{nodes.3739.risk_level}} == 'HIGH'
Trello Card (Node 3741):
🚨 HIGH RISK: {{nodes.3729.account_name}} - Renewal {{nodes.3729.renewal_date}}
Jira Issue (Node 3742):
HIGH CHURN RISK: {{nodes.3729.account_name}} (${{nodes.3729.contract_value}})
Slack Alert (Node 3743):
🚨 *HIGH CHURN RISK DETECTED*
*Account:* {{nodes.3729.account_name}}
*Churn Score:* {{nodes.3739.churn_score}}/100
*Contract Value:* ${{nodes.3729.contract_value}}
*Renewal Date:* {{nodes.3729.renewal_date}}
*Key Issues: