Celebrate Excellence in Education: Nominate Outstanding Educators by April 15!
As an administrator customizing our help menu, I would love to set up a link similar to a mailto link but to message a specific person using the internal Canvas conversations tool. This is preferable to using a standard mailto link since many of our students do not have their browser/email program properly set up to use mailto links. I also prefer not directing them out of Canvas if I can help it.
One example of using this (as in our case), is to message the person who does QA for all the courses' content, to report an error.
Is there some way of structuring a link to do this? I imagine it would be something like ....instructure.com/conversations/[somehow insert user to message here]
I have been looking for any documentation on this but no joy thus far. Please direct me to it if you know of any info I cannot find.
Solved! Go to Solution.
Okay, so thanks to some testing done by carroll-ccsd and some follow-up testing I did this morning, I think we have identified where things go wrong.
From observation, it appears that the conversation system operates as follows:
It means my original answer is incorrect!
There is not a valid way to make a static link that will work for all users without setting up a "catch all" shell where all users are enrolled and the context_id defined for that shell. Users with rights granting them access to the account-level People page will be able to use those links (/conversations?user_name=:short_name&user_id=:user_id), but the average user won't.
This doesn't mean a valid link can't be applied within individual course shells, it's just that the link will need to be customized to each shell and it won't automatically update when the shell is copied. If you set the link to course 74 to /conversations?user_name=:short_name&user_id=:user_id&context_id=course_74 and copy it to shell 76 the link in the new shell will still say "context_id=course_74").
Hello, @lbarry , and Welcome to the Canvas community.
To answer your question, so long as the contact link is going to be static, you can use:
https://<domain>/conversations?user_name=:user_full_name&user_id=:user_id
So, if you were the user to be included in the link and your username were 1234, the link would be:
https://<domain>/conversations?user_name=Louis%20Barry&user_id=1234
Important Note: This really is using the "Full Name" as it is labeled in the Canvas interface, not the "Display Name" or "Sortable Name". From the API, the required field is labeled "short_name".
Thank you cesbrandt, this is the elegant solution I was looking for and I am sure this page will be helpful to many others too.
By the way, is this documented somewhere for future or more extensive reference?
If it is documented I don't know where. I actually learned of the URL via the Beta site deployment of https://community.canvaslms.com/ideas/1126. It's a direct "theft" of the link used to open a new message to the selected user.
Determining the appropriate name the "user_name" GET variable corresponded to was a simple matter of changing the name, though it also corresponds to the standard deployment of the names. In the API documentation for users, for the "short_name" value it states:
A short name the user has selected, for use in conversations or other less formal places through the site.
Mine pops up perfectly, but it says "recipients invalid". Can you help me on this?
That indicates that the supplied user_id is invalid. I just tested changing the user_id and the user_name. The only time I got an error message (and it was that) was when there was a fake user_id.
In fact, the testing indicates that the value of the user_name is superficial to defining the name displayed when writing the message. When I checked the Sent box, it should the correct name for the supplied user_id regardless of the name supplied.
So, change that the user_id you defined in the URL correctly matches the intended recipient's Canvas-generated ID. If so, I would suggest reaching out to Instructure support.
You can check the ID by accessing the profile of the target recipient. From the profile page, the URL will contain the appropriate ID immediately following "/users/". If it's for yourself, you'll need to access the profile the same way you would another user (via the People page of either a course or account) or by selecting "Account Details" from the dropdown in the top-right of the "Profile" page.
Using my original example of "1234" would result in the following URLs:
Profile: https://<domain>/users/1234
Course Profile: https://<domain>/courses/<course_id>/users/1234
Conversation: https://<domain>/conversations?user_name=<any ASCII string can go here>&user_id=1234
Similar to Victoria my conversation page pops up perfectly, but I receive an error when I try to send the email. The error says "context_code invalid". Are there any ideas on how this can be fixed?
Do you get this error only when using a custom link or is it occurring when you use the links found on the "People" list of an account? The best test would be to find the exact user you're trying to have as the point of contact in the custom link and test if it works from the "People" list.
It is a custom link. I have been using:
https://<domain>/conversations?user_name=:user_full_name&user_id=:user_id
to create buttons students can select to start a conversation with instructors quickly from a Canvas page. Thank you for mentioning the "People" list with a send message link. I checked that out and found that the above link should be changed to:
https://<domain>/conversations?context_id=:course_1234&user_name=:user_full_name&user_id=:user_id
where 1234 is actually the course number of the relevant course.
This ended up working!
Okay, so thanks to some testing done by carroll-ccsd and some follow-up testing I did this morning, I think we have identified where things go wrong.
From observation, it appears that the conversation system operates as follows:
It means my original answer is incorrect!
There is not a valid way to make a static link that will work for all users without setting up a "catch all" shell where all users are enrolled and the context_id defined for that shell. Users with rights granting them access to the account-level People page will be able to use those links (/conversations?user_name=:short_name&user_id=:user_id), but the average user won't.
This doesn't mean a valid link can't be applied within individual course shells, it's just that the link will need to be customized to each shell and it won't automatically update when the shell is copied. If you set the link to course 74 to /conversations?user_name=:short_name&user_id=:user_id&context_id=course_74 and copy it to shell 76 the link in the new shell will still say "context_id=course_74").
Thank you to all you great people who share your knowledge. @cesbrandt @lbarry
I am no expert in programming or website design. I can undertake simple editing in html, but that's about it.
Please can you help me understand this solution for "mail to" the internal Canvas messaging system? I will soon start a large free-standing course with lots of new students who have not necessarily seen Canvas before. I want to make it a little more accessible for them to contact us.
If my user name is Rachael Gould and my SIS ID is rgo, what do I write in the link? I don't really understand the course ID part either.
I would be very grateful for any help.
This is soooo great and I've started using this technique it when I need to refer students to other teachers.
I wonder if there is a way to pre-add a subject as well....any ideas on how to do this?
//Jill
cesbrandt, @carrollrw @cherise_king17
THANK YOU SO MUCH for this extremely helpful thread. I am trying to figure out a quick and easy way for all learners in a course to be able to message the whole teaching staff (without enabling the permission that allows them to also message all of their fellow students.) This is so close to being exactly what I was looking for, but I'm wondering if there is a way to configure this link for multiple recipients? If so, how would I add a recipient to the following link who's full name was John%20Smith and user id was 1234?
Thanks so much in advance -- if I can get to the bottom of this, it would be a huge help!
It does not appear so. I pulled up the Canvas code on GitHub and was unable to find any definitions that would allow for multiple recipients to be declared via a URL. This feature appears to be limited to the UI/API.
To participate in the Instructure Community, you need to sign up or log in:
Sign In
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.