Send PostHog analytics events to your Microsoft Teams server

Last updated:

|Edit this page

Send event data from PostHog into the Microsoft Teams server and channel of your choice.

Requirements

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

Setup

Microsoft Teams: create a webhook

  1. In Microsoft Teams, go to the channel you want to send events to.
  2. Click the three dots next to the channel name and select Workflows.
  3. Select the Post to a channel when a webhook request is received, in the templates section.
  4. Click Next, then Add workflow.
  5. Copy the webhook URL.

PostHog: create a destination

  1. Back in PostHog, click the Data pipelines tab in the left sidebar.
  2. Click the Destinations tab.
  3. Search for Microsoft Teams and select the destination.
  4. Add your Webhook URL.
  5. Use the Text field to format your message. You can include any properties that exist on event or person.
  6. Use the Filters panel to set up a query to filter the events you want to send, otherwise you'll get a firehose of all events filling your channel.
  7. Press Create & enable. Events will now be sent to Microsoft Teams. If you'd like to send a test event to your channel, hit the Start testing button.

Configuration

OptionDescription
Webhook URL
Type: string
Required: True
See this page on how to generate a Webhook URL: https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498
Text
Type: string
Required: True
(see https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook?tabs=newteams%2Cdotnet#example)

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? Ask Max AI.

It's easier than reading through 614 docs articles.

Community questions

Was this page useful?

Next article

Send PostHog event data to another PostHog instance

You'll also need access to the destination PostHog account. Installation In PostHog, click the Data pipelines tab in the left sidebar. Click the Destinations tab. Search for PostHog and select the destination. Add the Host and API Key of the destination at the configuration step. Press Create & Enable and watch your 'Events' list get populated in the destination PostHog instance! Configuration FAQ Is the source code for this destination available? PostHog is open-source and so are all…

Read next article