← Back to documentation

Slack Incoming Webhooks

Create a Slack webhook in Slack, register it as a relay target, and validate delivery.

6 min read

Use this guide to route endpoint traffic into Slack.

Purpose

This workflow helps you:

  • Create Slack incoming webhook credentials.
  • Register Slack as a relay target.
  • Attach target to an endpoint output.
  • Validate with test delivery.

Prerequisites and permissions

  • Slack workspace permissions to create incoming webhooks.
  • Target Slack channel.
  • Access to Relay targets and Endpoints.

Step-by-step workflow

1. Create webhook URL in Slack

  1. In Slack app settings, enable Incoming Webhooks.
  2. Create webhook for desired channel.
  3. Copy URL (https://hooks.slack.com/services/...; GovSlack uses https://hooks.slack-gov.com/services/...).

2. Add Slack relay target

  1. Open Relay targets.
  2. Select Add target.
  3. Choose Slack webhook.
  4. Paste Slack URL into Target value and save.

Validation requires the Slack incoming webhook URL format on hooks.slack.com or hooks.slack-gov.com.

3. Attach Slack target to endpoint

  1. Open endpoint create/edit page.
  2. In Target destinations, select Slack target.
  3. Optionally set Slack Markdown for generated Slack text and template body sections.
  4. Save endpoint.

4. Send test delivery

  1. On Relay targets, select Send test for Slack target.
  2. Confirm message appears in Slack channel.
  3. Verify TEST_ACCEPTED in Activity if needed.

Expected result and verification checks

  • Slack target is listed and selectable in endpoint outputs.
  • Test and live endpoint traffic post to the configured channel.
  • Without a custom message template, PayloadRelay sends the incoming payload as Slack text. With a custom message template, PayloadRelay sends rich Slack attachment blocks with a top-level text fallback.

Common issues and fixes

  • URL rejected: confirm full hooks.slack.com/services/... or hooks.slack-gov.com/services/... format.
  • No message in Slack: verify target attached to endpoint and webhook is still active.
  • Formatting issues: adjust Slack Markdown toggle for generated messages. If you send Slack-native blocks or attachments in the incoming payload, those blocks control their own formatting.

Related guides