In Flashduty On-call
- In the Flashduty console, go to Integration Center → Change Events
- Select Railway and enter an integration name
- To assign changes to specific channels, add rules under the integration’s Routes that match labels such as
project,service, orenvironment - Click Save and copy the generated Push URL
Configure Railway
1
Open the project's Webhooks settings
- Open the target project in Railway and click Settings in the project’s top navigation
- Choose Webhooks in the left sidebar, then click Create Webhook
2
Enter the push URL and events
- Paste the full Flashduty push URL into the URL field
- Open the Event Types list and select the Deployment states: Queued, Waiting, Needs Approval, Building, Deploying, Deployed, Redeployed, Failed and Crashed (Removed, Restarted, Oom Killed, Slept and Resumed are accepted but record nothing)
- Click Create Webhook
integration_key in the push URL, so no custom header is needed.3
Send a test
Click Test Webhook before creating the webhook. Railway sends a sample Volume Alert delivery (
VolumeAlert.triggered). Flashduty returns success and records no change. Then trigger a deployment in the project and check the Flashduty change list.What one change is
Status mapping
Flashduty reads the delivery’s
type (Deployment.<state>) to decide the status and does not read details.status. Railway’s own webhook guide is inconsistent here: its sample for Deployment.failed carries details.status set to SUCCESS. Deliveries sent by Railway itself pair Deployment.failed with FAILED, but since the guide shows the two fields disagreeing, type is the only one used.
These deliveries return success but record no change:
Deployment.removed,Deployment.removing: an older deployment replaced by a newer one or removed by hand, not progress of this deployment. Railway sends it with the ID of the older deployment right after a new deployment becomes activeDeployment.restarted,Deployment.oomKilled,Deployment.slept,Deployment.resumed: runtime events- Volume usage and CPU/RAM monitor alerts (a
typethat does not start withDeployment.)
type that starts with Deployment. and is in neither list above returns InvalidParameter (see the FAQ).
Change content
The title and description come from the first delivery of a change and are not updated afterwards.
Labels can be used for routing and for filtering the change list:
ref, sha, and actor are not on every delivery, so routing on them can send later states of one deployment to another channel. Route on workspace, project, service, or environment.
FAQ
Does a Railway retry create a duplicate?
Does a Railway retry create a duplicate?
No. Railway retries up to 3 times after a response that is not 2xx or 3xx, or after a timeout, with the same content, and Flashduty de-duplicates on the delivery’s
timestamp. Railway does not guarantee delivery order; Flashduty orders by timestamp, so an earlier state arriving late does not overwrite a finished change.Why does an aborted deployment stay Processing?
Why does an aborted deployment stay Processing?
Aborting a deployment that is still building marks it Removed in Railway. Flashduty does not record Removed deliveries, so such a change stays at the last state it received.
Why did a successful deployment turn Failed?
Why did a successful deployment turn Failed?
If the service crashes while running after a successful deployment, Railway sends
Deployment.crashed and Flashduty updates the same change to Failed.Railway reports failed deliveries or stops sending?
Railway reports failed deliveries or stops sending?
After 100 failures within 6 hours, Railway pauses the URL for 24 hours. Check that the push URL is complete and the integration has not been deleted.
The delivery returns an InvalidParameter error?
The delivery returns an InvalidParameter error?
resource.deployment.id is missing: the payload is incomplete; make sure it comes from a native Railway webhookunknown type: a deployment state we do not map yet; contact us to add itinvalid timestamp: the time field in the payload is malformed