Send data to Slack webhooks

Last updated:

|Edit this page

Use this destination to send custom messages into Slack based on PostHog events or actions.

If you want to receive regular insight or dashboard subscriptions to Slack, checkout our subscriptions docs.

Requirements

Using this requires either PostHog Cloud, or a self-hosted PostHog instance running a recent version of the Docker image.

You'll also need access to the relevant Slack account.

Installation

  1. In PostHog, click the Data pipeline tab in the left sidebar.

  2. Click the Destinations tab.

  3. Search for Slack and select the destination.

    Creating a Slack destination
  4. Choose an existing Slack connection or click Connect to Slack. You will be redirected to Slack to install the PostHog app. Make sure the PostHog app is added to the channel you want to send messages to.

    Choosing a Slack workspace
  5. Choose your event or action matching and customize your message using Slack's block kit.

  6. Once done, press Create & Enable and watch your messages appear in Slack.

    Example Slack message

You can see a full example of this in our tutorial on how to send survey responses to Slack

Configuration

OptionDescription
Slack workspace
Type: integration
Required: True
Channel to post to
Type: integration_field
Required: True
Select the channel to post to (e.g. #general). The PostHog app must be installed in the workspace.
Emoji icon
Type: string
Required: False
Bot name
Type: string
Required: False
Blocks
Type: json
Required: False
(see https://api.slack.com/block-kit/building)
Plain text message
Type: string
Required: False
Optional fallback message if blocks are not provided or supported

FAQ

Is the source code for this destination available?

PostHog is open-source and so are all the destination on the platform. The source code is available on GitHub.

Who maintains this?

This is maintained by PostHog. If you have issues with it not functioning as intended, please let us know!

What if I have feedback on this destination?

We love feature requests and feedback. Please tell us what you think.

What if my question isn't answered above?

We love answering questions. Ask us anything via our community forum.

Questions?

Was this page useful?

Next article

Send data to custom webhooks

Send event data from PostHog into an HTTP Webhook. Installation In PostHog, click the " Data pipeline " tab in the left sidebar. Click the 'Destinations' tab. Search for 'Webhook' and select the destination. Add your Webhook URL at the configuration step. Press 'Create & Enable' and watch your 'Events' get sent to the Webhook! Configuration FAQ Is the source code for this destination available? PostHog is open-source and so are all the destination on the platform. The source code is available…

Read next article