OK, I surrender to this (for me) particular difficult problem. Hope someone has an idea …
Situation: We want to use Google Alerts (GA) as part of our internal communication in SharePoint (SPO). We've set up several GA and have them sent to RSS. Output (note: this is not the actual GA feed, I use it for testing because it continuously returns results):
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:idx="urn:atom-extension:indexing">
<id>tag:google.com,2005:reader/user/09166393305784525238/state/com.google/alerts/6514134383429516862</id>
<title>Google Alert - Österreich</title>
<link href="https://www.google.com/alerts/feeds/09166393305784525238/6514134383429516862" rel="self"/>
<updated>2023-12-04T11:22:56Z</updated>
<entry>
<id>tag:google.com,2013:googlealerts/feed:6379044707093016568</id>
<title type="html">Hangrutsch in Dornbirn: 91 Disco-Besucher zeitweise eingeschlossen</title>
<link href="https://www.google.com/url?rct=j&sa=t&url=https://www.swr.de/swraktuell/baden-wuerttemberg/friedrichshafen/hangrutsch-dornbirn-100.html&ct=ga&cd=CAIyHDFkYWM2YTA1NjMxNzljNDI6Y29tOmRlOkFUOlI&usg=AOvVaw2wGI6Kp9F-GbiTVZrxoj2r"/>
<published>2023-12-04T11:22:56Z</published>
<updated>2023-12-04T11:22:56Z</updated>
<content type="html">Bei einem Hangrutsch in Dornbirn in Vorarlberg sind in der Nacht von Freitag auf Samstag 91 Menschen zeitweise in einem Nachtclub eingesperrt worden. Wie die Stadt Dornbirn mitteilte, ereignete sich der Erdrutsch gegen 4 Uhr morgens. Das ...</content>
<author>
<name/>
</author>
</entry>
</feed>type here
Result should be that the ’entry’ nodes become news posts, which means that the properties of each node have to be extracted and put into variables. After that, for each node a new news post shall be created.
Now, with Power Automate (PA), it is fairly easy to extract the nodes from an ordinary json or xml through xPath. But I fail to achieve success with GA’s output. Typical error is:
InvalidTemplate
Unable to process template language expressions in action 'Compose_1' inputs at line '0' and column '0': 'The template language function 'xpath' expects its first parameter to be an XML object. The provided value is of type 'String'. Please see https://aka.ms/logicexpressions#xpath for usage details.'.
Amongst other things, I gave it a try and removed the part „This XML file does …“ on line 1, no success. Then I removed all the lines up to the first 'entry'. No success.
Any other methods except Power Automate and xPath should not be used. Ideally, we get this working exclusively in Power Automate. Should it arise that this cannot be done, we could fall back to having a script running on a hosted web-server and have that script prepare a file that is properly structured for PA. But this should be our last resort.
I have watched dozens of videos, followed even more guides and tutorials, search the web for hours, but nothing worked (here comes the surrender bit of the story).
I’m grateful for any input, ideas, or even solutions.