Forum Discussion
Extracting emails and url( link) from SharePoint Pages using Power Automate
Hi All,
I would like to iterate through pages in SharePoint and get/extract any emails or urls and export it to an excel format.
I'm using the "Send an HTTP request to SharePoint"
and calling this api below
_api/web/lists/getbytitle('Pages')/items?$select=Title,PublishingPageContent
See below screenshot (As you can see its a classic SharePoint site using the Pages library)
When i look at my output compose 4 it returns the below
{
"__metadata": {
"id": "65f1abfa-98e8-4c13-b649-d94a68e263b7",
"uri": "https://xxx.sharepoint.com/sites/library/_api/Web/Lists(guid'7153eebe-fa65-4778-9ac3-4c09d296309d')/Items(11)",
"etag": "\"181\"",
"type": "SP.Data.PagesItem"
},
"Title": "Induction",
"PublishingPageContent": "<a href=\"/sites/xxx/Documents/Induction/HO%20Induction%20Manual_Sept%202023.pdf\"><strong style=\"color:#603d20;\">Head Office Induction <br></strong><font color=\"#603d20\"><strong>(L63 MLC Sydney)</strong></font></a></span></td><td class=\"ms-rteTableFooterOddCol-0\" rowspan=\"1\" style=\"width:0px;\"></td><td class=\"ms-rteTableFooterEvenCol-0\" rowspan=\"1\" style=\"width:210px;\"><br>
<a href=\"mailto:email address removed for privacy reasons\"><span class=\"ms-rteFontFace-13\" style=\"color:#0085ca;font-size:11pt;\">email address removed for privacy reasons</span></a></td></tr></tbody></table><br>"
},
What do i need to do in my next step to retrieve the content of the PublishingPageContent and then how can i extract the hyperlinks and the email address?
Thanks in Advance
1 Reply
I have extracted hyperlink URLs from HTML text previously using xpath expressions in Power automate which was very complicated task (to fit the expression as per the HTML text content).
However, you can try the solutions given in below and see if those works for you:
- Need to extract the URLs from an hyperlink based text from outlook which contains multiple URLs based on hyperlinks
- Extracting URL from email body text
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.