Flag failed Stripe payments as HubSpot churn risks and rally CSMs

By General Input

When Stripe reports a failed charge, mark the HubSpot contact and deal as a churn risk, open a task for the owner, and DM the CSM in Slack.

Integrations

  • Stripe
  • HubSpot
  • Slack

Type

Agentic Task

Categories

  • Sales
  • Customer Support

Build me an agent workflow that turns failed Stripe payments into a HubSpot churn risk signal and rallies the right CSM, instead of letting dunning silently kill the account.

Trigger: an incoming Stripe webhook on charge.failed events. The event payload gives me the customer ID, the amount, and the failure reason.

When the webhook fires, I want the agent to do the following:

1. Call Stripe Retrieve Customer with the customer ID from the event so we have the customer email, name, and any saved metadata. Also check Stripe List Charges for that customer and skip the rest of the workflow if there has been a successful charge in the last 24 hours, since those are usually short authorization retries and should not generate noise.

2. In HubSpot, run Search Contacts by that email to find the matching contact, and Search Companies by the email's domain to find the company. Grab the contact owner and any associated open deal.

3. Use HubSpot Update Contact to set a churn_risk property to true and a dunning_status property reflecting this failed charge (amount, decline reason, timestamp). If there is an associated open deal, use Update Deal to set the same churn_risk and dunning_status on the deal so it is visible in the pipeline view.

4. Use HubSpot Create Task associated with the contact (and the deal if present), assigned to the account owner, with a clear next step like "Verify card on file with [customer name] and send a retry link. Failed charge: $[amount], reason: [decline reason]." Set the due date for tomorrow and priority to high.

5. Send a Slack message as a DM to the account owner with the customer name, company, failed amount, decline reason, and a direct link to the HubSpot contact record. Keep it short and scannable so the CSM can act in one read.

If no HubSpot contact or company is found for the email, skip the HubSpot updates but still post a fallback Slack message to a default CS alerts channel with the raw Stripe details so the team can investigate manually.

Tone for the Slack DM and the task copy should be calm and operational, not alarmist. The goal is fast follow-up, not panic.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredLet support send one-off Loops emails without an engineerTurn Mailjet email clicks into ranked HubSpot follow-upsCustomer lifecycle inspector for Loops, Stripe and PostHogiMessage campaign console with pre-flight checks and delivery boardChat quality review board for LiveChat support leadsA 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 CRM