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
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)))
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....
____________________________________________________________________________________________________
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.
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 😁
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.
User | Count |
---|---|
23 | |
13 | |
11 | |
10 | |
8 |
User | Count |
---|---|
33 | |
25 | |
24 | |
17 | |
16 |