How to Notify Slack on Google Form Submit
Send a message to Slack when a user submits a Google form by following the steps below.
-
Create Incoming WebHook in Slack:
- Follow the steps mentioned at Slack Webhooks.
- Copy your webhook URL, which will look like
https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
.
-
Create a WebHook in Form Email Notifications:
- Open the Form Email Notifications add-on and click on "Setup Webhooks."
- Click on "Add Webhook" to create a new Webhook.
- Fill in the following fields in the Webhook creation window:
- Webhook Name: Slack Integration
- URL: Paste the Slack Incoming WebHook URL you copied.
- Request Method: Select POST.
- Headers: Leave as is with a default header (Content-Type: application/json).
- Request Body: Use the following JSON template:
{"text" : "You have received a new response for Google form <{{ Form Publish Url }}| {{ Form Name }}>"}
- Click on Save to create your webhook.
-
Test Your Webhook:
- You can test the webhook before saving by clicking the "Test" button on the Webhook Editor Window.
- If you receive a status code as 200, it means your test was successful.
-
Submit the Google Form:
- Open the Google form preview by clicking on the Preview button on the top right of the Google form window.
- Submit the form, and if everything is configured correctly, you should receive a notification in your Slack channel.
-
Send Rich Text Messages:
- You can send rich text messages to Slack by following the Slack Rich Text Formatting Guide.
note
The process to create webhook and the json format may have changed after this page was written .Please check Slack developer document for more details.