Forum Discussion

Patrick Rote's avatar
Patrick Rote
Iron Contributor
Oct 12, 2023

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&#58;#603d20;\">​​Head Office&#160;Induction&#160;<br></strong><font color=\"#603d20\"><strong>(L63 MLC Sydney)</strong></font></a></span></td><td class=\"ms-rteTableFooterOddCol-0\" rowspan=\"1\" style=\"width&#58;0px;\">​</td><td class=\"ms-rteTableFooterEvenCol-0\" rowspan=\"1\" style=\"width&#58;210px;\"><br>
<a href=\"mailto&#58;email address removed for privacy reasons\"><span class=\"ms-rteFontFace-13\" style=\"color&#58;#0085ca;font-size&#58;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

Resources