Skip to main content
Question

How do I mention an entire Microsoft Teams channel to trigger pop-up notifications?


I have read all the posts in the community forum including this post How do you mention a channel in Microsoft Teams action? | Zapier Community which says that you can now mention a channel or a team.

 

I have tried various combinations of enclosing the name of the channel in <at> tags, or <channel> tags or combining both <at><channel> however none of these work.

 

I have been looking for instructions on this but either there are none or they have escaped my search so far.

 

So, my question is simply, If I have a MS Teams Channel in a Team called “AWS” how do I create a mention for it that would cause a pop-up notification for all the channel members?

28 replies

Userlevel 7
Badge +6

Hi @reidca,

Welcome to the Community! 🎉

You can try using the “Send Channel Message” action. I believe this will create a pop-up notification to everyone when you mention a channel.

Hopefully, this helps!

Badge

That is the action I am using but this does not create a notification.

 

The post I referenced shows that you surround the channel name in <channel> tags however this does not work either.

 

Can you point me to a working example or some documentation on this feature please?

Userlevel 7
Badge +6

Hi @reidca,

Before we dig deeper into this, would you mind sharing a detailed screenshot of how your Zap is configured? Also, please share a screenshot of the “Action” section of your Microsoft Teams step that shows all of its fields. Like so:

46dd6c0979e3d815d621b8da43084ef1.png
(view larger)

Please don't include personal information in the screenshot, or be sure blur out any personal information.

Thanks!

Badge

This Zap is part of an integration with the DoIT console.

 

It is triggered when there is a cost anomaly and my requirement is that it sends a notification to members of the Teams channel “AWS”.

 

