Skip to main content
Community site session details

Community site session details

Session Id : Pl08kmoBh9jCOKmoEJh//w
Power Automate - Power Automate Desktop
Unanswered

Get a images from web page

Like (0) ShareShare
ReportReport
Posted on 8 Apr 2021 17:05:29 by

Is there any option to get count/html of all images in a specific table/webpage using power automate desktop?

Categories:
  • fraenK Profile Picture
    2,125 on 12 Apr 2021 at 20:28:01
    Re: Get a images from web page

    Just simple two lines does it all:

    WebAutomation.DataExtraction.ExtractList BrowserInstance: Browser Control: $'''img''' ExtractionParameters: {['', 'Source Link', ''] } ExtractedData=> DataFromWebPage
    SET ImgNum TO DataFromWebPage.RowsCount
  • burque505 Profile Picture
    398 on 08 Apr 2021 at 18:31:13
    Re: Get a images from web page

    @keyurpsspl1, you can do it with the 'Run JavaScript function on webpage action.

    I don't have any affiliation with this website, I just picked it at random because it had multiple images.

    You'll need to do more processing if you want to get the URLs of the images into Excel or some other program, but maybe this will get you started.

     

    images_flow.png

    This is the code for the first function:

     

     

     

     

     

    function ExecuteScript() { 
    var imagez = document.getElementsByTagName("img");
    return imagez.length;
    }

     

     

     

     

     

    'imagez.length' is the count of images, but as a number. If you want to display it you need to convert it to text first (see flow).

    The second function grabs the URL of the first image on the page. Then it's displayed in a message box.

     

     

     

     

     

    function ExecuteScript() { 
    var imagez = document.getElementsByTagName("img");
    return imagez[0].src;
    }

     

     

     

     

     

    You can also experiment with 'Get details of element on web page'. This is often (some might say always) a better approach. You can modify the selector to use variables, of course.

    Attributes-flow.png

    Saving the best for last, you can 'Extract data from webpage'.

     

    extract.png

    Here I just grabbed all the images on the page and stored the URLs in an Excel sheet. If you need the count, you can count the rows with an Excel action.

    A couple of video links for this action:

    Extract data from webpage 

    Price extraction 

    Nice post on the forum by @Ameer 

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete