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

Notifications

Announcements

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. 
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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard