Sending survey responses to Slack via webhook workflows
3 min read
Harris
SurveySparrow’s workflow feature lets you design workflows that can share survey responses to Slack. But if you’d like finer control over the details of your Slack messages, you can instead create a Slack webhook that forwards incoming responses. This gives you full flexibility over what appears in Slack while still using SurveySparrow’s workflow engine to trigger the message.
The steps below walk you through creating the webhook in Slack and then wiring it up inside a SurveySparrow workflow.
Note: Before creating the workflow, make sure that you’ve created all the necessary custom variables.
After the list of apps appears, click on Create New App.
Click on Blank app.
Click on Continue.
Enter an app name and then select the workspace in which it should be deployed in.
Click Create.
When the app is created, click on Incoming Webhooks under Features.
Switch on the toggle.
Click on Add New Webhook.
You’ll have to select the workspace and the channel within which the webhook has to act. Click on the respective drop-down menus for each and make your selection.
Click on Allow.
To copy the webhook URL, click Copy.
Next, click on Basic Information under the Settings panel.
Scroll past the basic information section and towards the display information section, where you can customize the look and feel of the app inside Slack. Click on Save Changes when done.
Part 2: Create the workflow in SurveySparrow
Now, it’s time to create a workflow. Head to your SurveySparrow account, and open the survey whose responses you want to send via Slack. Then click on the Configure section.
Click on Workflows, then click on New Workflow.
Next, set up the workflow. In this case, we want the workflow to trigger when a response is received.
We need the workflow to trigger based on conditions, so set them up. In this instance, we want the workflow to trigger only for specific responses to a question.
Next, set up the action - triggering a webhook.
When the webhook panel opens up, first paste in the webhook URL that you copied from Slack previously in the Endpoint field.
Next, in the Body field, you must enter a valid JSON payload. The body must be a JSON object that includes at least a "text" key.Apart from that, you can add all the response properties that you want to appear in the Slack alert, by clicking on the bracket icon, then choosing from the menu. This is what a sample payload would look like:
If you’d like to also push the question text in the alert, click on the toggle for it.
Click on Save to complete the action, then click on Save and Activate to finish creating the workflow.
Test the integration
Submit a test response to the survey, then check the Slack channel you selected for the webhook. You should see the message appear within a few seconds.
You can also review the SurveySparrow workflow logs to understand if the workflow fired at all and/or why it failed. If there’s any other error message apart from 200 OK, reach out to SurveySparrow support for assistance.
Troubleshooting
Problem
Likely cause
What to check
Nothing appears in Slack
Wrong webhook URL or the workflow never fired
Double-check the Endpoint URL, confirm the workflow is Active, and verify the trigger conditions match the test response. Also inspect the workflow logs to see if it fired and/or why it failed to fire.
400 Bad Request / blank message
Invalid or missing JSON
Ensure the Body is valid JSON and contains a "text" key. Missing quotes, trailing commas, or plain text instead of JSON will cause this.
Message never arrives in a private channel
App not invited to the channel
In Slack, invite the custom app to the private channel (/invite @YourAppName).
Variables show as literal {{score}}
Variable not created or not selected
Confirm the custom variables exist in the survey and that you inserted them via the bracket menu (not typed manually).