Skip to content

The moment it happens

Send your app's error alerts to Slack and Discord

Whenever your app reports an error to your trigger link, the alert appears in #alerts in Slack and in your Discord ops channel, without repeats.

Runs
The moment it happens
Apps
Discord, Slack
AI
Optional
Access
Slack chat:write; Discord Send Messages

Send this to your assistant

Create a ClickRuntime automation: give me a trigger link. Whenever my app posts an error to it, send the message to #alerts in Slack and our Discord ops channel.

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 small development team splits its chat: the company uses Slack, while the on-call developers and a few contractors live in Discord. When the nightly import job fails or the API starts throwing errors, the alert goes to only one of them. Half the people who could fix it never see it, and a failure that started at 2am is found by a customer at 9.

With this automation the app sends each error to one link, and ClickRuntime posts it to both Slack and Discord, skipping repeats of the same error, so everyone who can help sees it straight away.

What you get out of it

  • Everyone who can help sees the alert

    The error lands in both places the team actually reads. Whoever is awake and closest can pick it up. Response no longer depends on which app someone had open.

  • One link for every source

    Cron jobs, background workers and servers all send errors to the same link. Adding a new source is one line in its config. The fan-out to both chats is handled in one place.

  • Repeated errors do not flood the channels

    The same error firing every minute is posted once, not hundreds of times. Channels stay readable during an incident. People do not start muting the alerts.

  • A plain-language explanation if you want one

    An optional short explanation of what the error probably means can be added to each alert. That helps contractors or newer team members triage. Experienced developers can turn it off.

  • No changes to your monitoring tools

    Anything that can send an HTTP request on failure can use it. You keep your existing scripts and services. Only the alert delivery is shared.

How it works

What happens, step by step

  1. When your app or job hits an error, it sends the details to your ClickRuntime trigger link.

  2. It checks whether the same error was already posted in the last hour and skips it if so.

  3. If you turned it on, AI adds a one-line explanation of what the error likely means.

  4. The alert is posted to #alerts in Slack and to your Discord ops channel.

Before it runs live

  • Connect Discord
  • 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
Send your app's error alerts to Slack and Discordjust nowSucceeded
Slack · #alertsError in nightly-import: connection refused to orders database. The database server is likely down or not accepting connections.

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 Discord 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.
send_error_alerts_to_both_slack_and_discord.pyexample
import hashlib, time
from slack_sdk import WebClient
from clickruntime import on_event, credentials, http, state, ai

DISCORD_CHANNEL_ID = "your-discord-ops-channel-id"
EXPLAIN = True

@on_event
def handle(event):
    data = event.json or {"message": event.body}
    service, message = data.get("service", "app"), str(data.get("message", ""))[:1500]
    key = hashlib.sha1(f"{service}|{message}".encode()).hexdigest()
    recent = {k: t for k, t in (state.get("recent") or {}).items() if time.time() - t < 3600}
    if key in recent:
        return {"skipped": "repeat"}
    text = f"Error in {service}: {message}"
    if EXPLAIN:
        try:
            text += "\n" + ai.generate(f"In one sentence, what does this error likely mean?\n{message}", max_output_tokens=80).text.strip()
        except ai.AIError:
            pass
    WebClient(token=credentials.connection("slack", "work")).chat_postMessage(channel="#alerts", text=text)
    http.post(f"https://discord.com/api/v10/channels/{DISCORD_CHANNEL_ID}/messages",
              headers={"Authorization": f"Bot {credentials.secret('DISCORD_BOT_TOKEN')}"}, json={"content": text[:2000]})
    recent[key] = time.time()
    state.set("recent", recent)
    return {"posted": service}

FAQ

Common questions

What should my app send?
A short JSON message with at least a description of the error, and ideally the service name and a severity. Plain text bodies work too and are posted as they arrive.
How are repeats detected?
Alerts with the same service and message within an hour count as the same error and are posted once. A new error, or the same one after the hour has passed, is posted again.
Can urgent errors go to a different channel?
Yes. Alerts marked as critical can be sent to a separate channel or mention the on-call person, while warnings go to the normal alerts channel.
What permissions does it need?
Slack chat:write; Discord Send Messages. 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 “Send your app's error alerts to Slack and Discord” from your assistant

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