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

Messaging Observers of Students in Canvas

Jump to solution

Hi All,

We've put together a script here at Strath to allow us to send messages to the observers of students from the Canvas Inbox (Conversations) and Marksbook ('Message Students Who...') pages. We're a K-12 institution, so while the ability to send messages to students who have not submitted their assignments is awesome, sometimes we need to let their parents know too! It looks a little something like this:


It's pretty simple. The script inserts some buttons on the 'Message Students Who...' and Inbox 'Send Message' buttons for inserting observers and removing students. Once clicked, the script does a few API calls in the background to determine who the observers of the students are and pops them in the recipient list.

Our CSM mentioned this might be something that other institutions might be interested in, so I've made the script and some instructions available here:

If you decide to give it a crack, I'd be interested to hear how it goes! I've tested this with a demo Canvas instance and it's worked ok, but that's the extent of my testing.

All the best!


Download v0.07 Here:



Version 0.07 on 17/04/20

  • Fixed issue where conversations (Inbox) recipients would become invalid after a recipient was removed.

Version 0.06 on 11/10/17

  • Added support for courses with more than one hundred enrolments.

Version 0.05 on 07/07/17

  • Added auto tick "Send an individual message to each recipient" function. This behaviour is active by default, but can be disabled in the msgobs options.

Version 0.04 on 06/07/17

  • Fixed issue where multiple course enrolment lookups were made for the same course in account admin mode.

Version 0.03 on 03/07/17

  • Added support for any kind of group in the recipient list.

Version 0.02 on 15/03/17

  • Fixed issue with unescaped message content.
  • Prevented clicking Remove Students while Include observers function is running.
  • Added dialog to preserve message content if sending fails in Gradebook function.

Version 0.01 on 20/09/16

  • Initial Release
45 Replies
Community Participant

All good questions sbevier.

Looking back over the conversations of this thread should give a fairly accurate idea of the problems faced and their frequency. Between 2017 and 2020 there have been very few updates required. When Instructure updates Canvas, some small changes have been necessary, which for each change require your IT department to replace the script with a new version, but instances of this occurring have been few. Instructure kindly keeps most elements stable.

The best way to check it out is to apply it to your test instance ( and see what you think!

Community Participant

Hi Steve_25,

I just added the javascript to our Canvas Theme.  It worked great in the grade book.  Since you wrote that script, Canvas has added the ability to message students through New Analytics.  This allows teachers to message students who have between certain percentages.  Is there any way to add the observer buttons there too?  Our district would benefit greatly from being able to message parents there as well as on individual assignments in the grade book.  Thank you for your consideration.  Let me know if you need additional clarification.

Thank you for your awesome script!

Community Participant

@lgibson3 Hey thanks for letting me know about that - I haven't looked at new analytics. I'm feeling optimistic about getting the script active there too, but I'll get back to you once I've done a bit of investigation. 

View solution in original post

Community Participant

Thank you so much!  Having the ability to message observers of students who didn't turn in an assignment is a great step in the right direction.  We have stopped using our Student Information System, so teachers can no longer send a progress report quickly to parents.  Being able to add the "Send to Observers" button to the New Analytics message that allows teachers to send messages to students who. have a % between __ and __ would be amazing.  Thank you for your willingness to work on this!

Laura Gibson

Community Member

Hello Steve! I'm new here, and not sure if this matters, but I looked through your tool and found something I think could slow it down significantly. The msgobs.common.getEnrolmentsRecursively function would be a little faster if is was iterative, instead of recursive. I'm sure this is an unwelcome nitpick, and I'm not even sure if it is still used, as I did little more than skim it.

You're not wrong @_-TheTiredDev-_ ! In this case I'm deliberately wanting the script to proceed slowly to avoid triggering Canvas's API throttling, which would come about by hitting the API for every course enrolment, for every course that a user is enrolled in for a list of users. It is not a great solution to a niche scenario where Canvas admins add single users to a recipient list. 

I've now re-written my script for up to ES2020 with proper code comments and support for New Analytics! I expect release this in February if you'd like to cast your eyes over a better version soon 🙂 

Community Participant

This is amazing news, @Steve_25 !!!!  Thank you so much for taking the time to look at New Analytics.  I will be looking for ES2020!

Community Advocate
Community Advocate

Hello @Steve_25. Thank you for providing this script.

So I have installed the file in our instance and I am able to add observers and remove parents but I can't seem to get the send message to highlight so I can actually click Send. It is greyed out. 

I am sure this is user error. But curious if you have seen that.

Thank you for your time to respond back to me/


Community Participant

Hi @don_lourcey1,  I think in this case it's not user error!

Are you seeing this problem when replying to a group conversation on the Inbox? If so, I have a fix in the works that handles this slightly awkward condition that occurs (when the user has admin privileges or previously was an admin) with a little more finesse. If you can hold on just a little longer I'd like to share that with you very soon!

If it's not a reply message creating the issue, I might need to get a bit more information from you. Feel free to send me a direct message.

Community Advocate
Community Advocate

Thank you @Steve_25 for your timely response. Honestly, I think it was user error:). It seems to be working now with no issue, but I do look forward to see your upgrades to the script.