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.
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']['web_url'], add(lastIndexOf(triggerOutputs()?['body/attachments']['web_url'], '/'),1), sub(length(triggerOutputs()?['body/attachments']['web_url']),add(lastIndexOf(triggerOutputs()?['body/attachments']['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
Maybe more words at the end....
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://'), decodeUriComponent('%0A'))), 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 😁
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Did you know that you could restore a deleted flow? Check out this helpful article.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
At the monthly call, connect with other leaders and find out how community makes your experience even better.