web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate Desktop...
Power Automate
Answered

Power Automate Desktop Object Object error

(0) ShareShare
ReportReport
Posted on by 21

Using this script in power automate desktop to fetch details its producing variables new value[Object Obejct] but using same script in browser console its producing value

I have the same question (0)
  • VishnuReddy1997 Profile Picture
    2,666 Super User 2026 Season 1 on at

    Hi @Joeanon ,

     

    If you’re trying to return an object from a JavaScript function, you can use the JSON.stringify() function to convert the object into a string. For example, if JSONResponse is the object you’re trying to return, you can use JSON.stringify(JSONResponse)

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

  • Joeanon Profile Picture
    21 on at

    When i am saying object please find attached evidence i am getting this variable output while running script[Object Object] while running in Browser Console i am getting required data there

    IMG_7142.jpeg

  • NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @Joeanon !

     

    Is it possible for you to provide the script here? Then we can figure out what is the issue.

  • Joeanon Profile Picture
    21 on at

    function ExecuteScript() {
       var elements = document.getElementsByClassName("slds-popover__body");
       var result = [];
       for (var i = 0; i < elements.length; i++) {
           result.push(elements[i].innerHTML);
       }
       return result.join("\n");
    }
    // Call the function and return the result
    ExecuteScript();

  • Verified answer
    NathanAlvares24 Profile Picture
    1,714 Moderator on at

    Hi @Joeanon !

     

    When using in 'Run JavaScript on Webpage' action, you don't need to call the function, ExecuteScript().

     

    It will simply be this:

    function ExecuteScript() {
     var elements = document.getElementsByClassName("slds-popover__body");
     var result = [];
     for (var i = 0; i < elements.length; i++) {
     result.push(elements[i].innerHTML);
     }
     return result.join("\n");
    }

     

    I hope this helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 258 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 198 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 136 Super User 2026 Season 2

Last 30 days Overall leaderboard