Skip to product information

Stripe Failed Invoice Recovery in n8n: Claude Dunning + Gmail Alerts

Stripe Failed Invoice Recovery in n8n: Claude Dunning + Gmail Alerts

 (200+Reviews)
Regular price £56.99
Regular price £56.99 Sale price
SAVE Sold out
Instant Digital Download
Unlimited Downloads
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
23 people viewing
High interest right now
9 added today
Fast-moving digital product
Stripe Failed Invoice Recovery in n8n: Claude Dunning + Gmail Alerts

Stripe Failed Invoice Recovery in n8n: Claude Dunning + Gmail Alerts

Regular price £56.99
Regular price £56.99 Sale price
SAVE Sold out

Recover failed Stripe payments automatically—while keeping customers informed

This n8n workflow listens for Stripe invoice.payment_failed events, uses Claude (Anthropic) to generate stage-appropriate recovery emails, sends them to customers via Gmail (including the hosted Stripe invoice link), and notifies you internally when the failure reaches the final retry attempt.

What this workflow does

  • Triggers on failed payments: Starts when Stripe sends an invoice.payment_failed event for a failed invoice payment attempt.
  • Extracts invoice details: Pulls attempt count, amount/currency, next retry date, hosted invoice URL, and customer contact info.
  • Determines the dunning stage: Classifies the attempt as first, repeat, or final to adjust email “angle” and urgency.
  • Generates recovery email content with Claude: Calls the Anthropic Messages API to draft a short subject and body using the real invoice amount and retry date.
  • Ensures a valid final message: Parses Claude output and appends the Stripe hosted invoice payment link plus support contact details; if AI output is missing/invalid, it uses a fallback template.
  • Sends via Gmail: Emails the customer with the recovery message.
  • Alerts on final attempt: If this is the final retry attempt, sends a separate internal Gmail alert to the workflow owner.

Use cases

  • SaaS operators who want automated Stripe dunning that escalates tone from gentle reminders to final notices.
  • Automation engineers deploying reliable payment recovery with AI-assisted email drafting.
  • Teams that need internal visibility when a payment fails even after the last retry.

Technical details

  • Stripe integration: Stripe Trigger configured for invoice.payment_failed (via Stripe webhook).
  • AI generation: Claude (Anthropic) Messages API using environment variable ANTHROPIC_API_KEY.
  • Email delivery + alerts: Gmail node for both customer emails and internal Gmail alerts.
  • Logic & flow control: if, set, code, switch, and sticky note annotations.
View full details