How to send survey responses to Slack
Jun 26, 2024
On this page
This tutorial requires you to first create a survey. Our docs cover how to do this, so we won't go into detail here. We also have framework-specific tutorials.
It's useful receive Slack notifications as soon as users respond to your surveys. You can do this in PostHog using our realtime destinations.
After you've created your survey, go to the data pipeline destinations tab, search for the Slack destination and click + Create. Then on the creation screen:
Follow the steps to integrate with your Slack workspace if you haven't already and then select it.
Make sure the PostHog integration is added to the channel you want to send messages to and select it.
Under Match event and actions, select survey sent.
Under Blocks, modify the text to include the survey name and response. For example:
{"text": {"text": "*{person.name}* sent a response to {event.properties.$survey_name}: {event.properties['$survey_response_a3071551-d599-4eeb-9ffe-69e93dc647b6']}","type": "mrkdwn"},"type": "section"},
- Customize the name and description, and press Create & enable.


You can then test the destination and it will start sending survey responses to Slack.
Survey properties
You can extract the following properties from surveys:
Property | Description |
---|---|
event.properties.$survey_name | The name of the survey |
event.properties.$survey_questions | An array of objects containing the following survey question properties: id , index , and question |
event.properties.$survey_response_{response_key} | The response to a specific question. To find response_key , go to your survey page and click on the button Copy survey response key. There's one for each question in your survey. response_key is identical to the corresponding survey question ID |
person.name or other person properties | The name of the person who responded or other properties |
Further reading
- How to set up surveys in Next.js
- How to show a survey after a delay
- How to analyze surveys with ChatGPT
Subscribe to our newsletter
Product for Engineers
Read by 60,000+ founders and builders.
We'll share your email with Substack
Questions? Ask Max AI.
It's easier than reading through 637 pages of documentation