web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Getting views and numb...
Power Automate
Suggested Answer

Getting views and number of comments from Viva Engage

(0) ShareShare
ReportReport
Posted on by 7
Hi all,
 
For our own research and SOP curation, I created a flow that returns to me the last 100 messages in Viva Engage. I'm able to collect the likes on a parent post, but not the views or the number of comments (I get comments can be tricky because Viva Engage lumps them together with posts). Has anyone found any sort of workaround for this? I don't see a dynamic option for collecting these two analytics elements. 
Screenshot 2024-08-05 113502.png
Categories:
I have the same question (0)
  • Suggested answer
    Daniel03 Profile Picture
    2 on at
    Hi @brihegwun16,
    you can retrieve the number of comments by following these steps:
     
    1. Retrieve the last 100 new threads (make sure to set 'Thread type of messages' to 'true' in order to only retrieve conversation starters)
    2. Using the 'Get messages in a thread (V3)' action, retrieve all messages that belong to the thread (-> You'll get the main post and all comments). Use 'Message List Message Thread ID' of the previous retrieval (step 1) and you'll automatically get a loop.
    3. Get the length of the 'body/value' of your last action to get the number of messages in the thread -- including the original (thread starting) message.
    4. In order to only get the number of comments, substract one from the number of total messages. Your final expression should be something like:
    sub(length(outputs('Get_messages_in_a_thread_(V3)')?['body/value']), 1)
     
    I hope this helps.

  • dmore1122 Profile Picture
    Microsoft Employee on at
    Question.
    How do you get the content on the messages instead of the views count? Would it be possible to create an array that get the last 100 messages (and their responses) ? Thanks

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard