Open General Input CRM recovery tasks on failed Stripe payments
When a Stripe charge or invoice payment fails, find the account in General Input CRM, brief the account owner in Slack, and open a tailored recovery task.
Build me an agent workflow that opens a recoverable churn loop in General Input CRM and pings the account owner in Slack whenever a Stripe payment fails.
Trigger: a Stripe webhook listening for the events charge.failed and invoice.payment_failed.
For each event, the agent should do the following:
1. Gather context from Stripe. Use Stripe Retrieve Charge (or pull the relevant charge id from the invoice payload) and Stripe Retrieve Customer to get the customer email, the amount and currency, the failure reason and code, and the most recent invoice history. Use Stripe List Invoices scoped to this customer to count prior failed payments in the current month so the message can show "3rd failure this month" context.
2. Find the account in General Input CRM. Call Search People by the customer email to find the contact, and Search Companies by the email domain to find the account. From there, identify the relevant pipeline card and call Get Card on it to read the full card detail, including the assigned owner.
3. Decide the right next action based on the failure reason. Insufficient funds: schedule a 24 to 48 hour follow-up because Stripe will retry on its own. Expired or invalid card: same-day outreach asking for an updated card. Dispute or fraud signal: immediate escalation to both the owner and finance. Anything else: a generic 48-hour check-in. The body of the task should be tailored to the chosen reason, not a one-size template.
4. Suppress duplicates before creating anything. If there is already an open recovery task on the same card for the same invoice id, stop here and do not create a new task or send a new Slack message. Otherwise, call Create Task on General Input CRM pinned to the card and assigned to the card owner, with a clear title, the tailored body, and a due date that matches the urgency from step 3.
5. Brief the owner in Slack. Use Slack Open a Conversation with the owner's Slack user to get a DM channel, then use Slack Send a Message to post a short summary that includes the account name, the amount at risk, the failure reason in plain English, how many other failed payments this customer has had this month, and a deep link back to the CRM card.
Fallback behavior: if the customer cannot be matched to an existing CRM person or company, leave a note on the closest record the agent can find and DM a configured fallback owner instead of dropping the alert.
Operations to use: stripe Retrieve Charge, Retrieve Customer, and List Invoices; general-input-crm Search People, Search Companies, Get Card, and Create Task; slack Open a Conversation and Send a Message.
Additional information
What does this prompt do?
- Listens for failed Stripe charges and failed invoice payments so revenue at risk surfaces in seconds, not on a weekly report.
- Finds the matching account in General Input CRM by customer email and company domain, and reads the pipeline card to identify the right account owner.
- Picks the right next step based on the failure reason (insufficient funds, expired card, dispute) and opens a recovery task with a fitting due date.
- Direct-messages the account owner in Slack with the account name, amount at risk, reason, prior failures this month, and a deep link to the CRM card. Skips the alert if a task is already open for the same invoice.
What do I need to use this?
- A Stripe account with permission to enable webhooks for charge and invoice events.
- A General Input CRM with the customer's company on a pipeline card and an assigned owner.
- A Slack workspace so the owner can be reached by direct message.
How can I customize it?
- Change who gets the Slack brief. By default it DMs the card owner, but you can route to a shared revenue channel or a specific finance partner.
- Tune the urgency the agent picks for each failure reason. For example, treat expired cards as same-day and insufficient funds as a 48-hour follow-up.
- Adjust how duplicates are suppressed. The default skips when there is already an open task for the same invoice on the same card, but you can widen that to any open task per customer in the same week.
Frequently asked questions
Does this catch subscription payment failures, or just one-off charges?
What happens if the customer is not yet in General Input CRM?
Will this spam the owner if Stripe retries the same failed payment multiple times?
Can the recovery task be assigned to someone other than the card owner?
Does the agent email the customer directly?
Related templates
Stop letting failed payments sit in a Stripe email.
Connect Stripe, General Input CRM, and Slack once, and Geni opens the right recovery task the moment a payment fails.