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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 468

#2
Haque Profile Picture

Haque 370

#3
Valantis Profile Picture

Valantis 354

Last 30 days Overall leaderboard