Forum Discussion

Rob Bowman's avatar
Rob Bowman
Iron Contributor
Nov 21, 2017
Solved

Alerts on Comments in Modern Pages?

So now that we are beginning to take advantage of Communications Sites, Modern Pages and News, we are starting to get comments on our pages - which is awesome, but... Nobody knows there are comments on the pages. Is there currently a way to get alerts/notifications (like most other modern Social Collab Tools) that a comment was made on a page? Maybe by email?

  • Hi Rob,

    I had a similar task: send the email notification to the author of the modern page in SharePoint online if the new comment added.

    I have done this using MS Flow and MS Graph API because standard SharePoint actions in MS Flow didn't help me. 

     

    I've described the solution in https://www.infopulse.com/blog/using-microsoft-graph-api-inside-microsoft-flow-office-365/ on the public blog of my company.

     

    Hope, it helps you.

     

    UPDATE: This solution was implemented for teams site. We found new challenges for brand new communications sites.

     

49 Replies

  • Gašper Rupnik's avatar
    Gašper Rupnik
    Copper Contributor

    Here is my solution how you could make alerts on comments for Classic Publishing Site in SharePoint -> https://rasper87.wordpress.com/2018/11/21/notification-center-inside-sharepoint-on-prem/

  • Paul Chapman's avatar
    Paul Chapman
    Iron Contributor

    Having tried a couple of different options I've gone with a Powershell script that uses PnPOnline to retrieve all my modern communication pages and then write any new commentcounts to a separate SharePoint list (or update an existing list item if the post already had comments previously). Then I have an alert setup on the list for any new or modified items. So far works really well. And the script was pretty straightforward to write (luckily, as I am not an expert Powershell guy by any means).

     

    I did try Joao Ferreria's excellent solution and it worked well. The only drawback was that whenever we ran the code it modifies every modern page it checks so our last modified datetimes and users were changing regularly and it played havoc with various 'Most Recent' list views we have.

     

      • Paul Chapman's avatar
        Paul Chapman
        Iron Contributor

        Hi Gretchen, happy to share if it's useful. 

         

        The solution that I got working for us works as follows:

         

        1. Powershell script, running as a scheduled task, periodically reads the comment count for all News items (List A) on a given site. 
        2. The comment count is compared to the comment count stored on a separate list (List B).
        3. If there is a comment for a News item that previously had no comments then a new item is added to List B with the article URL and the number of comments. If there is an additional comment for News article that already had comments then the list item in List B is updated.
        4.  List B has an alert setup, going to our team Distribution List, whenever List B is added to or modified, which sends an Alert email including the URL of the article.

        I don't know if that works for what you are trying to do. I have the script running on my local desktop as I had real problems getting the script task to run on a server with any sort of encryption. That may be a problem for you. Likewise, in my solution there are only ever 4 possible authors of the News items so for now I can send an alert to all 4, if you have lots of potential authors that may be no good, although I don't think it would take much to change the script to send an email to the article author once a new comment is found.

         

        Hope that helps. Script attached (hopefully).

  • I found that when I downloaded the SharePoint app to my phone I got alerts on my phone when comments were posted in response to News I posted.  I am following the site but I don't know if that is why. I didn't do anything active to set up the alerts.

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    What I do is to embed a Microsoft Forms form on a modern page and for each response (i.e. comment) I get it to send an email to me with the comment and it also creates a new list item in a SharePoint list called Comments on the site. It works really well and gives us a record of every comment, who submitted it and whether we've responded. The form can, of course be added to multiple pages. If you want to show a conversation on a page though you need to display a view of the list which works but my solution works better when users don't need to see other comments.

     

  • João Ferreira's avatar
    João Ferreira
    Copper Contributor

    Hi Guys, 

     

    I've built a custom solution to receive email notifications on new comments using Microsoft Flow and an SPFx extension. The process is still manual, it requires a click in a button from the browser but all site owners will be notified if new comments are available. The instructions to implement it step by step are available http://sharepoint.handsontek.net/2018/08/13/receive-comment-notification-by-email-in-modern-sharepoint-pages/.

  • This is a must fix. My recommendation is to have this setting turned off for the entire tenant. This is an impossible situation where I can't understand why not Yammer is a bigger part of it. A site could have an open Group in Yammer, or a hastag in a Group. The root site could send out to All Company. 

     

    The framework for all solutions on Office 365 for my customers are to have so Close to standard as possible where it is something related to the company's USP that breaks the mold, not standard functionality that should be there.

     

    Imagine the impact of a lot of employees thinking someone cares about their opinion and then nobody replies to them ever because they can't see it? 

     

    Bad design. 

  • Joey Dubuc's avatar
    Joey Dubuc
    Brass Contributor

    The iterative development that MS is taking for the O365 environment is great on one level, but why would a comments feature not have alerts baked in? Having to play around with APIs and Flows for this kind of feature is just not realistic.

     

    I'll wait until they get it sorted out.

  • Egor Tsvetkov's avatar
    Egor Tsvetkov
    Copper Contributor

    Hi Rob,

    I had a similar task: send the email notification to the author of the modern page in SharePoint online if the new comment added.

    I have done this using MS Flow and MS Graph API because standard SharePoint actions in MS Flow didn't help me. 

     

    I've described the solution in https://www.infopulse.com/blog/using-microsoft-graph-api-inside-microsoft-flow-office-365/ on the public blog of my company.

     

    Hope, it helps you.

     

    UPDATE: This solution was implemented for teams site. We found new challenges for brand new communications sites.

     

    • Nigel_Price9911's avatar
      Nigel_Price9911
      Iron Contributor

      Hi @Egor

       

      I think the comments are not held in a list for modern Communications Sites, but in some datastore in the cloud.

       

      You can get hold of them using a REST call so :-http://www.vrdmn.com/2017/07/working-with-page-comments-rest-api-in.html  

       

      I cannot see any list on my communications site starting with "Comments".  I tried using SharePoint Designer, but no list showed.  I am the Global Administrator on the Tenancy and the site collection administrator as well as the Communications Site Owner.  Are you using Yammer by any chance ? is that why you can see the "Comments" list ? - what am I doing wrong not to get the "Comments" list in my Modern Communications Site ?

       

      Regards

       

      Nigel

  • These got to be stored on a list somewhere on the site collection. The question is where. Once figured out possible can access and set alerts or setup flow on it if it’s accessible. If I get some time here in a bit I’ll see if I can figure it out.
      • Rob Bowman's avatar
        Rob Bowman
        Iron Contributor

        jcgonzalezmartin Thanks, I saw this and it kind of started my line of thinking! I guess in the end, I am still wondering where they are stored. Again, great functionality, but when a News Page or Standard Page is posted for communication, especially trying to transition away from standard files, it would make it great to be able to react to the comments. Really hard to follow up with people if they have questions.

Resources