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

Auto-fix your calendar when a flight slips, and flag what's at risk

When your flight moves, your calendar times get corrected automatically and you get a Slack note naming the meetings you're about to miss.

Google Calendar
AviationStack
Slack
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Log Agorapulse social conversations to HubSpot contacts

Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.

Agorapulse
HubSpot
Slack Bot
Agentic Task
Turn procurement portal tenders into CRM deals each morning

Every weekday at 7am, sign in to the tender portals you track, filter new notices against your bid criteria, and open a deal for the ones worth chasing.

Anchor Browser
Google Sheets
HubSpot
+1
Agentic Task
Clean up HubSpot contacts from your Amazon SES suppression list

Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.

Amazon SES
HubSpot
Slack Bot
Agentic Task
Provision customer entitlements in DynamoDB when a deal is won

When a HubSpot deal hits Closed Won, the customer's plan, seats and renewal dates land in your DynamoDB accounts table, with a Slack note showing what changed.

HubSpot
Amazon DynamoDB
Slack Bot
Agentic Task

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.