As you can see from the screenshot, I have added a notification for myself as well (email removed. This works.

The notification to the channel does not. Also please note, I have already tried enclosing channel tags in at tags. But I am just basing this on the referenced post in the community support ticket. I would appreciate some actual documentation to follow with an example.

 

 

 

 

 

Userlevel 7
Badge +6

Hi @reidca,

I've checked out your field mapping and setup, and everything seems to be good. I suggest reaching out to our Support Team so they can dig into the Zap and its logs to pinpoint the issue. Our Support Team has all the right tools to help with this.

You can reach our Support Team here: https://zapier.com/app/get-help

I appreciate your patience and understanding.

Badge

Before I do that, is there no documentation for this feature? Aside from that single post on Community I cannot find anything. Surely there must be some ?

Userlevel 7
Badge +6

Hi @reidca,

Unfortunately, I couldn’t find any documentations regarding this one. The only one that I can find is the help text in the “Message Text” field of the “Send Channel Message” action:

aba3ce4fb1164ac124c3a074277d52d9.png
(view larger)

Badge

Which does not mention channel notifications at all! 

I am surprised at a total lack of documentation - how are people meant to know this works without any documents?

 

Can @SamB  help here since she was the person who originally posted the message I referenced?

 

Thanks

 

carl

 

 

 

 

 

Userlevel 7
Badge +8

Hi @reidca 

 

A few comments / questions that might help:

 

  1. Do you get an error message when you try to test the zap? If so, what is the error?
  2. Did you try using the channel name “AWS” instead of “aws”?
  3. Did you try using the channel ID instead of the name?
Userlevel 7
Badge +11

Hi there, @reidca! 👋

Sorry about the lack of documentation around this. I’ll put in an internal request to have a guide added with details on how to add <at>, <user>, <channel> and <team> mentions so we can improve on that!

Looking at the screenshot you shared earlier in this thread it appears that you’re adding the channel mention tags correctly. But it looks like the selected channel name itself is in uppercase rather than lowercase:
85f8988e6d55b1249a2fe1035b5b51f3.png

Can you try updating the channel mention to <channel>AWS</channel> and let me know if that gets it working?

Badge

i have tried both upper and lower case with no different outcome - it simply prints out the word enclosed in the tags.

 

Is there a working example I can look at?

Userlevel 7
Badge +11

Thanks for giving that a try @reidca, sorry it didn’t work as hoped. 

I don’t have access to a Microsoft Teams account on my side for testing so I can’t provide a working example. But I’ll reach out to the team that worked on the feature request to add support for Channel mentions and will share their insights on this once I’ve heard back from them.

In the meantime, can you confirm whether @ mentions for channels are enabled for that AWS channel? According to Microsoft’s documentation here it needs to be enabled in order to be able to use channel mentions:
84958c77dea87f86f65004fa09f7987c.png
 

And can you try changing the format of the message from markdown to plain instead to see if that sorts it? I’m wondering if there’s potentially some limitation around using those tags with markdown.

Thanks for your help on this, 
I look forward to hearing from you! 🙂​​​​​​​

Badge

Thank you for the planned follow up.

 

Yes, channel mentions are enabled for this channel - we use them all the time.

 

I just tried changing to plain text but the outcome is simply a plain text <channel>AWS</channel>  in the message.

 

Note: the user mention works fine in both plain text and markdown.

Userlevel 7
Badge +11

I’m so sorry that didn’t work either @reidca.

The team are still looking into this but I’ll report back here as soon as I can. If there’s anything else we can assist with in the meantime do let us know! 

Userlevel 7
Badge +11

Hi @reidca, hope you had a good weekend! 🙂

I’ve just heard back from the team and it seems that you would need to use the <channel> tags with the displayName of the channel in order for it to work. It searches for the channel to @ mention by it’s display name specifically so if the display name of the channel is different to what’s been referenced in the <channel> and </channel> tags then that could be what’s preventing the channel from being mentioned. 

Can you take a look at the channel’s display name in Microsoft Teams and confirm whether it is exactly the same as what’s been included inside the <channel> tags?

Also, can you try doing a channel mention for a different public channel and let me know whether that different channel is @ mentioned correctly? 

Badge

As far as I can see the channel only has a “name” - there is no other name that I can edit, as you can see from the channel setup screen:

 

 

When you put this name “AWS” in the notification this is the result:

 

 

As you can see, my name is a “mention” but the channel is simply plain text.

I have tried every combination of upper and lowercase.

 

I have also tried this on another channel with the same result.

 

Thanks

 

Carl

Userlevel 7
Badge +11

Thanks for testing that out, @reidca - it’s very much appreciated! 🤗

The team have been looking into this for us and it turns out the feature request to add support for channel mentions was specifically related to the Send Chat Message action. So currently those <channel>, <user> and <team> tags are only supported on the Send Chat Message action. Not the Send Channel Message action that currently only supports <at> user mentions, which is why it’s not been working so far. I’m going to update the announcement on the related thread to clarify this and avoid any further confusion on this.

We’re opening a new feature request to for the ability to support channel, user and team mentions with the Send Channel Message as well, and will add your vote to that. I can’t make any promises around when it’ll be implemented but you’ll definitely get an email notification from us as soon as it is. And I’ll follow up in the thread here to confirm once support for those types of mentions are added.

Thanks for your patience in the meantime! 

Badge

Thank you for your continued support on this issue and for the clarification on why this is not working.

Whilst I am disappointed that this is not supported, at least I know that this is not something I can control. 

 

I would say however at this point that supporting channel mentions in Chat messages but not in the channel itself does seem an odd situation. Chats are inherently private things so mentioning a channel (that notifies the whole channel) to something that members may not be able to see is of questionable value.

 

My use case for this to ensure all members of a channel are aware of cost anomalies via the notification feature. Without the ability to notify the channel, I am relying on people proactively visiting the channel and seeing the message which is not really going to work.

 

Can you please let me know the link for the feature request once it is available?

 

Thanks

 

Carl

 

Userlevel 7
Badge +11

You are most welcome @reidca! I agree, to me it would make more sense for the Send Channel Message to support those type of mentions than the Send Chat Message action. But rest assured, it’s definitely on the team’s radar to add support for those types of mentions with the Send Channel Message too.

The bug reports and feature requests aren’t public facing so I can’t share any links to them but we’ll send you an email as soon as it’s added. And I’ll be keeping an eye out for any news on this end and will share updates here in this thread once available.

The only potential workaround I can think of in the meantime would be to try using Microsoft Team’s API Request (Beta) action in the Zap instead. It’s a bit more advanced as you’d need to reference the Microsoft Teams API documentation to ensure the request is set up correctly. But I had a quick look through the API documentation for Microsoft Teams and it looks like you’d need to reference this part of their documentation to create the message: Send chatMessage in a channel or a chat. And we also have a general guide on how to work with those types of actions that you might find useful: Set up an API request action.

If you do give that workaround a try and run into any trouble do let me know - happy to assist further!

Badge

Thank you for the suggestion, I am a developer myself so very happy to do this instead.

I have tried setting up the integration with the API Request (Beta) action but keep hitting the following error:

 

 

When you add the url there is a note “Requests can only be made to domains associated by this application”. However I have no idea what these domains are and I cannot find any documentation on this.

 

The url I am using is:

https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages
(with the actual values added)

Note the channel id includes both a colon and an @ symbol  - this is what is returned by the Teams API.

I know this works as I have tested it using Microsoft Graph explorer.  I can see the message and the mention when adding using Graph Explorer to send the message.

 

However, when testing this with the Zap, I keep hitting the Invalid Url method.

I suspect that the Zapier Teams App is either not liking the : or @ symbol, or potentially expecting some other url domain but there does not seem to be any other information on this.

 

I also note in the document: https://help.zapier.com/hc/en-us/articles/12899607716493-Set-up-an-API-Request-action that you mention “If you add a URL containing parameters to the URL field, your request will ignore them. However, the url does not include query string parameters. It is simply a url path format.

 

I have tried this with a complex body post and a very simple with just containing plain text and the error  message is the same.

 

If you could provide any more information on the url I would appreciate this.

 

Thanks again.

 

Carl

 

 

 

 

Userlevel 7
Badge +11

Thanks for the update @reidca! Yes, I think you’re right on that. It’s very likely those special characters that are causing that error here.

Can you change the : to %3A and the @ to %40 in the URL and let me know if that fixes it? 🤞

Badge

Tried encoding the characters with no success.

 

I also checked the validity of the url and it passed here: URI Validator (0mg.github.io)

 

I suspect the issue may be the domain graph.microsoft.com may not be associated with the Teams app in Zapier however since there are no docs on this (that I can find) it is hard to know for sure. 

 

Do you know what domains are associated?

 

Userlevel 7
Badge +11

Sorry for the delay in my reply @reidca

The domain referenced in the URL endpoint shouldn’t be the cause of the issue here since it will be the same as the one used in the standard Microsoft Teams app’s send message actions. Whenever the domain is not recognized, it would be indicated in the error message.

I did some testing on my end for the same URL with the : changed to %3A and the @ changed to %40 like so: 
0dd376372b2f8029f9cf2d5734cad63e.png

Which resulted in a different error that states I’ve got the incorrect scope permissions: 
ad240880f26f46a574d76757de44c980.png

Which I’m thinking might just be due to me not granting the correct permissions in the Microsoft Teams. 🤔

If you follow the same set up as shown above but with using your own Team ID and Channel ID do you also see that same permissions error? Or do you continue to get the same “Invalid URL” error?

Badge

Sorry for the delay in my reply. I have tried modifying the url as you instructed and I seem to have now gotten past the “Invalid url” error and indeed have a permission error similar to what you described:

 

“Missing scope permissions on the request. API requires one of 'ChannelMessage.Send, Group.ReadWrite.All'. Scopes on the request 'Channel.ReadBasic.All, Chat.ReadWrite, Team.ReadBasic.All, TeamsAppInstallation.ReadForUser, User.Read, User.ReadBasic.All, profile, openid, email'”

 

I am a Global Administrator in Azure AD and therefore thought I would be able to grant the admin consent for the missing permissions however no amount of trying to update the Zapier Enterprise Application in AzureAD seems to allow me to grant the required permissions. 

 

There is no App Registration since this is not an app we developed ourselves. So we must use the Permissions tab in the Enterprise Application. 

 

 

However there is no option to add specific permissions. I have already been through the “Grant Admin consent” loop several times however this does not request the permissions needed.

 

I am wondering whether the Zapier Enterprise app is out of date with respect to the permissions that the permissions the “Send HTTP Request to Microsoft Teams” action requires?

 

If you know another way of adding the permissions to the Zapier app please do let me know.

 

Thank you once again for your continued support on this annoying issue.

 

 

Userlevel 7
Badge +11

No worries on the delay, @reidca! 🙂 

I’m so sorry you’re getting a “Missing Scope Permissions” error too, I had hoped that I’d somehow messed up the permissions in my own set up as I’m not super familiar with Microsoft Teams. But as you’re also getting that error I suspect this could be a bug with the API Request action for Microsoft Teams. Could you please contact our Support Team to report this as a potential bug? They can then investigate the logs for your API Request action and open up a bug report as necessary.

Sorry to have hit a bit of a dead end on this at the minute. I’ll keep investigating on this end and if I find a solution to adding the missing scopes in the meantime I’ll let you know right away! 

Reply