Back to blog

How to Set Up Comment Webhooks for Slack So Your Team Sees New Comments First

Learn how to set up comment webhooks for Slack so every new comment lands in the right channel, with routing rules, payload fields, and a fallback for when the webhook fails. How to Set Up Comment Webhooks for Slack So Your Team Sees New Comments First is an EchoThread guide for site owners evaluating privacy-first comments, moderation, migration, performance, and reader engagement. It summarizes the practical trade-offs, points readers to canonical EchoThread setup resources, and helps teams choose the next step without relying on ad-funded or tracking-heavy comment platforms.

To learn how to set up comment webhooks for Slack, create an incoming webhook in your Slack workspace, copy the generated webhook URL, and paste it into your commenting platform's webhook configuration settings. Once you select the trigger events and dispatch a test payload, new comments will post directly into your designated Slack channel in seconds.

When you run a high-volume publication, product documentation portal, or media site, comment moderation quickly becomes recurring daily labor. Without automated notifications, comment triage turns into an inefficient cycle where moderators must constantly refresh an administrative dashboard. Setting up comment notification webhooks bridges this operational gap. Instead of discovering an abusive reply or an urgent reader correction three hours after publication, your team receives real-time comment alerts for teams directly in the workspace they already monitor throughout the day.

The 15-Minute Version: Webhook to Slack Channel

