Finance

Follow up on every failed payment

When a customer's payment fails, Merlin drafts a friendly follow-up in Gmail and posts the account and the draft in #billing. A person reviews it and sends it.

@Merlin whenever Stripe reports a failed payment, read the invoice and the customer's plan and payment history in Stripe. Draft a short, friendly email in Gmail to the customer's billing email asking them to update their payment method, and don't send it. Post the account, the amount, any earlier failures and the draft here. Don't change anything in Stripe.

#billing
Get started for free
  1. Starts whenStripe sends invoice.payment_failed to Merlin's webhook when a customer's payment fails
  2. Merlin worksClaude Code or Codex reads the invoice and the customer's payment history in Stripe and drafts the email in Gmail
  3. You getA post in #billing with the account, the amount, earlier failures and the draft. A person reviews it and sends it from Gmail.

Tools

  • Stripe
  • Gmail
  • Slack

Capabilities

  • Automations
  • Integrations
  • Your agent's MCP

How it works

From a failed payment to a drafted follow-up in #billing.

When a customer's payment fails, Stripe sends invoice.payment_failed to Merlin's webhook and the automation starts a run.

/AcmeTeam/Automations/Follow up on every failed paymentFeedback?M

Overview

Agents

Skills

Memory

Automations

Integrations

Settings

Follow up on every failed payment

Pause
StatusActive
CreatorM Maya You
ScopeWorkspace
Last runOct 16, 2026, 9:05 AM

DetailsRun history

Trigger

Where events come from, the event that starts a run, and the filters it must match.

StripePayments and billingManage
Invoice payment failed
Filter

Run

What Merlin does each time, where it runs, and where the result goes.

Run instruction

whenever Stripe reports a failed payment, read the invoice and the customer's plan and payment history in Stripe. Draft a short, friendly email in Gmail to the customer's billing email asking them to update their payment method, and don't send it. Post the account, the amount, any earlier failures and the draft here. Don't change anything in Stripe.

RuntimeThe computer and coding agent that run it.Maya's MacBook Pro · Claude Code
DestinationWhere Merlin posts the result. Choose None when the instruction already acts in your tools.#billing

Before and after

Every failed payment gets a follow-up the same day.

Without Merlin

Someone notices the failed payment email, looks up the account and writes a reminder from scratch.

  1. 01Notice the failed payment email
  2. 02Open the invoice
  3. 03Check the plan and amount
  4. 04Look for earlier failures
  5. 05Find the billing email
  6. 06Write a friendly reminder
  7. 07Post it in #billing for a look
  8. 08Send it from Gmail
  9. 09Check back after the retry

With Merlin

The failure starts the work, and a person only reviews and sends.

  1. Stripe sends invoice.payment_failedTo Merlin's Stripe webhook
  2. Reads the account and drafts the emailClaude Code with Stripe and Gmail
  3. The account and the draft in #billingA person sends it from Gmail

Setup

Send Stripe's failed payment events to Merlin and keep sending in your hands.

Set these up once and every failed payment lands in #billing with a draft waiting. A person still reviews and sends each email.

  1. 01Connect a machineRuntimeInstall the Merlin desktop app or CLI on a computer running Claude Code or Codex. You can also use a machine a teammate shares with your workspace.
  2. 02Send Stripe events to MerlinWebhooksAdd Merlin's webhook in Stripe with its setup steps. Nothing starts until its first event arrives.
  3. 03Add Stripe to your agentYour agent's MCPConnect the Stripe MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
  4. 04Add Gmail to your agentYour agent's MCPConnect the Gmail MCP server to Claude Code or Codex on the machine that runs this. Its credentials stay on that machine.
  5. 05Add Merlin to SlackIntegrationsInstall the Slack app and add Merlin to the channel you work in. A private channel needs /invite @Merlin.
  6. 06Draft from your billing inboxYour agent's MCP

    Drafts land in the Gmail account the agent signs in to. Sign the Gmail MCP in to the inbox you send billing email from, on the machine the automation prefers, so the drafts wait where they'll be sent from.

  7. 07Paste the setup promptAutomationsSend the prompt below to @Merlin in Slack, in the channel it should post to. Merlin creates the automation and tells you what it set up.

Prompt

Have Merlin draft a follow-up for every failed payment with one prompt.

@Merlin whenever Stripe reports a failed payment, read the invoice and the customer's plan and payment history in Stripe. Draft a short, friendly email in Gmail to the customer's billing email asking them to update their payment method, and don't send it. Post the account, the amount, any earlier failures and the draft here. Don't change anything in Stripe.

#billing

Once, when you send it

  1. PromptYou send the prompt to @Merlin
  2. WebhookYou add Merlin's webhook in Stripe
  3. AutomationMerlin creates the automation

Every time the event arrives

  1. EventStripe sends the event
  2. RuntimeMerlin picks the creator's machine first
  3. ContextThe run gathers context
  4. WorkClaude Code or Codex reads Stripe and drafts the email
  5. ResultMerlin posts the account and the draft in #billing
  6. SteeringReplies in its thread follow up

Bring your coding agents into the tools your team already uses.

Let your whole team hand work to Claude Code and Codex today. Connect one machine and add Merlin to Slack, Linear or GitHub. 14-day free trial, no API keys, no card.