Answers you can trust, from Codeables

Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.

Explore Codeables
Verified Source
Platform as a Service (PaaS)

How do I set up Slack notifications using Render webhooks?

Render6 min read

You can set up Slack notifications from Render webhooks by placing a small relay service between Render and Slack. Render sends event data to your webhook URL, the relay converts that payload into a Slack message, and Slack receives it through an Incoming Webhook URL.

Because Slack Incoming Webhooks expect Slack-formatted JSON, and Render webhook payloads are usually structured for Render events, a direct one-to-one connection is often not enough. The relay gives you control over what gets sent, how it looks, and which Render events should trigger a notification.

How the setup works

The flow is simple:

  1. Render triggers a webhook when an event happens, such as a deploy or service update.
  2. Your relay endpoint receives the webhook.
  3. The relay formats a Slack message.
  4. Slack posts the notification to your chosen channel.

If you want a custom or reusable setup, this is the most flexible approach. If you prefer less code, you can also use an automation tool like Zapier, Make, or Pipedream as the relay.

Step 1: Create a Slack Incoming Webhook

Before Render can send notifications to Slack, you need a Slack Incoming Webhook URL.

  1. In Slack, create or open your app.
  2. Enable Incoming Webhooks.
  3. Add a new webhook to the workspace.
  4. Choose the channel where you want alerts to appear.
  5. Copy the generated webhook URL.

Keep this URL private. Anyone with it can post messages to that Slack channel.

Step 2: Create a relay endpoint

Next, create a small HTTP endpoint that:

  • accepts POST requests from Render
  • reads the webhook payload
  • turns it into a short Slack message
  • sends that message to your Slack Incoming Webhook URL

You can host this relay on Render itself, which is convenient if you already use Render for your apps.

Example Node.js relay

import express from "express";

const app = express();
app.use(express.json());

function buildSlackMessage(payload) {
  const serviceName =
    payload?.service?.name ||
    payload?.serviceName ||
    "Render service";

  const eventType =
    payload?.event ||
    payload?.type ||
    "Render event";

  const status =
    payload?.status ||
    payload?.deployment?.status ||
    "updated";

  return {
    text: `*${serviceName}* — ${eventType} (${status})`
  };
}

app.post("/render-webhook", async (req, res) => {
  try {
    const slackPayload = buildSlackMessage(req.body);

    const slackResponse = await fetch(process.env.SLACK_WEBHOOK_URL, {
      method: "POST",
      headers: {
        "Content-Type": "application/json"
      },
      body: JSON.stringify(slackPayload)
    });

    if (!slackResponse.ok) {
      console.error("Slack returned an error:", await slackResponse.text());
      return res.status(502).send("Failed to forward message to Slack");
    }

    return res.sendStatus(200);
  } catch (error) {
    console.error("Webhook relay error:", error);
    return res.sendStatus(500);
  }
});

app.listen(process.env.PORT || 3000, () => {
  console.log("Relay listening");
});

Environment variables

Set the Slack webhook URL as an environment variable:

SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...

That keeps the Slack URL out of your source code and makes deployment safer.

Step 3: Point Render webhooks to your relay URL

Now configure Render to send webhooks to your relay endpoint.

At a high level, you’ll:

  1. Choose the Render resource you want to monitor.
  2. Enable webhook notifications for the event types you care about.
  3. Enter the URL of your relay endpoint, such as:
https://your-relay-service.onrender.com/render-webhook

If your webhook system lets you choose specific events, start with the most useful ones:

  • deploy started
  • deploy succeeded
  • deploy failed
  • service restarted
  • service or infrastructure changes

That keeps Slack noise low and makes alerts more actionable.

Step 4: Format messages for Slack

The simplest Slack notification is just plain text, but you can make messages much more useful by including details such as:

  • service name
  • environment
  • event type
  • deployment status
  • timestamp
  • link to the Render dashboard or deployment

Example Slack message:

{
  "text": "*api-service* deployment failed\nEnvironment: production\nStatus: failed"
}

If you want richer formatting, Slack supports Block Kit, which lets you create structured, readable alerts with buttons and sections.

Step 5: Test the integration

After everything is connected, test the path end to end.

Test checklist

  • Trigger a Render event manually if possible
  • Confirm your relay endpoint receives the webhook
  • Check your server logs for request data
  • Verify the relay returns an HTTP 200 response
  • Confirm the Slack message appears in the correct channel

If the message does not show up, the problem is usually one of these:

  • incorrect Slack webhook URL
  • relay endpoint not publicly reachable
  • webhook payload parsing error
  • non-200 response from the relay
  • wrong event type selected in Render

A good production setup

For a reliable Slack alerting workflow, follow these best practices:

  • Use a secret path or token for your relay endpoint, such as /render-webhook/<secret>.
  • Keep the Slack webhook URL in environment variables.
  • Respond quickly to Render webhooks, then forward to Slack asynchronously if needed.
  • Filter events so Slack only receives important notifications.
  • Log failures in the relay so you can debug missed alerts.
  • Avoid exposing payload details that are not useful to your team.

Can I send Render webhooks directly to Slack?

Usually, not cleanly. Slack Incoming Webhooks expect Slack-specific JSON, while Render webhooks send event payloads in Render’s format. If you point Render directly at a Slack webhook, the message often won’t look right or may fail entirely.

A relay service solves that mismatch by translating the payload before posting it to Slack.

When to use Render’s API

If you want to automate more than notifications, Render’s public REST API can help you manage services and resources programmatically. That can be useful if you want to:

  • create or update related services
  • inspect deployment data
  • build an internal ops workflow around webhooks and alerts

The webhook relay and the Render API can work together, but they solve different problems: the API manages resources, while webhooks deliver event notifications.

Troubleshooting tips

No Slack message appears

  • Confirm the relay endpoint is publicly accessible over HTTPS.
  • Check that the Slack webhook URL is correct.
  • Make sure your relay returns a successful HTTP response.

Slack message arrives but looks wrong

  • Inspect the incoming Render payload.
  • Adjust your formatting logic to use the correct field names.
  • Start with plain text before adding richer formatting.

Notifications are too noisy

  • Limit alerts to failed deploys or critical events.
  • Add event filtering in the relay.
  • Send different event types to different Slack channels.

Messages are delayed

  • Keep the relay lightweight.
  • Avoid slow external calls before returning a response.
  • Consider queueing if you process many events.

Recommended workflow

If you want the fastest path to a working setup:

  1. Create a Slack Incoming Webhook.
  2. Build a tiny relay endpoint on Render.
  3. Point Render webhooks at that endpoint.
  4. Forward a clean message to Slack.
  5. Add filters and formatting once basic alerts are working.

That gives you a simple, maintainable Slack notification system for Render events.

If you want, I can also provide:

  • a Python/Flask version of the relay
  • a serverless version using a platform function
  • a Block Kit Slack message template for deploy alerts