Google Forms To Slack
Do you have a Google Form? Did you ever wish that you could get a Slack message when someone submits the Google Form? Great, because that is exactly what this script does.
- This script is a web service client to the Slack Incoming Webhook API; it posts slack messsages using HTTP Post.
You'll need a few things
- A Google Sheet attached to your Google Form.
- An Incoming Webhook integration for your Slack channel. Set this up in Slack and make note of the URL it provides, you'll need it. https://api.slack.com/incoming-webhooks
- Open your Google Forms Spreadsheet.
- In the menu, click on "Tools" -> "Script Editor".
- Paste the code.js script into the Script Editor.
- Edit the code you pasted to include the Slack Incoming Webhook URL in the customizations block; change the variable
slackIncomingWebhookUrland then set your channel name in the variable
- Set up the event triggers by running the
initialize()function. In the Script Editor's menu bar, select the function
initializeand click Run. Agree to any permission requests.
- You're done! Try it out by submitting a response to your Google Form. If successful, you'll see a new message in your slack channel.