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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Pulling a link from th...
Power Automate
Unanswered

Pulling a link from the body of a Yammer post

(0) ShareShare
ReportReport
Posted on by 125

Hi,

 

There is a Yammer post created each week with a web link in the body. What would be the best way to pull this link to parse it in a following step.

 

Thanks

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

    Hi @Tono_Analyst2,

     

    When it is an attachment to the yammer post you could a HTTP request to retrieve the file and recreate it as a file in SharePoint, so you easily reuse it in a News Post.

     

    Below is an example of that approach.

     

    1. The HTTP action uses the web_url of the first attachment and tries to retrieve the content.

     

    triggerOutputs()?['body/attachments'][0]['web_url']

     

    2. The Create File uses the body of the response of the HTTP action. I also use the expression below to reuse the same file name.

     

    Interestingly enough I didn't see a property for that in the json so I had to use an expression to refactor it 😅

    substring(triggerOutputs()?['body/attachments'][0]['web_url'], add(lastIndexOf(triggerOutputs()?['body/attachments'][0]['web_url'], '/'),1), sub(length(triggerOutputs()?['body/attachments'][0]['web_url']),add(lastIndexOf(triggerOutputs()?['body/attachments'][0]['web_url'], '/'),1)))

     

    attachment_yammermessage.png

  • Tono_Analyst2 Profile Picture
    125 on at

    Hi again @Expiscornovus 🙂 

     

    Unfortunately, I cannot use premium connectors with my licensing (sorry - I should have mentioned this).

     

    Is there another solution that you know of by any chance? If it helps the structure of the post would look something like.

    ____________________________________________________________________________________________________

    Yammmer Post Title abc

     

    Link https://.....

     

    Maybe more words at the end.... 

    ____________________________________________________________________________________________________

  • Tono_Analyst2 Profile Picture
    125 on at

    I have managed to publish a random image using the image link as follows. 

    Tono_Analyst2_0-1642990459941.png

     

    However, I am still stuck on how to extract the image url from the yammer post.

     

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

    Hi @Tono_Analyst2,

     

    In your setup you could probably use the parsed body and use a couple of split functions in an expression to retrieve the hyperlink.

     

    Below is an example expression:

    if(not(equals(indexOf(triggerOutputs()?['body/body/parsed'], 'https://'), -1)), concat('https://', split(split(triggerOutputs()?['body/body/parsed'], 'https://')[1], decodeUriComponent('%0A'))[0]), null)

     

    Btw, as far as I am aware the Reposts endpoint is to create News Links and not News Posts. That is a different approach, and a News Link is a bit more limited with what you can set. However, if you are happy with that we can obviously stick with News Links instead 😁

     

    newslink_sharepoint.png

     

    The reason why I had to recreate the file for a News Post was I couldn't use an external file link in the Banner of a News Post. That was why I was downloading and creating it 😁

     

    ownorganization.png

     

     

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
trice602 Profile Picture

trice602 237 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 173 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 95 Super User 2026 Season 1

Last 30 days Overall leaderboard