Skip to content

Hourly

Find out when a key Amplitude event stops firing

If Purchase events drop to zero or far below normal, you hear about it within the hour.

Runs
Hourly
Apps
Amplitude
AI
Not needed
Access
API key + secret

Send this to your assistant

Create a ClickRuntime automation: every hour, count Purchase events in Amplitude and message me in Slack if the count is zero or less than half the usual for that hour.

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

The events that Amplitude counts are only useful as long as they keep arriving. A key event such as Signup Completed or Checkout Started can go quiet because a developer renamed it, an SDK update dropped the tracking call, a consent banner now blocks analytics, or a release broke the button that fires it. Dashboards then show a flat line, funnel numbers shrink, and product decisions over the next weeks are made on data that is wrong. Nobody gets a notice from Amplitude when an event disappears.

Every hour, the automation queries the counts for the events you list, compares the latest hour with what is normal for that time, and posts to Slack if an event drops far below its usual level or stops completely.

Product analysts, engineers who ship tracking changes and growth teams who depend on funnels can use it as a tripwire.

What you get out of it

  • Broken tracking is found in hours

    An hourly comparison finds a missing event the same day it breaks, so the gap in your data is hours long, not weeks, and can often be backfilled or explained.

  • Releases are checked for side effects

    After each deployment, a drop in a key event is an early sign that a change broke something. Teams can roll back or fix before many users hit the issue.

  • Decisions rest on complete data

    A funnel with a missing step looks like a sudden conversion crash. Catching the cause stops people from reacting to a drop that is actually a tracking bug. Weeks of wrong numbers lead to wrong decisions.

  • Consent and privacy changes are noticed

    A new cookie banner or SDK setting can reduce events overnight. The alert shows the effect quickly, so you can judge whether it is expected. Then the team can decide whether the change is acceptable.

  • Engineers hear about it first

    Posting in Slack puts the alert where developers work. They can answer in the thread, which makes the fix visible to the people waiting on the data. Fixes are quicker when everyone sees the same message.

How it works

What happens, step by step

  1. Every hour, ClickRuntime counts the Purchase events Amplitude received in the last hour.

  2. It compares that with the usual count for that hour.

  3. If the count is zero or far below normal, a message goes to your Slack channel with the hour, the count and what is usual.

Before it runs live

  • Connect Amplitude

What you get

RunsHourly
Find out when a key Amplitude event stops firingtoday, 9:00Succeeded
Slack · #productPurchase events low: 7 in the hour from 13:00 UTC (usual 31).

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

  • Run it at a different time, more or less often, or only on weekdays
  • 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 Amplitude 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.
event_volume_drop_alert.pyexample
import json
from datetime import date, datetime, timedelta, timezone
from clickruntime import on_trigger, credentials, http, notify

def amp(path, **params):
    auth = (credentials.secret("AMPLITUDE_API_KEY"), credentials.secret("AMPLITUDE_SECRET_KEY"))
    resp = http.get(f"https://amplitude.com/api/2/{path}", auth=auth, params=params)
    resp.raise_for_status()
    return resp.json()["data"]

@on_trigger
def run(event):
    now = datetime.now(timezone.utc)
    start = (now - timedelta(days=7)).strftime("%Y%m%dT%H")
    data = amp("events/segmentation", e=json.dumps({"event_type": "Purchase"}),
               start=start, end=now.strftime("%Y%m%dT%H"), i=-3600000, m="totals")
    hours = dict(zip(data["xValues"], data["series"][0]))
    last_hour = (now - timedelta(hours=1)).strftime("%Y-%m-%dT%H:00:00")
    count = hours.get(last_hour, 0)
    usual = [v for k, v in hours.items() if k[11:13] == last_hour[11:13] and k != last_hour]
    avg = sum(usual) / len(usual) if usual else 0
    if count == 0 or count < avg / 2:
        notify.slack(f"Purchase events low: {count} in the hour from {last_hour[11:16]} UTC (usual {avg:.0f}).",
                     channel="#product")
    return {"count": count, "usual": round(avg, 1)}

FAQ

Common questions

How does it decide what is a drop?
It compares the latest hour with the same hour on previous days, and alerts when the count is below a share you set, such as 50%. Events with a strong daily rhythm are judged against their own pattern.
Will a quiet night cause a false alarm?
It compares to the same time of day, so night-time lows are expected. For low-volume events, you can lengthen the window to a few hours so that a normal gap is not mistaken for a failure.
Can I watch several events at once?
Yes. List the events, and each can have its own threshold and window. The Slack message names the event that dropped, the count and the usual level. That keeps related checks together in a single channel.
What permissions does it need?
API key + secret. 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 each time it runs (hourly). Checks that find nothing to do and stop right away aren't counted.
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 “Find out when a key Amplitude event stops firing” from your assistant

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