Skip to content

Latest commit

 

History

History
161 lines (91 loc) · 6.64 KB

Install.md

File metadata and controls

161 lines (91 loc) · 6.64 KB

Install and Configure TSChatWise

Image by Peggy Dyar from Pixabay.



Step 1: Install TSChatWise

To install TSChatWise:

  • Login to Google Drive.
  • Access the TSChatWise Google Sheets template.
  • Click the Use Template button. This will copy the Google sheet template to Google Drive.


Step 2: Create Chat Room(s)

Follow the steps outlined in the Google Chat Room - Create a room documentation to set up a Google Chat room.

👉 TSChatWise can post the same lesson to multiple Google Chat rooms.

👉 Google Chat must be enabled in your domain to setup Google Chat. Check with your G Suite Administrator if Google Chat is disabled.


Step 3: Create Chat Room Webhook

Access the Chat Room Webhooks

  • Go to Google Chat
  • Select the desired Chat room from the left side of the screen
  • Select the dropdown for the room name at the top of the screen
  • Select Manage webhooks

Enter a Webhook Name

  • Enter a webhook name i.e. TSChatWise
  • (Optional) Enter an Avatar URL
  • Click Save

👉 Multiple chat bots can provide notifications to a single Google Chat Room. Be sure to use descriptive webhook names to distinguish multiple bots.


Make a Copy of the URL

  • Click the Copy button to make a copy of the webhook URL

Step 4: Configure TSChatWise

Open TSChatWise template

  • Open the TSChatWise Google Sheet copied to your Google Drive during Step 1 above.
  • Navigate to the Config sheet.

Add Chat Room Webhook URL to TSChatWise 'Config' Sheet

  • Under Chat Room Name enter the name of the Chat room from Step 3 above.
  • Under Chat Room URL enter the Webhook URL copied in Step 3 above.

Configure Notifications When Lessons Complete

To be notified when all lessons have been posted to all chat rooms:

  • Check the box to the right of Notify By Email When Complete
    • Check the box to the right of Email Sheet Editors for all TSChatWise Google Sheet editors & owner to be notified.
    • (Optional) Check the box to the right of Email Sheet Viewers for all TSChatWise Google Sheet viewers to be notified.

Step 5: Test TSChatWise

  • Select TSChatWise > Test TSChatWise option from the Google Sheet menu. This will send a test message to each configured chat room.

👉 The first time TSChatWise is run it will require authorization. Follow the Google prompts to authorize TSChatWise and then rerun the TSChatWise > Test TSChatWise option again from the Google Sheet menu.


Important Notes

👉 Multiple versions of TSChatWise can be used to provide notifications to a single Google Chat Room.

👉 A single version of TSChatWise can provide notifications to multiple Google Chat Rooms.

👉 Check the Apps Script Dashboard for execution errors if TSChatWise does not work as expected.


Advanced TSChatWise Configuration Options

TSChatWise provides some advanced configuration options. The following code and table outline the configuration options which can be changed by the TSChatWise Google Sheet owner to provide a more customized experience.

To change any of the advanced configuration options:

  • Click the Tools > Script editor menu from the TSChatWise Google Sheet copied to your Google Drive during Step 1.
  • Find the configuration option(s) shown below in the Code.gs file and make the appropriate change(s).
  • Save the changes and return to the TSChatWise Google Sheet copied to your Google Drive during Step 1.

👉 Use caution when making changes to the source code.


// TSChatWise Configuration

const CONFIG_SHEET = 'Config'; // 🧰 Name of TSChatWise 'configuration' sheet

const LESSON_SHEET = 'Lessons'; // ✏️ Name of TSChatWise 'lessons' sheet

const ROOM_URL_COLUMN = 2;  // 🔗 CONFIG_SHEET column which contains the Chat Room URLs 
                            // (column numbering starts at 1)
                            
const EMAIL_COLUMN = 5; // 📥 CONFIG_SHEET column which contains the 'Notify By Email When Complete' checkboxes 
                        // (column numbering starts at 1)

const DATE_FORMAT = "M/d/yyyy k:mm:ss"; // 📆 Timestamp format for posted lessons on LESSON_SHEET 
                                        // See this site for more information 
                                        // https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html


// TSChatWise Chat Message Configuration

const LESSON_BUTTON_TEXT = 'CLICK FOR LESSON'; // 🔳 Lesson chat message button text

NAME TYPE DESCRIPTION
🧰 CONFIG_SHEET General Name of TSChatWise configuration sheet
✏️ LESSON_SHEET General Name of TSChatWise lessons sheet
🔗 ROOM_URL_COLUMN General CONFIG_SHEET column which contains the Chat Room URL(s) (column numbering starts at 1)
📥 EMAIL_COLUMN General CONFIG_SHEET column which contains the 'Notify By Email When Complete' checkboxes (column numbering starts at 1)
📆 DATE_FORMAT General Timestamp format (for posted lessons on LESSON_SHEET). See more information on supported timestamp formats.
🔳 LESSON_BUTTON_TEXT Chat Message Lesson chat message button text


   👈 About    |    Getting Started 👉