Skip to content

The moment it happens

Get an email the moment a transfer fails

You learn about a failed Brex payment straight away, with the amount and who it was going to.

Runs
The moment it happens
Apps
Brex
AI
Not needed
Access
transfers read

Send this to your assistant

Create a ClickRuntime automation: when a Brex transfer fails, email me the amount, the counterparty and the failure reason if Brex gives one.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A company that pays contractors, vendors and payroll providers through Brex transfers depends on those payments landing on time. A transfer can fail because of a wrong account number, a bank rejection or a compliance hold, and the payee, who expected money on Friday, finds out before you do. The first sign is an angry email from a supplier, long after the failure was recorded in the Brex dashboard.

When Brex reports a transfer failure, the event reaches ClickRuntime straight away. The workflow fetches the full transfer record from Brex, so the alert carries the amount, the recipient and the details of the failure, and sends it to the person or channel you choose. It runs when the event arrives, so you can contact the payee before they have to chase you.

Finance managers and founders who handle payments themselves, with no treasury team watching, will benefit most.

What you get out of it

  • Vendors are told before they have to ask

    Reaching out first with a new payment date keeps a supplier relationship intact. A vendor who hears from you the same day is far more forgiving than one who has to chase an invoice that appeared paid.

  • Late-payment penalties are avoided

    Many contracts charge fees or interest when payment arrives past the due date. Knowing about a failed transfer on the day it happens leaves time to fix the details and resend before a penalty applies.

  • Payroll problems are caught immediately

    A failed transfer to a contractor or payroll provider is the sort of mistake employees notice at once. An instant alert gives finance the chance to fix it before anyone misses rent because of a typo in an account number.

  • Complete details speed up the repair

    Because the full transfer is fetched, the alert has the amount, recipient and reason without anyone opening Brex first. Fixing the cause starts with the information already in hand. Finance then spends its time on the repair rather than on locating the details.

  • A clear record of payment exceptions

    Each alert is a dated entry showing which payments failed and why. During a review or an audit, you can show exactly how problems were found and corrected rather than relying on recollection. That history also shows how quickly each problem was resolved.

How it works

What happens, step by step

  1. When a Brex transfer fails, Brex tells ClickRuntime straight away.

  2. ClickRuntime looks up the transfer to get the amount, who it was going to and the reason it failed.

  3. You get an email with those details so you can fix the payment.

Before it runs live

  • Connect Brex
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get an email the moment a transfer failsjust nowSucceeded
Email · Transfer failedBrex transfer failed: $8,200.00 To: Acme Supplies invoice 2291 · Reason: Account closed

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Brex steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
failed_transfer_alert.pyexample
from clickruntime import on_event, credentials, http, notify

@on_event
def handle(event):
    body = event.json or {}
    if body.get("event_type") != "TRANSFER_FAILED":
        return {"skipped": body.get("event_type")}
    t = http.get(f"https://platform.brexapis.com/v1/transfers/{body['transfer_id']}",
                 headers={"Authorization": f"Bearer {credentials.secret('BREX_TOKEN')}"}).json()
    amount = t["amount"]["amount"] / 100
    notify.email_me(f"Brex transfer failed: ${amount:,.2f}",
                    f"Amount: ${amount:,.2f} {t['amount']['currency']}\nTo: {t.get('description') or t['counterparty'].get('type')}\n"
                    f"Reason: {t.get('cancellation_reason') or 'not given'}")
    return {"transfer": t["id"]}

FAQ

Common questions

What can make a Brex transfer fail?
Typical causes include incorrect recipient bank details, a rejection from the receiving bank or insufficient funds in the source account. The alert shows the status and the failure information Brex provides, which usually points to what to correct before you retry.
Does the alert arrive in real time?
Yes, within the limits of Brex's own event delivery. The run starts when Brex sends the event, and there is no schedule or polling interval. The workflow then fetches the transfer details, which takes only a moment, before sending the alert.
Can it notify more than one person?
Yes. The alert can go to a channel, to several email addresses or both, for example finance and the person who requested the payment. Tell your AI assistant who should hear about failures and approve the updated recipients.
What permissions does it need?
transfers read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Get an email the moment a transfer fails” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.