Flag failed Stripe payments as HubSpot churn risks and rally CSMs

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.

Agentic Task
StripeHubSpotSlackSalesCustomer SupportNotifications & AlertsData Sync
PromptCreate

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.

What does this prompt do?

  • Listens for Stripe charge.failed webhooks and pulls the customer email, amount, and decline reason.
  • Finds the matching HubSpot contact and company by email and domain, then sets churn_risk and dunning status on the contact and any associated open deal.
  • Creates a HubSpot task for the account owner with a clear next step like verifying card on file or sending a retry link.
  • DMs the owner in Slack with the customer name, failed amount, decline reason, and a direct link to the HubSpot record.
  • Skips the alert when the same customer has had a successful charge in the last 24 hours so brief authorization retries do not create noise.

What do I need to use this?

  • A Stripe account with permission to configure a webhook endpoint for charge.failed events.
  • A HubSpot account with access to contacts, companies, deals, and tasks, plus a churn_risk and dunning_status property on contacts and deals.
  • A Slack workspace connected so the agent can DM the contact or deal owner.
  • Owner email or Slack mapping in HubSpot so the right CSM gets pinged.

How can I customize it?

  • Change the dedup window from 24 hours to whatever matches your retry cadence, or remove it entirely if every failure should fire.
  • Swap the DM for a channel post in #cs-alerts or route by deal size so only deals above a threshold escalate.
  • Tweak the task next step copy and due date, or add a second task for the AE when a renewal deal is involved.

FAQs

Which Stripe event triggers this workflow?
An incoming charge.failed webhook from Stripe. The agent reads the customer ID and amount off the event and pulls the rest from the Stripe Retrieve Customer call.
What if the failed customer is not in HubSpot?
The agent searches contacts by email and companies by domain. If neither matches, it still pings the default CSM channel in Slack with the raw Stripe details so nothing slips through.
How does it avoid noise from automatic card retries?
Before alerting, the agent checks Stripe for any successful charge on the same customer in the last 24 hours. If one exists, it skips the update and the Slack DM.
Will it update the deal as well as the contact?
Yes. The agent finds the contact's open deal and uses Update Deal to set churn_risk and dunning status so the pipeline view reflects the risk.
Can I send the alert to a Slack channel instead of a DM?
Yes. Tell the workflow author to post in a specific channel like #cs-alerts and remove the DM step, or do both.

Related templates

Call overdue Xero customers with an AI collections agent

Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.

LiveKit
Xero
Deepgram
+2
Agentic Task
Win back LiveChat visitors whose chats went unanswered

Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.

LiveChat
Gmail
Slack
Agentic Task
Let support send one-off Loops emails without an engineer

Your team picks a template, finds the customer, checks they are safe to email, then sends it, with every send logged where the whole team can see it.

Loops.so
Stripe
Google Sheets
App
Turn Mailjet email clicks into ranked HubSpot follow-ups

Twice a day we spot the people clicking your pricing and demo pages, create a follow-up task for their owner, and post a ranked recap to Slack.

Mailjet
HubSpot
Slack Bot
Agentic Task
Customer lifecycle inspector for Loops, Stripe and PostHog

Open one screen each morning to see a paying customer's billing, product activity and email history, then send the right next email without leaving it.

Loops.so
Stripe
PostHog
App
iMessage campaign console with pre-flight checks and delivery board

Build every text campaign in one screen: check who is actually reachable, see a realistic send plan, then watch delivery land row by row.

LoopMessage
Google Sheets
HubSpot
App

Stop letting failed payments turn into silent churn.

Connect Stripe, HubSpot, and Slack once, and Geni flags every charge.failed as a churn risk and rallies the right CSM in seconds.