If your goal is simply to get incoming comments into a single Slack channel immediately, the direct integration process can be completed in roughly fifteen minutes. Before starting, confirm you have three requirements in place:

  • Administrative access to your commenting platform’s site dashboard.
  • Workspace permissions in Slack to create an app or add an Incoming Webhook.
  • A dedicated, existing Slack channel (such as #comments-feed or #community-alerts) configured to receive automated messages.

The operational payoff of this quick setup is immediate: the first person awake or on shift sees incoming reader engagement, rather than leaving triage to whoever remembers to log into the moderation portal. To complete the baseline setup, follow these steps:

  1. Navigate to the Slack App Directory or the Slack API management console, create a new Slack App in your workspace, and enable the Incoming Webhooks feature.
  2. Click Add New Webhook to Workspace, choose your designated comment channel from the drop-down list, and authorize the connection.
  3. Copy the resulting Webhook URL (formatted as https://hooks.slack.com/services/T.../B.../...).
  4. Log into your commenting software, locate your site settings, navigate to the Webhooks section, and paste the URL into your webhook endpoint field.
  5. Select your active event triggers (such as comment.created and comment.held), save the settings, and submit a test comment on a staging or live post.

During a first integration attempt, teams typically run into two common points of failure. The first is posting to a private Slack channel without inviting the Slack App or webhook bot to that channel; if permissions are mismatched, Slack returns a channel_not_found error. The second is pasting the Slack webhook URL into the wrong input field—such as confusing an event webhook URL (which broadcasts rich JSON data) with a simple user-facing notification callback URL.

Webhooks represent an operational workflow control rather than a basic styling widget. According to EchoThread's pricing, Starter is $5 a month or $50 a year. Every new EchoThread account gets Starter's features — per-site analytics, and webhooks with API tokens — free for its first 14 days, with no card and nothing to cancel. The trial does not remove the "Powered by EchoThread" footer; that stays until the owner upgrades to a paid plan. When the trial ends the account returns to the permanent free Hobby plan with nothing deleted; the trial lends features only, so the site count and page-view allowance stay those of the plan. Hobby itself is not a trial. A few days before the trial ends EchoThread sends one email saying so — what switches off, that nothing is deleted or charged, and a link to keep Starter; it is one email per account, ever, and none is sent if the account has already upgraded.

What a Comment Webhook Actually Sends

A webhook is an automated HTTP POST request dispatched from your commenting platform to a destination server whenever a specific event occurs. You can review the exact specification for standard HTTP requests on the MDN Web Docs POST reference. Understanding the structure of this JSON payload is critical. The raw fields determine how you can filter alerts, how your team can route messages, and what data moderators can evaluate before deciding whether to open their administrative queue.

A standard comment webhook payload generally contains metadata about the comment, the author, the parent post, and the moderation status:

{
  "event": "comment.created",
  "timestamp": 1727611200,
  "site_id": "site_987abc",
  "data": {
    "comment_id": "cmt_458921",
    "thread_id": "thr_00129",
    "post_url": "https://example.com/guides/system-architecture",
    "post_title": "Understanding Distributed Consensus",
    "author": {
      "display_name": "Jordan Vance",
      "auth_type": "oauth_github",
      "is_guest": false,
      "trust_status": "standard"
    },
    "body": "Does this consensus approach hold if network partition exceeds 30 seconds?",
    "status": "approved",
    "moderation": {
      "held_for_review": false,
      "rule_matched": null,
      "spam_score": 0.08
    }
  }
}

Analyzing these payload fields reveals distinct operational advantages:

  • event: Identifies the lifecycle state, such as comment.created, comment.flagged, or comment.held.
  • author.auth_type & author.is_guest: Informs the moderation team whether the writer authenticated through an identity provider (Google, GitHub, X, Facebook, or a magic link) or submitted as an unauthenticated guest.
  • author.trust_status: Indicates whether this commenter has been manually marked as trusted or banned on this specific site.
  • post_url & post_title: Allows moderators to instantly identify the editorial context of the discussion without running database lookups.
  • moderation.rule_matched: Labels precisely why a comment was held. If an owner-authored restricted-words rule flagged the entry, the field can expose the matching condition so your team does not have to guess.

Pay attention to the architectural difference between a one-way notification webhook and an event webhook. A basic notification webhook is often fire-and-forget, delivering a pre-rendered string to a chat channel. An event webhook, by contrast, is an HTTP transaction that expects an explicit 2xx (typically 200 OK or 202 Accepted) response from the receiver. If your receiving server processes data too slowly or hangs, the commenting service may consider the delivery failed, triggering retries that flood your Slack channel with duplicate alerts.

EchoThread's webhook payloads are configured per site and authenticated with an API token, allowing your receiving infrastructure to cryptographically verify that every incoming HTTP post genuinely originated from the service. When planning out your internal team boundaries, review our guide on building an efficient comment moderation workflow for editorial teams to match incoming events to real people on your masthead.

Routing Rules: Which Comment Goes to Which Channel

Sending every single site interaction into one primary Slack channel works when you receive five comments a week. Once your publication or media platform scales to dozens or hundreds of daily comments, unrouted alerts create visual noise that editors quickly learn to mute. Developing an organized moderation workflow requires routing specific comment types to designated operational channels.

A high-performing editorial team separates fire alarms from regular conversational flow. For instance, held comments requiring manual review demand immediate human judgment, whereas approved comments on evergreen product documentation can sit quietly in an author's digest feed. Consider the following structured routing matrix designed for a multi-author blog, niche news portal, or documentation site:

Channel Trigger Event / Payload Condition Channel Owner / Primary Action
#comments-triage status: held (Spam filter or rule match) On-duty moderator: approve or reject in dashboard.
#comments-new-users author.is_guest: true OR first-time commenter Community assistant: verify intent and welcome reader.
#comments-legal moderation.rule_matched: [restricted_word] Senior editor: inspect potentially defamatory or hostile text.
#comments-feed status: approved (Trusted or standard author) Passive monitoring: writers tracking their own articles.

To implement this routing matrix without writing brittle string-matching scripts inside Slack, route based on structured payload data rather than regex guessing inside your chat tool. When a payload arrives at an intermediary server or serverless endpoint, your code can evaluate fields like data.status or data.moderation.rule_matched and select the corresponding Slack Incoming Webhook URL.

EchoThread provides spam and moderation tooling in two layers: AI-assisted spam scoring through its Siftfy integration, and deterministic rules the site owner writes themselves — a restricted-words list, per-site commenter bans and trust, and auto-closing old threads. The owner's restricted-words rule runs before the classifier and the queue shows which of the owner's own entries fired. It is not a built-in first-party AI moderation engine, and the owner-authored controls are rules, not AI. Because these decisions are explicitly reported in the payload, your routing script can reliably separate suspected automated spam from custom rule hits that warrant immediate editorial review.

Formatting Payloads with Slack Block Kit and Serverless Handlers

While Slack can render plain text payloads directly from an incoming webhook, raw JSON strings or bare text lines make reading long comments difficult. Moderators working on mobile devices or skimming between editorial tasks need visual hierarchy: author credentials, article context, comment excerpt, and direct links to approve or delete.

You can create structured visual cards using Slack's Block Kit framework, as outlined in the official Slack Block Kit documentation. Instead of piping your commenting platform's raw event directly into Slack, insert a lightweight serverless handler (such as an AWS Lambda function, a Cloudflare Worker, or a small Node.js service) between your commenting software and your Slack webhook URL.

The handler executes three basic tasks:

  1. Validates the incoming HTTP request header using your commenting system's shared secret or bearer token.
  2. Parses the event data and determines the appropriate Slack channel destination based on moderation flags.
  3. Constructs a Block Kit JSON payload and posts it to Slack's Incoming Webhook URL.

Here is an example Node.js script that converts an incoming comment payload into an actionable Slack Block Kit message:

exports.handler = async (event) => {
  const payload = JSON.parse(event.body);
  const comment = payload.data;

  // Determine alert badge styling based on moderation status
  const isHeld = comment.moderation.held_for_review;
  const statusHeader = isHeld ? "⚠️ *Action Required: Comment Held*" : "💬 *New Approved Comment*";

  const slackMessage = {
    blocks: [
      {
        type: "section",
        text: {
          type: "mrkdwn",
          text: `${statusHeader}\n*Article:* <${comment.post_url}|${comment.post_title}>`
        }
      },
      {
        type: "section",
        fields: [
          {
            type: "mrkdwn",
            text: `*Author:*\n${comment.author.display_name} (${comment.author.is_guest ? "Guest" : "Verified"})`
          },
          {
            type: "mrkdwn",
            text: `*Spam Score:*\n${comment.moderation.spam_score}`
          }
        ]
      },
      {
        type: "section",
        text: {
          type: "mrkdwn",
          text: `> ${comment.body.replace(/\n/g, "\n> ")}`
        }
      },
      {
        type: "actions",
        elements: [
          {
            type: "button",
            text: {
              type: "plain_text",
              text: "Open Moderation Queue"
            },
            url: "https://echothread.io",
            style: isHeld ? "danger" : "primary"
          }
        ]
      }
    ]
  };

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

  return { statusCode: 200, body: "Dispatched to Slack" };
};

This layout gives an on-duty editor instant context without forcing them to switch browser tabs simply to read the submission. If the comment is clean, they can let it stand. If it contains abusive harassment, a single tap takes them straight to the moderation dashboard.

Incident Playbook: When a Comment Thread Turns Hostile

Every online community eventually encounters an adversarial brigade: a controversial news item catches traction on an external forum, or a coordinated spam wave targets an unmonitored thread overnight. When notifications start pinging Slack every two seconds, your moderation team needs an operational runbook rather than improvised reactions.

Here is an operational checklist to follow when Slack alerts indicate an active thread collision:

1. Identify the Entry Vector

Check the Slack card metadata. Are the comments originating from anonymous guests, registered burner accounts, or authentic profiles? If the attack is fueled by guest submissions, temporarily disable guest commenting in your site dashboard settings. This immediately stops low-effort drive-by attacks without disrupting regular readers who sign in with Google, GitHub, X, Facebook, or magic links.

2. Deploy Deterministic Restricted Words

If the harassment campaign uses specific slurs, targeted personal names, or campaign hashtags, update your keyword filters immediately. EchoThread lets a site owner keep a restricted-words list of up to 2,000 entries, matched case-insensitively against the comment body and the author's display name, where "*" matches a run of non-space characters. The owner chooses once for the whole list whether a match holds the comment for review or rejects it; a display-name match always holds rather than rejects. As detailed in the EchoThread documentation, matching runs before the spam classifier, so a comment the rule decides never reaches it, and the moderation queue labels the decision as the owner's own rule and shows the text that matched. Only owners can edit the list, it is included in the site export, and it is free on every plan including the free Hobby plan.

3. Apply Site-Level Commenter Bans

When bad-faith comments stem from specific accounts, use account-level moderation actions. EchoThread owners and moderators can ban or trust a commenter on a per-site basis, as detailed in the EchoThread documentation. A ban stops that person posting to that site only — never platform-wide — and can optionally, as an opt-in that is never the default, reject that person's still-visible comments from the last 30 days; those comments are rejected rather than deleted, so the action is reversible. Trust auto-approves that person's comments on that site, bypassing pre-moderation and a restricted-word hold, but never a restricted-word reject. Seat holders cannot be banned. This is free on every plan, and it is distinct from the per-reader block, which hides someone from one reader and tells nobody — never describe the two as the same feature.

4. Close Escalated Discussions to New Comments

If an individual discussion thread has deteriorated completely and editorial staff cannot monitor it in real time, close the thread to new replies. EchoThread can close a thread to new comments 30, 60, 90, 180, or 365 days after that thread was created, or leave threads open indefinitely. Existing comments stay visible and readable, and the widget renders a closed thread read-only with a plain explanation shown to signed-out readers as well as signed-in ones. The state is derived at request time rather than written onto threads, so changing or clearing the setting reopens them, and a thread an owner manually re-opens stays exempt from the schedule. It is free on every plan.

Executing these four steps halts thread degradation systematically. Instead of fighting individual fires in Slack, your team uses automated alerts to spot the spike early, applies deterministic rules to stop the pattern, and preserves editorial bandwidth.

Maintaining Security and Payload Integrity

Whenever you open an endpoint to receive incoming webhooks, securing that transport path against spoofing and replay attacks is essential. An unauthenticated webhook receiver could easily be flooded with forged JSON payloads by an outside actor, causing false alerts to appear in your team's Slack channels or triggering automated moderation responses based on fabricated data.

To keep your alerting pipeline secure, follow standard web security hygiene:

  • Verify Bearer Tokens and Signatures: Ensure your middleware confirms the authorization header on every single request. Discard any incoming HTTP packet that does not present your valid site API token.
  • Enforce HTTPS Exclusively: Never dispatch or receive webhook events over unencrypted HTTP endpoints. As emphasized in the OWASP Transport Layer Protection Cheat Sheet, Transport Layer Security (TLS) protects authentication tokens and reader metadata in transit against eavesdropping and packet inspection.
  • Rate Limit Receiver Endpoints: Configure your serverless function or API gateway to throttle bursts that exceed normal site activity. Even if your comment system is healthy, an attacker attempting to probe your endpoint should be throttled before consuming your execution limits.
  • Rotate Slack Webhook URLs: Treat your Slack Incoming Webhook URL like a password. If a webhook URL is accidentally committed to a public Git repository or logged in client-side code, revoke it immediately within the Slack App settings console.

By enforcing these standard verification practices, your moderation team can rely on Slack alerts as an authoritative, tamper-proof record of actual community interactions.

Frequently Asked Questions

Can comment alerts be sent to different Slack channels for different websites?

Yes. If you manage multiple blogs, documentation hubs, or digital publications, you can configure unique webhook endpoints for each site in your dashboard. Each commenting site can dispatch payloads to a distinct Slack Incoming Webhook URL, keeping your publication channels cleanly separated without cross-site noise.

How do comment webhooks handle spam and filtered comments?

Incoming comment webhooks dispatch data alongside the comment's moderation status. If an entry is flagged by automated spam screening or an owner-authored restricted-words rule, the webhook payload explicitly indicates that the comment has been held for review. This allows your team to route held items to a private triage channel while sending clean, approved comments to an editorial feed.

What happens if a Slack webhook endpoint goes down or times out?

Standard webhook architectures expect an immediate 2xx HTTP status code from your endpoint. If your destination server is down, unreachable, or returns a 5xx error code, the dispatching commenting platform typically attempts retries with exponential backoff before marking the delivery as failed. To avoid timeout errors, configure any custom webhook handlers to return an HTTP 200 OK response immediately before initiating heavy downstream background tasks.

Can moderators approve or delete comments directly from inside Slack?

Direct moderation inside Slack requires configuring an interactive Slack App with interactive Block Kit buttons that talk to your commenting platform's administrative API. For standard Incoming Webhooks, the message provides rich metadata and a direct link to open the comment in your moderation dashboard, where you can safely approve, reject, or ban the commenter with full access controls.

Does setting up webhooks affect site loading speed or frontend performance?

No. Webhook notifications are entirely asynchronous server-side events dispatched by the commenting backend after a comment is submitted to the database. They execute independently of your frontend visitors' browsers, introducing zero additional JavaScript weight and zero delay to your page load metrics.

Discussion

Comments

This thread runs on EchoThread — the same widget you would add to your own site.

No comments yet.

Ready to try EchoThread?

Free for your first site. Set up in under a minute.

Create free account