Image by Peggy Dyar from Pixabay

TSChatWise — Getting Started

Laura Taylor

--

In a previous post I introduced TSChatWise … a Google Sheets and Apps Script powered Google Chat tool for teaching and learning. 🚀

This post is the third post in a TSChatWise “Getting Started” series where I’ll discuss how to get started with TSChatWise.

👉 For an introduction to TSChatWise see TSChatWise — A Google Chat Education Tool.

👉 For an installation guide see TSChatWise — Installation.

Chat Messages

Before getting started, it’s important to understand the two different kinds of messages which can be posted to Google Chat by TSChatWise:

  • Simple Messages — plain text messages with simple formatting options
  • Card Messages — more complex user interface card messages

Simple Messages

Simple Messages are messages which appear inline as if typed by a user.

👉 Simple messages can contain symbols used to create special formatting.

👉 For more on simple message formatting symbols and options see the documentation.

Following is an example of a simple message sent from TSChatWise to a Google Chat Room. Notice the special formatting symbols used to highlight words in the Lesson Description.

Diagram 1 — Simple Message in TSChatWise
Diagram 2 — Simple Message posted by TSChatWise

Here is another example of a simple message with code sent from TSChatWise. Notice the special formatting symbols used to highlight code in the Lesson Description.

Diagram 3 — Simple Message in TSChatWise
Diagram 4 — Simple Message posted by TSChatWise

Card Messages

Card Messages are Google Chat messages which contain a more complex user interface in the form of cards.

👉 Card messages can contain special formatting.

👉 For more on card message formatting options see the documentation.

Here is an example of a card message sent from TSChatWise. Notice the special formatting symbols used to highlight words in the Lesson Description.

Diagram 5 — Card Message in TSChatWise
Diagram 6 — Card Message posted by TSChatWise

Here is an example of a card message with an emoji sent from TSChatWise. Notice the special formatting symbols used to highlight words in the Lesson Description.

Diagram 7 — Message in TSChatWise
Diagram 8 — Card Message posted by TSChatWise

Now that we have an understanding of the message types which can be sent by TSChatWise let see how we actually configure TSChatWise to send these messages.

Step 1: Install TSChatWise

👉 See the Installation Guide for instructions on installing and configuring TSChatWise.

Step 2: Configure Lessons

Diagram 9 — Lesson posted by TSChatWise

Each row of the TSChatWise Lesson sheet represents a lesson to be posted to one or more Google Chat Rooms.

Each row contains seven data fields representing each lesson to be posted. These fields are outlined below.

👉 POSTED

A checkbox automatically checked by TSChatWise when a lesson is posted to any Google Chat Room.

Add a checkbox for each new lesson. Use the spreadsheet Insert > Checkbox menu to add a new checkbox.

Make sure the checkbox is unchecked before posting the lesson.

Uncheck the checkbox to reuse a lesson post.

Ensure that there are no extraneous checkboxes in this column or TSChatWise will try to post empty lessons.

👉 POSTED ON

Date stamp automatically added by TSChatWise when a lesson is posted to any Google Chat Room.

Do not modify this field.

👉 POST AS CARD MESSAGE?

Indicates whether the lesson is to be posted as a Simple Message or Card Message.

Add a checkbox for each new lesson. Use the spreadsheet Insert > Checkbox menu to add a new checkbox.

Check the checkbox to send as a card message.

Make sure there is an checkbox in this column before posting the lesson.

👉 LESSON NAME

Name of lesson to be posted with lesson.

This is a required field.

👉 LESSON DESCRIPTION

Lesson content to be posted.

This is a required field.

Can contain additional formatting based upon type of message: Simple Message or Card Message.

👉 LESSON LINK

Link to additional lesson content to be included with the posted lesson.

This is a optional field.

Link will be added to the end of the message body for Simple Messages or as a clickable button link at the end of Card Messages.

👉 LESSON IMAGE (CARD MESSAGES ONLY)

Link to a public accessible image to be included with Card Messages ONLY.

This is a optional field.

Posting a Simple Message lesson as shown above in Diagram 9 will produce this output in a Google Chat room.

Diagram 10— Lesson posted by TSChatWise

Step 3: Schedule Lessons

Once the lessons have been configured on the Lessons sheet, TSChatWise can be configured to run by setting up an Apps Script time-based trigger.

To schedule a time-based trigger perform the following steps:

Open the Google Apps Script Editor

  • Open the TSChatWise template (copied in the Installation step)
  • From the Sheet menu select Tools > Script editor

Create a New Apps Script Time Based Trigger

  • In the Apps Script editor, click the clock icon on the left side
  • In the dashboard, click the + Add Trigger button on the bottom right
  • Under Choose which function to run be sure to select postLessons
  • Under Select event source select Time-driven
  • Under Select type of time based trigger select the desired interval
  • Set any other desired time based trigger options
  • Click the Save button to save the configuration

TSChatWise is now configured to run on the timed interval.

Once TSChatWise has posted all the lessons to the configured Chat Rooms it will automatically unschedule the time-based trigger and send an email to the TSChatWise Google Sheet collaborators configured on the TSChatWise Config sheet.

To reuse the lessons, uncheck the checkboxes in the first column of the Lessons sheet and reconfigure a new Apps Script trigger following the steps above.

Looking for the code? See the TSChatWise project on Github.

Need help automating workflow inside your G Suite domain? Get in touch

Follow me on Twitter, Medium and Github.

Enjoy this post? Please consider buying me a coffee. Thank you!

--

--

Laura Taylor

Google Developer Expert for G Suite passionate about Workflow Automation and Productivity — https://www.tech-streams.com