
Announcements
Hi,
I am trying to
(1) get to a website capture all the links of a particular pattern of id
(2) then pass those links to power automate and click through them one by one, and
(3) extract data from each of those pages
I am using Run Javascript and querySelectorAll to retrieve all links and store in a javascript array Features. This part (1) works.
I am unable to return this array to Power Automate as a list variable for step (2) an (3).
===================
function ExecuteScript() {
var Features = [];
var features = document.querySelectorAll("a[id^='justResources_']");
features.forEach(function(element){
Features.push(element.id);
//alert(element.id);
});
console.log(Features); // This works and shows all the ids
return Features;
}
// Output variable from Run Javascript in PowerAutomate is %Features%
// In Power automate
for each %Feature% in %Features% loop .... complains that %Features% is [object Object].
==============================
At this point without understanding the interface between Run Javascript and Power Automate, I am hunting blind.
Any help is deeply appreciated.