On a schedule
Get an email when someone mentions 'prod down'
New posts that mention your watch words reach you within minutes, without repeats.
- Runs
- On a schedule
- Apps
- Mattermost
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: every 5 minutes, search Mattermost for 'prod down' or 'urgent' and email me any new posts with the channel and a link.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
When production goes down, the first person to know is rarely the on-call engineer. It is whoever happens to be reading Mattermost, who types "prod down" in a channel and assumes someone else saw it. Messages like that get buried under lunch plans within minutes, and a manager can lose twenty minutes of an outage because no pager was involved and no one was assigned to watch the chat.
On a regular schedule, ClickRuntime searches Mattermost for posts containing your keyword, such as "prod down", skips any it has already reported, and emails you the new ones with the channel and author. The check runs by polling, so it does not need a special bot or slash command in the channel.
It helps small teams without a full paging setup, and it is equally handy for monitoring brand names, customer names or competitor mentions in shared channels.
What you get out of it
Outages are noticed minutes sooner
Every minute of downtime costs revenue or trust. An email that quotes the exact message pulls the right person into the thread before the discussion has gone in circles. Seeing the exact words in an email also saves the first minutes of asking what happened.
No one needs to watch the chat all day
Instead of relying on a person to keep a channel open, the search does that job. Engineers can focus on their work and still be reached when the phrase appears.
Each mention is reported once
Tracking which posts were already seen means a long thread does not generate a new email every run. Your inbox shows only what is actually new. This also stops the same outage chatter from producing a dozen near-identical emails.
Works beyond emergencies
The keyword can be a customer name, a product code or a competitor. A sales lead gets an email the moment a prospect's name appears in an internal channel, so important context is not missed.
Gaps in your alerting are exposed
If people keep using chat to report problems, the alerts show how often it happens. That is a concrete argument for setting up proper monitoring and an on-call rota. You can then bring real numbers to that planning conversation.
Coverage while the on-call person is away
If someone is in a meeting or on a flight, the email still reaches them or a backup. A phrase typed into a busy channel no longer depends on luck to be noticed.
How it works
What happens, step by step
Every 5 minutes ClickRuntime searches your Mattermost team for posts that mention your watch words, such as "prod down" or "urgent".
It skips any post it has already sent you.
For each new match it looks up the channel name.
You get one email listing each matching post with its channel and a link to open it.
Before it runs live
- Connect Mattermost
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
- 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 Mattermost steps into one automation
Under the hood
The code that runs this automation
from clickruntime import on_trigger, credentials, http, state, notify, report_fetched
BASE = "https://chat.acme.com"
TEAM_ID = "teamid123"
@on_trigger
def run(event):
h = {"Authorization": f"Bearer {credentials.secret('MATTERMOST_TOKEN')}"}
seen = set(state.get("seen") or [])
hits = {}
for term in ('"prod down"', "urgent"):
r = http.post(f"{BASE}/api/v4/teams/{TEAM_ID}/posts/search", headers=h,
json={"terms": term, "is_or_search": False, "per_page": 50}).json()
hits.update({pid: p for pid, p in r["posts"].items() if pid not in seen})
report_fetched(len(hits))
if not hits:
return {"summary": "Nothing new"}
lines = []
for pid, p in hits.items():
ch = http.get(f"{BASE}/api/v4/channels/{p['channel_id']}", headers=h).json()["display_name"]
lines.append(f"[{ch}] {p['message'][:200]}\n{BASE}/_redirect/pl/{pid}")
notify.email_me(f"{len(hits)} Mattermost post(s) matched", "\n\n".join(lines))
state.set("seen", list(seen | set(hits))[-1000:])
return {"matched": len(hits)}FAQ
Common questions
How often does it check for the keyword?
Can it watch several keywords or phrases?
Does it search private channels and direct messages?
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 new orders and leads to a Mattermost channel
Events from your shop, forms or CRM appear as tidy posts in the channel your team watches.
See how it worksAdd a slash command that runs your automation
Typing a command in Mattermost does the job and posts the result in the channel for everyone.
See how it worksCollect daily standups by Mattermost DM
Everyone gets the standup questions privately each morning, and their answers are posted together in one place.
See how it worksKeep exploring
Set up “Get an email when someone mentions 'prod down'” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.