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 / Post to Yammer as Prai...
Power Automate
Unanswered

Post to Yammer as Praise Post

(1) ShareShare
ReportReport
Posted on by 19

Is it possible to post to Yammer using the praise post format, and can you add a post as another user?

Categories:

*This post is locked for comments

I have the same question (0)
  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @PowerAppUser875,

     

    You could use the Yammer REST API for posting a praise. I am not sure if the post as another user is possible though.

     

    Below is an example code snippet for posting a praise.

    This requires a HTTP connector action, which is a premium connector. You might need an additional license to be able to set this up.

     

    1. Register an app in Yammer. Make sure you obtain the access token and use something like below in the body.

     

    {
     "body": "(See+attached+praise)",
     "body_format": "PLAIN_TEXT",
     "message_type": "praise",
     "publisher_type": "yam.ui.publisher.global.PraisePublisher",
     "publisher_Source": "group",
     "feed_id": "@{variables('YammerDestinationGroup')}",
     "feed_view": "default",
     "feed_type": "group",
     "number_of_recipients": "1",
     "invited_user_ids": "",
     "group_id": "@{variables('YammerDestinationGroup')}",
     "sender_id": "@{variables('SenderUserId')}",
     "skip_body_notifications": true,
     "praise": "{\"comment\":\"Amazing job again\",\"icon\":\"thumbsup\",\"praised_user_ids\":[@{variables('PraisedUserId')}]}"
    }

     

    postpraise_inyammer.png

     

    2. In a test group this will look like this

     

    postpraise_inyammer02.png

  • AshMSport Profile Picture
    36 on at

    How did you retrieve the PraisedUserId and is it possible to have it dynamically set. Eg. it's entered in a People picker field in SP list and whichever user is entered gets praised.

  • Expiscornovus Profile Picture
    33,195 Most Valuable Professional on at

    Hi @AshMSport,


    Yes, that should be possible. Use the e-mail property of that field in a GET user by email request of the Yammer REST API.


    Below is an example of that.

     

    Uri field which uses a person or group type column with the name Employee.

    https://www.yammer.com/api/v1/users/by_email.json?email=@{triggerOutputs()?['body/Employee/Email']}

     

    The id of the first result.

    body('HTTP_-_Get_users_by_email')[0]['id']

     

    getuser_byemail_yammer.PNG

  • AshMSport Profile Picture
    36 on at

    This is brilliant. Thank you @Expiscornovus !

  • AshMSport Profile Picture
    36 on at

    I was able to get it to work. Only caveat is the sender username/ID doesn't show up anywhere. Anyway to show it?

    AshMSport_0-1660949225960.png

     

  • chetanhiran Profile Picture
    Microsoft Employee on at

    I was able to make it work via Post, the issue is ran into was, the praise was not associated with praised_user_ids. 

    chetanhiran_0-1712090248193.png

     

    {
        "body": "Praise by API",
        "group_id": ****,
        "message_type": "praise",
        "praise": {
            "comment": "Praise by API",
            "icon": "thumbsup",
            "praised_user_ids": [*****]
        },
        "sender_id": ****,
        "publisher_type": "yam.ui.publisher.global.PraisePublisher",
        "publisher_Source": "group",
        "feed_view": "default",
        "invited_user_ids": "",
      "feed_type": "group",
      "number_of_recipients": "1",
        "skip_body_notification" : true
    }
     
    Any help is appreciated. 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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard