Latenode

How to Automate Stripe Failed Payment Recovery with Latenode

This template watches Stripe for failed payment events, reads amount, attempt count, and customer email, asks ChatGPT for a short recovery message, and sends that email from Gmail. Connect Stripe and Gmail. Keep the Stripe trigger on failed invoices or charges so successful payments do not send this mail. ChatGPT is a Latenode AI step.

Updated Sep 16, 2026Est. run: 5sEst. cost: $0.0003
How Latenode estimates time and cost

Latenode bills workflow runtime in CPU seconds. The first 10,000 CPU seconds are free each month, then usage follows pay-as-you-go CPU-second pricing. Plug-and-Play (PnP) AI nodes are billed separately—each PnP token is $1 USD, charged pay-as-you-go at vendor cost plus a small processing fee, with no API keys required.

Full pricing — how CPU seconds work →

Workflow preview

What this template does

  • Emails the customer when Stripe reports a failed payment
  • Reads amount and attempt count from the Stripe event
  • Writes the recovery copy with ChatGPT
  • Sends from your Gmail mailbox
  • Stops the run when the event has no customer email

How it works

1
Trigger

Watch failed Stripe payments

The scenario starts when Stripe reports a failed invoice or charge. Keep the trigger on those events.

2
Logic

Read amount and email

JavaScript takes amount, currency, attempt count, and customer email from the event. If email is missing, the run stops.

3
AI

Write the recovery email

ChatGPT returns a short dunning message that matches the attempt count.

4
Action

Send Gmail

Gmail sends the recovery email from the connected mailbox to that customer.

Setup guide

1

Connect Stripe

Add a Stripe connection with access to the account that processes subscriptions or charges.

2

Set the Stripe trigger

Add a Stripe trigger for new events. Restrict it to failed invoices or failed charges so successful payments do not send recovery mail.

3

Connect Gmail

Add a Gmail connection for the mailbox that should send recovery messages.

4

Map ChatGPT and Gmail

Use JavaScript to read amount, attempt count, and email. Send those fields to ChatGPT for the body, then map the result into Gmail send email. ChatGPT is a Latenode AI step. Test with a failed payment that includes a customer email.

Requirements

A Stripe account whose failed-payment events Latenode can receive
Customer email on the Stripe customer
A Gmail mailbox Latenode can send from
Stripe and Gmail credentials stored on those connections

FAQ

Common questions about this template

Each run uses credits on your Latenode plan. We charge for processing time (1 credit = 30 seconds). Your actual cost depends on your plan and how long the run takes. See pricing plans for plans and how credits work. Plug-and-Play AI nodes are billed separately.

More templates

You might also like

Browse all templates →

123FormBuilder to Insightly: Create leads from form submissions

Manually copying form responses into your CRM wastes time and risks errors. This integration captures each New Submission event from 123FormBuilder and uses it to Create a Lead in Insightly, mapping the respondent's name, email, and custom fields directly into a new lead record. Marketing managers and sales teams can eliminate data entry and get leads into Insightly instantly for follow-up. By connecting 123FormBuilder's form capture with Insightly's CRM, you keep your sales pipeline fed without manual work.

8s~$0.002

Create a Pipeline deal from a new Discord channel message

Sales teams often miss leads buried in Discord conversations. This scenario captures every new message in a chosen Discord channel and creates a corresponding deal in Pipeline, using the message text as the deal description and the author's username as part of the deal name. Sales managers and business development reps can log inbound signals from team discussions directly into Pipeline CRM without manual data entry. The connection turns Discord into a lead source, so no opportunity slips through the cracks.

8s~$0.002

Create a Pipeline deal when a new HubSpot deal is added

Manually copying deal data from HubSpot to Pipeline wastes time and risks errors. This automation triggers on the New Deal event in HubSpot and then runs the Create Deal action in Pipeline, mapping the deal name, amount, and associated contact email and name. Sales operations teams and CRM administrators who use both HubSpot and Pipeline can eliminate duplicate data entry. HubSpot captures the initial deal, and Pipeline receives a matching record immediately, so both systems stay aligned without manual work.

8s~$0.002