Turn failed Stripe payments into Pipedrive follow-up activities

By General Input

When a Stripe invoice payment fails, find the customer's Pipedrive deal, create a dated follow-up for the owner, and post the situation in Slack to recover revenue fast.

Integrations

  • Stripe
  • Pipedrive
  • Slack Bot

Type

Agentic Task

Categories

  • Sales
  • Finance

Build an agent workflow that activates whenever Stripe sends an invoice.payment_failed webhook. The goal is to react inside Pipedrive so the deal owner can recover the customer fast.

When the webhook fires, the agent should:

1. Pull the failing customer's email, the invoice amount, and the failure reason from the Stripe webhook payload.

2. Use Pipedrive's Search Persons to find the matching contact by that email.

3. Use Pipedrive's List Deals filtered by that person to find the relevant deal. Prefer the most recently won deal, and otherwise fall back to the most recently updated open deal.

4. Use Stripe's List Invoices and List Charges for that customer to decide whether this is the customer's first failed payment or part of a repeated pattern (for example, more than one failure in the last 30 days).

5. Use Pipedrive's Create Activity on the deal with the subject 'Follow up on failed payment', a due date one business day out, and a description that includes the invoice amount, the failure reason from Stripe, and a clear note about whether this is a first failure or a repeated failure.

6. Use Slack Bot's Send a Message to post a summary in a billing or customer success channel. The summary should name the customer, the failed amount, the failure reason, the history flag (first vs repeated), a link to the Pipedrive deal, and a mention of the deal owner so they can intervene.

If the agent can't find a matching person or open deal in Pipedrive, it should still post the Slack alert with the failure details and clearly call out that no matching Pipedrive contact or deal was found, so the team can handle it manually.

Related prompts

Explore more prompts
Let support send one-off Loops emails without an engineerA brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensStop cold emails to anyone with a live deal in PipedriveLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonCustomer lifecycle inspector for Loops, Stripe and PostHogLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agents