Skip to content

The moment it happens

Log failed store orders in Airtable and alert Slack

Every failed order from your store is recorded in Airtable and #ops hears about it straight away, with a louder alert when failures pile up.

Runs
The moment it happens
Apps
Airtable, Slack
AI
Optional
Access
Airtable read+write; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: when my WooCommerce store sends a failed-order webhook, log it in Airtable and alert #ops.

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

An online shop sees the odd failed order every week: a card declined, a payment gateway timing out. Usually it is one customer. Sometimes it is the checkout itself that is broken, and every order for the last two hours has failed without anyone noticing.

This automation records every failed order in one Airtable table and tells the team in Slack as it happens, so a single failure can be followed up and a run of them is spotted while it is still a small problem.

What you get out of it

  • Lost sales get followed up

    Each failed order has a customer and a basket attached. Having them in one table means someone can reach out and recover the sale.

  • Checkout problems surface fast

    Several failures in a short window trigger a stronger alert, which is often the first sign of a broken payment setup.

  • A clean record for your payment provider

    When you raise a ticket with the gateway, every failed order is ready to share with its time and payment method.

  • The team sees it where they work

    Nobody has to watch the store admin. The alert arrives in #ops with the order number and amount.

How it works

What happens, step by step

  1. Your store sends each failed order to ClickRuntime as it happens.

  2. ClickRuntime adds the order to your Airtable table with its number, customer, total and payment method.

  3. It counts how many orders have failed in the last hour.

  4. It posts the order in #ops, and adds a warning when failures are piling up.

Before it runs live

  • Connect Airtable
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Log failed store orders in Airtable and alert Slackjust nowSucceeded
Slack · #ops❌ Order #4821 failed (GBP 64.00, Card) ⚠️ 6 failed orders in the last hour, check the checkout.

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
  • Change what the AI looks for, or how it writes the result
  • Add another app, for example also send it to Google Sheets
  • Combine it with other Airtable and Slack 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.
store_order_events_logged_in_airtable_with_slack_alerts.pyexample
import time
from clickruntime import on_event, credentials, http, notify, state

TABLE = "https://api.airtable.com/v0/your-base-id/Failed%20orders"

@on_event
def handle(event):
    o = event.json or {}
    if o.get("status") != "failed":
        return {"skipped": True}
    h = {"Authorization": f"Bearer {credentials.secret('AIRTABLE_API_KEY')}"}
    http.post(TABLE, headers=h, json={"fields": {"Order": str(o["id"]), "Total": float(o.get("total") or 0),
              "Email": o.get("billing", {}).get("email"), "Method": o.get("payment_method_title"),
              "Time": o.get("date_modified_gmt")}})
    now = time.time()
    recent = [t for t in (state.get("recent") or []) if now - t < 3600] + [now]
    state.set("recent", recent)
    msg = f"❌ Order #{o['id']} failed ({o.get('currency', '')} {o.get('total')}, {o.get('payment_method_title')})"
    if len(recent) >= 5:
        msg += f"\n⚠️ {len(recent)} failed orders in the last hour, check the checkout."
    notify.slack(msg, channel="#ops")
    return {"logged": o["id"]}

FAQ

Common questions

What counts as a failed order?
Any order your store reports with the status failed, usually after a declined or abandoned payment. Cancelled orders can be logged too if you want them.
When does it send the stronger alert?
By default when five or more orders fail within an hour. You can set the number and the window to match your order volume.
Which order details are saved?
Order number, time, customer email, total and payment method. Extra fields your store sends, such as the items in the basket, can be added.
What permissions does it need?
Airtable read+write; Slack chat:write. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in 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 “Log failed store orders in Airtable and alert Slack” from your assistant

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