Sunday 11 December 2016

Automating homework tweets to calendar entries using IFTTT and scripts

We're coming to the end of DEVELOND, and I'm really looking forward to the break. Looking forward for TDSB teachers: I will be co-hosting a webinar on Documenting with GAFE Thursday, January 12 at 4 pm. Register on Key to Learn.

While I've had a personal Twitter account for many years, I only got a professional account a few years ago. It's been great for professional development, but I also use it to communicate with students and parents. I tweet out useful links and interesting articles, but more importantly, I tweet out homework and test/quiz dates as a backup method for putting the information on the blackboard.


I like using Twitter for this kind of communication because I'm on it every day anyway and, most importantly, you don't need to have an account to read my tweets. To increase the communication, I've embedded my feed on my website (a handy widget you can get from your Twitter settings). The platform I use is Tweetdeck because it allows you to have multiple columns (and multiple accounts) open on the same screen, but also because it allows you to schedule your tweets. This is super-useful for me because that means I can schedule all my homework tweets for the week at once and they can be edited if you need to change something.

I like this system but since I tweet rather a lot, this year I worked out a way to pull together each course's information and post that by itself as well as on the class calendar. I'll create a set of posts with the nitty-gritty details in a week or two, but for now here is the rough process:

I created a recipe in If This, Then That to grab all tweets from @Ms_McPhee and throw them into a Google Sheet. IFTTT creates a sheet called "Tweets by Ms_McPhee" and dumps all my tweets there; the most recent one goes to the bottom of the list.

tweets sheet

I have a format for tweeting out homework, quizzes, or tests. For homework, it looks like this:

CourseCode hw for next day:: what needs to be done.

Tests and quizzes look like this:

CourseCode quiz date_in_accepted_format:: what's on the test/quiz or review.

(The double colon is not a typo.) As you can see, I have made a separate sub-sheet for each course. I use query() (my favourite function in Sheets) to gather all the tweets for a particular course together, then I use split() to separate the tweet into its components (hence the double colon; I originally used a single colon, but that messes up any links I tweet out).

  course-specific hw sheet

I reverse-sort all the homework, quiz, and test tweets and bring those into a completely separate sheet. I embed this sheet on my website.

hw to calendar sheet


In addition, a script is triggered to grab the first line and create a calendar entry out of it.

Google calendar screenshot

I've limited this to homework, quizzes, and tests because for other assignments and labs I want the names in the heading, I don't want to over-flood my feed with due dates, and I usually set them on my biweekly excursions onto Calendar.

There are still bugs to work out in this system: I occasionally mess up the proper date format for the tests and quizzes, and although I have sorted out the issue wherein items got posted to the calendar every time I tweeted, was retweeted, or merely mentioned in a tweet, it still occasionally posts twice. If somebody knows why that is happening, I'd love to hear it.