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.
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
When your app or job hits an error, it sends the details to your ClickRuntime trigger link.
It checks whether the same error was already posted in the last hour and skips it if so.
If you turned it on, AI adds a one-line explanation of what the error likely means.
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
Build your own
Need it to work differently?
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
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?
How are repeats detected?
Can urgent errors go to a different channel?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Post subscription changes to Slack and Discord
When a subscription is created or cancelled, the details are posted to both your Slack and your Discord.
See how it worksShare approved YouTube video summaries in Discord
New videos from channels you follow are summarised, you approve them in Slack, and approved summaries are posted to your Discord.
See how it worksPost a daily digest of top Reddit posts to Slack and Discord
Each morning the best new posts on your topics are summarised into one short digest and posted to both Slack and Discord.
See how it worksKeep exploring
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.