Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Pulling a link from the body of a Yammer post



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.



Dual Super User
Dual Super User

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.




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



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


Helper I
Helper I

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



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


Dual Super User
Dual Super User

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 😁




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 😁





Helpful resources

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,535)