Open General Input CRM recovery tasks on failed Stripe payments

By General Input

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.

Integrations

  • Stripe
  • General Input CRM
  • Slack

Type

Agentic Task

Categories

  • Finance
  • Sales

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.

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 engineerCustomer lifecycle inspector for Loops, Stripe and PostHogChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downMonth-end Stripe finance pack, stored and shared in SlackNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollments