Hi everyone!
I have a code, that running in assync with fetch.
As result in variable I'm getting "undefined".
How I can run my code to wait in Power Automate for result?
My code:
function ExecuteScript() {
var myHeaders = new Headers();
myHeaders.append("X-Requested-With", "XMLHttpRequest");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch('MYURL', requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
}
Thank you in advance!

Report
All responses (
Answers (