Latenode

Automatically notify customers of failed Stripe payments

This template watches Stripe for failed payment events, reads customer email, amount, and currency, and sends an alert through the SendGrid mail API from a JavaScript node. Connect Stripe, keep the trigger on failed payments, and put the SendGrid API key in that JavaScript node. Put the Stripe key on the Stripe connection.

Updated Sep 16, 2026Est. run: 6sEst. cost: $0.0004
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 as soon as Stripe reports a failed payment
  • Reads amount and customer email from the event
  • Sends through the SendGrid mail API
  • Stops the run when the event has no email address

How it works

1
Trigger

Watch Stripe events

The scenario starts when Stripe reports a failed payment. Keep it on failed payments so successful charges do not send mail.

2
Logic

Read email and amount

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

3
Action

Send the alert

The same JavaScript node calls the SendGrid mail API. Put the SendGrid API key in that JavaScript node.

Setup guide

1

Connect Stripe

Add a Stripe connection and sign in with access to the account that processes charges.

2

Set the Stripe trigger

Add a Stripe trigger for new events. Restrict it to failed payments so only those runs send mail.

3

Send mail with SendGrid

Use a JavaScript node to read email, amount, and currency, then call the SendGrid mail send API. Put the SendGrid API key in that JavaScript node. Test with a failed payment that includes a customer email.

Requirements

A Stripe account whose events Latenode can receive
Stripe credentials stored on the Stripe connection
A SendGrid account and API key stored in the JavaScript node
A customer email on the Stripe event, or an admin address you map instead

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.