cancel
Showing results for 
Search instead for 
Did you mean: 
sam_dickerman
Community Participant

Creating a Canvas/Slack integration

Jump to solution

Hi Everyone:

I'm a high school Social Studies teacher looking to work on a side project.  We have a program called "Tutorial" which is a sort of structured study hall with about 10 students and 2 teachers.  I really like Slack as a communication platform and I would like to develop an integration that would post a student's Canvas information to a Slack channel that the tutorial teacher could monitor.  For example, past grades or upcoming assignments.

Is there a way to set up Canvas to push that data over to Slack automatically?  Or do I need to make cron jobs on some sort of middleware to hit the API and then push the data over to Slack via the Slack API?

I think I can build the latter option (using ColdFusion believe it or not - I'm an old dog from the .com days) but I'm unsure about building something more tightly integrated with Canvas.

Thanks for any ideas!

Sam Dickerman

Brookline High School

Brookline, MA USA

Labels (1)
Tags (3)
1 Solution

Accepted Solutions
tyler_clair
Community Champion

What content were you looking at pushing to Slack? There doesn't look like there is a push mechanism for content in the Canvas API but there is a push communication channel: https://canvas.instructure.com/doc/api/all_resources.html#method.communication_channels.create (Specifically in the communication_channel[type] request param section). In the Slack there are Bot Users https://api.slack.com/bot-users, that acts much like an IRC bot that responds to commands. It even looks like they have specific user accounts for bots. It uses web sockets to communicate so you could poll a discussion thread or conversation every few seconds or minutes to check for new messages or maybe the push communication channel can monitor that for you and the bot could post those new messages to a Slack channel. It doesn't look like there is a way for it to post as the user but you could still get the message. That is what I have found in the Slack API documentation, although I have never used the Slack API before.

I know you are looking for a side project but if you want to take the easy way out I remember seeing a vendor at InstructureCon called YellowDig https://www.yellowdig.com/. One of their tag lines was something like "Its like Slack for education". That may be an easier route as they already have an LTI integration and mobile apps.

View solution in original post

11 Replies
scottdennis
Community Team
Community Team

Hi Sam,

Unfortunately I don't know enough to help you with this but I bet a slack integration would be hugely popular if done right.

tyler_clair
Community Champion

What content were you looking at pushing to Slack? There doesn't look like there is a push mechanism for content in the Canvas API but there is a push communication channel: https://canvas.instructure.com/doc/api/all_resources.html#method.communication_channels.create (Specifically in the communication_channel[type] request param section). In the Slack there are Bot Users https://api.slack.com/bot-users, that acts much like an IRC bot that responds to commands. It even looks like they have specific user accounts for bots. It uses web sockets to communicate so you could poll a discussion thread or conversation every few seconds or minutes to check for new messages or maybe the push communication channel can monitor that for you and the bot could post those new messages to a Slack channel. It doesn't look like there is a way for it to post as the user but you could still get the message. That is what I have found in the Slack API documentation, although I have never used the Slack API before.

I know you are looking for a side project but if you want to take the easy way out I remember seeing a vendor at InstructureCon called YellowDig https://www.yellowdig.com/. One of their tag lines was something like "Its like Slack for education". That may be an easier route as they already have an LTI integration and mobile apps.

View solution in original post

Hi Scott - I'll share what I come up with.

Hey Tyler - thanks for the info.

My idea was to have a private group set up for each student in the tutorial with the two teachers as members.  (Later I'd add the other academic teachers, guidance councilors, deans, etc). 

Into that channel would come the latest assignments, due dates and grades for the student.  You can color code the edges of slack messages so perhaps green for completed assignments and red for late assignments or incomplete assignments.  The idea would be to push into the channel the latest news about the student so that teachers could catch them when they start to falter more easily.  I'd also push  info from our other school database that tracks attendance and final grades, etc.

The point is that this would be a live, flowing set of messages rather than a dataset returned at a user's request.  However I DO want to build a series of /commands for teachers to use to get data specific on a student (like /grades or /assignments or /attendance).

The problem with the bots (I think) is that each bot is it's own entity that would have to be configured for each channel.  I'll actually have lots of private groups with lots of teachers and students so I'll probably just keep all that logic in the middle layer.

Thanks also for the tip on yellowdig - I'll check it out.  But as you say, why go with an elegant, modern, easy solution when you can cobble together a hack job using a tool that peaked in the last century?

: )

Thanks,

Sam

RobDitto
Community Champion

Agreed with  @scottdennis ​, this integration could be awesome!

We use Yellowdig at our institution.  It's great, but I think of it more as "Reddit/Pinterest for education" since communication is less chat-like and based more on pins/posts.

michael_ball
Community Participant

While I don't have a dedicated Slack integration, I've been building off of Github's Hubot framework, which is a generic bot that does have a good Slack adapter.

We have a bot which does some stuff with Canvas, you can checkout the code here:

https://github.com/cs10/Alonzo

Specific scripts which do some Canvas-y things:

https://github.com/cs10/Alonzo/tree/master/scripts/cs10

Right now we have some commands for resetting quiz passwords, inputting scores, and parsing submissions and comments to calculate late days for students.

As far as bots and channels, that configuration is totally manageable with something like Hubot, because you can inspect what channel or room messages are coming from, and pick IDs to use based on that.

Totally happy to answer questions! I'm totally excited about expanding the possibilities of getting meaningful data from Canvas in more formats. Smiley Happy We've been using chatrooms for Berkeley CS classes and it's great, and better methods of querying data would be awesome!

Jumping in 5 months after the fact but is there an update on this? I generally have used Slack-type tools in my higher-ed classes not so much integrated with the LMS but as a worthy addition - especially for fully online classes! I love the idea of configuring hubot to do some of that. For now I'm going to try Yellowdig.

We could definitely use a slack bot which could return pieces of information from canvas. Any plans to have that implemented on the short term?

mate.remias​, I see that you just added this as a feature idea - - too cool!! I'd definitely vote for it!

mate.remias​, I would definitely vote that up--more than once if I could! Smiley Wink