Allows people interested in joining the ResBaz AZ Slack workspace to request an invitation to join. People with email addresses from the following domains do not need to request an invitation, they can self-sign up.
- arizona.edu
- nau.edu
- uab.edu
- pima.edu
- iu.edu
- email.arizona.edu
For everyone else, requesting an invitation means entering their info in the Google Form. The form will then send a request to the slack-admins channel. An admin will then send an invite if the request is legitimate.
The form collects user info and send it to slack-admins. From the account that will own the form do the following.
Form setup:
- Create a new form
- Add the desired questions to the form. All questions and answers will be sent to
slack-admins(lightly sanitized) - Create/open the linked spreadsheet
- Create a new worksheet called
Log(do not delete the existing worksheets).
Script setup:
-
Open the form in Edit view by clicking the three vertical dots in the top right and select Apps Script
-
Create files with the exact name and content of the files in this repo, so they appear in this order in the Files list:
RestAPI.gsMain.gs
-
Click the
+for the Libraries section. Paste1DSyxam1ceq72bMHsE6aOVeOl94X78WCwiYPytKi7chlg4x5GqiNXSw0lin the box to add the BetterLog library -
Click the gear icon in the left hand sidebar to open the Project Settings
-
Scroll down and click Edit Script Properties
-
Add the following properties with the corresponding values
- Property:
BetterLogLevel, value:INFO - Property:
Slack_incoming_webhook, value: URL of Slack webhook (see below).
- Property:
-
Run the
installfunction. See the instructions at the top ofMain.gs.
From a Slack account with admin access to the Slack workspace (logged in on the web)
- Create a new private channel (e.g.,
slack-admins) - Follow the Slack tutorial for creating a webhook. In step 3 of the tutorial, select the newly created channel
- Copy the webhook URL to the
Slack_incoming_webhookproperty in the Google Apps Script. It should be in the form ofhttps://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX