See llms.txt for all machine-readable content.

Back to Templates

Send Stripe invoice payment reminders with GPT-4o and SuprSend

Quick overview

This workflow listens for Stripe invoice events, uses OpenAI to generate personalized payment reminder copy based on the customer’s Stripe history, and triggers or cancels a SuprSend reminder workflow while maintaining a SuprSend list of customers with invoices due.

How it works

  1. Triggers when Stripe emits an invoice.finalized, invoice.paid, or invoice.voided event for invoices sent via Stripe’s send_invoice collection method.
  2. When an invoice is finalized, OpenAI looks up the Stripe customer record to assess delinquency and generates email, SMS, WhatsApp, and overdue email reminder text in a structured format.
  3. Upserts the customer profile in SuprSend with the latest name, email, and phone from the Stripe invoice.
  4. Adds the customer to the SuprSend payment-due list and triggers the SuprSend payment-reminder workflow with invoice details and the AI-generated message content.
  5. When an invoice is paid or voided, cancels the SuprSend payment-reminder workflow for that customer.
  6. Removes the customer from the SuprSend payment-due list to stop further reminders.

Setup

  1. Add credentials for Stripe, OpenAI (Chat Completions), and SuprSend.
  2. In Stripe, ensure invoices use the send_invoice collection method (emailed invoices) so the workflow routes events correctly.
  3. In SuprSend, create a list with ID payment-due and a workflow with ID payment-reminder that uses the passed data to send reminders on your desired schedule.
  4. Review and customize the OpenAI system instructions (company name, payment terms, and support contact details) to match your business tone and policies.