How to setup the Discord webhook

Last updated:

|Edit this page

You can send messages to Discord whenever an action triggers.

1. Create an incoming webhook in Discord

  1. Navigate to the channel where you want to add the webhook and select the 'Edit Channel' option from left navigation pane.
  2. Select the 'Integrations' option from the left navigation pane.
  3. If you are creating a webhook for the first time, click the "Create Webhook" button. If you have other webhooks, click "View Webhooks" and then "New Webhook".
  4. Give the webhook a name.
  5. Select the channel where the message should be posted from the dropdown.
  6. Click the "Copy Webhook URL" button to copy the URL.

It should look something like this.

Discord Webhook setup

For more information, see the Discord webhook docs.

2. Setup the webhook in PostHog

Copy the Webhook URL from Discord, navigate to project settings in PostHog, and paste the URL into the "Webhook integration section".

Add webhook integration

Click "Test & Save" and you should receive a message on Discord.

3. Post actions to the webhook

In PostHog, navigate to the action that you'd like to receive webhooks for. Then select "Post to webhook when this action is triggered". You can also modify the message format.

PostHog edit action

4. Celebrate

Questions?

Was this page useful?

Next article

Self-host PostHog

This page covers our free, open-source Docker compose deployment , which is available under a MIT license without guarantee . We continue to develop this version, but some premium features are only available on PostHog Cloud. We do not provide support for this "Hobby" version. We no longer support paid, open-source deployments and it is no longer possible to buy licenses for self-hosted versions - we instead recommend migrating to PostHog Cloud . Our MIT-licensed Docker compose…

Read next article