Recover failed GoCardless payments with email and Slack

The moment a GoCardless payment fails, get a ready-to-review recovery email drafted for the customer and a Slack alert for your finance team.

Agentic Task
GoCardlessGmailSlackFinanceOperationsNotifications & AlertsEmail Automation
PromptCreate

When a payment fails in GoCardless (the GoCardless payment failed event, delivered by webhook), jump on recovery right away. Build this as an agent rather than a fixed script, because it needs to judge whether the failure is a one-off blip or part of a repeat pattern and then write a customer-appropriate recovery email.

Start from the failed payment in the trigger event. Follow its customer link (the customer id under the payment's links object) and call GoCardless Get Customer to pull the customer's name, email address, and details.

Then call GoCardless List Payments filtered to that same customer and review their recent history. Decide whether this looks like a one-off failure (their payments normally succeed) or a repeat failure (several recent failures, cancellations, or retries). Use that judgement to shape both the tone of the email and the recommendation you post to Slack.

GoCardless returns amounts as integers in the smallest currency unit (pence, cents), so wherever you show an amount, divide by 100 and format it as real money using the payment's currency (for example 4500 GBP becomes GBP 45.00, shown as a proper currency string). Do this in both the email draft and the Slack message, and never show the raw integer.

Draft a friendly, on-brand recovery email as a Gmail draft using Create a Draft, addressed to the customer's email. It should explain plainly that the latest collection failed, reassure the customer that their account is fine and this is easy to fix, state the formatted amount and the failure reason in plain language, and say when we will retry (or invite them to update their bank details if a retry is likely to fail again). Leave it as a draft only and do not send it, so finance can review and edit before it goes out.

Finally, post a Slack alert to the finance channel using Send a Message. Include the customer name, the formatted amount, the failure reason, and whether this is a first-time or repeat failure, followed by a one-line recommendation: auto-retry if it looks like a one-off, or reach out personally if it is a repeat failure or the mandate looks at risk. Mention that a recovery email draft is waiting in Gmail so finance can open, review, and send it.

What does this prompt do?

  • Watches your GoCardless account and springs into action the instant a payment fails.
  • Checks the customer's recent payment history to tell a one-off hiccup apart from a repeat problem.
  • Writes a friendly recovery email for the customer as a draft, ready for your team to review before it goes out.
  • Posts a Slack alert to your finance channel with the customer, amount, failure reason, and whether to auto-retry or reach out personally.

What do I need to use this?

  • A GoCardless account that collects Direct Debit, ACH, or open-banking payments.
  • A Gmail account for drafting the customer recovery email.
  • A Slack workspace with a finance or billing channel for the alerts.

How can I customize it?

  • Change the tone and wording of the recovery email to match your brand voice.
  • Point the alert at whichever Slack channel your finance team actually watches.
  • Adjust when the workflow suggests auto-retrying versus reaching out to the customer personally.

FAQs

Does it send the recovery email automatically?
No. It always leaves the email as a draft so your team can review, tweak, and send it themselves. Nothing reaches the customer without a human check.
How does it know if this is a repeat problem?
It looks at the customer's recent payment history in GoCardless. If their payments usually go through, it treats the failure as a one-off. If it sees several recent failures, it flags a repeat problem and suggests reaching out personally.
Will the amounts show up correctly?
Yes. GoCardless reports amounts in the smallest currency unit, and this workflow converts them into proper currency, like 45.00 instead of 4500, in both the email and the Slack message.
What does the Slack alert include?
The customer name, the amount, why the payment failed, whether it looks like a one-off or a repeat issue, and a one-line recommendation on whether to auto-retry or reach out personally.
Do I need to be a developer to set this up?
No. You connect your GoCardless, Gmail, and Slack accounts, and the workflow handles the rest.

Related templates

Call overdue Xero customers with an AI collections agent

Every weekday at 10am, an AI voice agent phones your most overdue Xero accounts, logs what each customer promised, and reports back to finance in Slack.

LiveKit
Xero
Deepgram
+2
Agentic Task
Win back LiveChat visitors whose chats went unanswered

Every couple of hours we find the chats your team never answered, email those visitors a real reply, and hand the sensitive ones to a support lead.

LiveChat
Gmail
Slack
Agentic Task
Chat quality review board for LiveChat support leads

Score last week's finished live chats against one rubric, let an AI grader draft the notes with quotes, and send coaching straight to the agent.

LiveChat
Slack
General Input Database
App
Chase the paperwork every new client and vendor still owes

One board showing every party you are onboarding, which documents are still missing or expiring, and a one click chase email for exactly what is outstanding.

General Input Storage
General Input Database
PDF.co
+1
App
File Gmail attachments into storage with names you can find

Every hour, new email attachments get sorted by document type and vendor, saved under clear names, and logged in a spreadsheet index.

Gmail
General Input Storage
Google Sheets
+1
Agentic Task
Win back no-show and cancelled appointments every morning

Every weekday morning, every appointment that fell through yesterday gets a personal text or email inviting them to rebook, plus a task for the right rep.

LeadConnector
Google Sheets
Slack
Agentic Task

Stop letting failed payments slip through the cracks.

Turn every failed GoCardless collection into an instant recovery email draft and a finance-team alert.