Skip to content

The moment it happens

Get an email when a Railway deploy fails or crashes

As soon as a deployment in your project fails or crashes, an email tells you which service and what happened.

Runs
The moment it happens
Apps
Railway
AI
Not needed
Access
webhook set up per project; workspace token for lookups

Send this to your assistant

Create a ClickRuntime automation: give me a webhook link for my Railway project and email me whenever a deployment there fails or crashes, with the service name and a link.

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 production service on Railway can stop for reasons unrelated to your code: an out-of-memory kill, a bad environment variable after a rotation, a failed build triggered by an automatic GitHub deploy at midnight. Customers see errors or a blank page while you are asleep or in a meeting, and the first signal is often an angry message instead of a notification.

When Railway sends a deployment event, ClickRuntime receives it immediately, keeps only the FAILED and CRASHED ones, and emails you with the service name, environment and status. Successful deploys and routine events are ignored, so every message that reaches you is one that needs attention.

It suits small teams without a full monitoring stack, and anyone running a customer-facing app who wants a direct line from Railway to their inbox.

What you get out of it

  • Outages are noticed in minutes

    The alert arrives when the event does, not when someone complains. Starting the investigation in minutes rather than hours is often the difference between a blip and an incident. You also keep your own credibility with customers.

  • Failed builds do not linger

    A push that fails to build leaves the previous version running, so everything seems fine. The alert reveals that your latest fix never went live, which would otherwise surprise you later.

  • Only real problems reach your inbox

    Filtering to FAILED and CRASHED means a deploy that succeeds is silent. Alerts you can trust get read, while a flood of success messages trains people to ignore the channel.

  • Service and environment are in the message

    Knowing whether it was production or staging, and which service, tells you how urgent it is. A staging failure can wait until morning, a production crash cannot. That saves a lookup in the middle of an incident.

  • No monitoring stack required

    A small team does not need to set up another tool to get basic crash alerts. Railway's own events already carry what you need, delivered straight to a place you will see.

How it works

What happens, step by step

  1. Each time a deployment in your Railway project changes status, Railway tells ClickRuntime straight away.

  2. It ignores everything except deployments that failed or crashed.

  3. You get an email naming the project, the service and its environment, and whether it failed or crashed.

Before it runs live

  • Connect Railway
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Get an email when a Railway deploy fails or crashesjust nowSucceeded
Email · Railway deploy crashedProject: Northwind shop Service: worker (production) Status: CRASHED

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
  • 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 Railway 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.
get_alerted_on_crashes_and_failed_deploys.pyexample
from clickruntime import on_event, notify

@on_event
def handle(event):
    body = event.json or {}
    status = (body.get("status") or "").upper()
    if body.get("type") != "DEPLOY" or status not in ("FAILED", "CRASHED"):
        return {"skipped": f"{body.get('type')} {status}"}
    project = body.get("project", {})
    service = body.get("service", {}).get("name", "unknown service")
    env = body.get("environment", {}).get("name", "")
    notify.email_me(f"Railway deploy {status.lower()}: {service}",
                    f"Project: {project.get('name')}\nService: {service} ({env})\nStatus: {status}\n"
                    f"https://railway.com/project/{project.get('id')}")
    return {"emailed": True, "service": service}

FAQ

Common questions

How do I connect Railway to send these events?
In your Railway project settings you add a webhook that points to the URL ClickRuntime provides. From that point, Railway posts deployment events to it. You can choose which event types it sends, and failures are filtered out afterward.
Does a crashed service that restarts automatically still alert me?
Yes. Railway reports a CRASHED status even if the platform then restarts the service. Repeated crashes produce repeated alerts, which is useful because a crash loop often means a bug, not a one-off glitch. You will see the loop as it happens.
Can the alert go to Slack or SMS instead of email?
Yes. Email is the default, but the same event can be sent to Slack, Telegram or any other channel you connect. Many teams use email for staging and a chat channel for production, so the right people see urgent ones.
What permissions does it need?
webhook set up per project; workspace token for lookups. 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 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 “Get an email when a Railway deploy fails or crashes” from your assistant

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