Weekly at-risk customer outreach drafts for your CSM team

By General Input

Every Monday at 8am, find your paying customers who are quietly disengaging, draft personalized re-engagement emails in Gmail, and queue HubSpot tasks for your CSMs.

Integrations

  • PostgreSQL
  • Gmail
  • HubSpot

Type

Agentic Task

Categories

  • Customer Support
  • Sales

Build me a weekly at-risk customer outreach agent that runs on a cron every Monday at 8am in our local timezone.

Step 1: PostgreSQL Custom Query. Pull our active paying customers and the signals that indicate they are disengaging. The rough query should select organizations (or accounts) where subscription_status = 'active' and the customer matches at least one of these at-risk conditions: last_login_at is older than 21 days; weekly_active_sessions over the last 7 days have dropped more than 50% versus the 4-week trailing baseline; or feature_usage_count is trending down week-over-week. Return account id, account name, MRR or contract value, primary contact email, primary contact name, the specific at-risk signal(s) that matched, the actual numbers behind those signals (e.g. days since last login, current vs baseline sessions), and the HubSpot contact id if we store it. Sort by contract value descending. Treat the schema as a placeholder the user will adapt to their actual table and column names.

Step 2: Pick the top 10 most valuable at-risk accounts from the result set. If fewer than 10 qualify, just take what you have. Skip any account with no primary contact email.

Step 3: For each of the top 10 accounts, decide which signal is the most compelling thing to reference (the one most likely to feel relevant to the customer, not the most alarming to us). Then write a short, personalized re-engagement email, 4 to 6 sentences, addressed to the primary contact by first name, that references the specific signal in plain language ('I noticed your team hasn't logged in in a few weeks' rather than 'last_login_at > 21 days'), offers help, and proposes a low-friction next step like a 15-minute call. Subject line should be specific and not feel like a template.

Step 4: For each email, use Gmail Create a Draft so the email lands in the CSM's Drafts folder, not sent. Set the To, Subject, and body. Do not send. The point is the CSM reviews and decides whether to send.

Step 5: For each of the same 10 accounts, use HubSpot Create Task to create a follow-up task on the matching HubSpot contact. Subject should be 'Review at-risk outreach: <Account name>', due date today, priority HIGH if the account is in the top 3 by value, MEDIUM otherwise. Associate the task to the HubSpot contact id from step 1 (and to the company if available). In the task body include a one-line summary of the at-risk signal and a link to the Gmail draft if accessible.

The judgment of which signal matters most for which account, and how to phrase the outreach so it feels like a person noticed and not like a churn-prevention sequence, is the reason this is an agent and not a static code workflow. Keep the writing warm, specific, and human.

Inputs to expose: the cron schedule, the SQL query (so the user can adapt table/column names), the at-risk thresholds (absence days, session drop percentage), the number of accounts to surface, the from-address for Gmail, the HubSpot owner id for the tasks, and the tone of the outreach.

Related prompts

Explore more prompts
Win back LiveChat visitors whose chats went unansweredTurn Mailjet email clicks into ranked HubSpot follow-upsiMessage campaign console with pre-flight checks and delivery boardA searchable RFP answer library your bid team drafts fromSee which target accounts just started advertising on LinkedInAccount health board that puts product usage next to your CRMLook up a customer's full chat history mid conversationChase the paperwork every new client and vendor still owesLusha prospecting workbench with credit-safe revealsWhich companies your LinkedIn ads reach, matched to your CRM