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 / Extract data from webp...
Power Automate
Answered

Extract data from webpages action do not work when extract "custom data attributes".

(0) ShareShare
ReportReport
Posted on by 6

Hi all,

 

I have created flow to Extract data from webpages using custom data attributes 'data-label'.
But it did not work when the 'data-label' values only numbers.

 

HTML like this:

 

<ul id="data">
 <li data-label="256">Data1</li>
 <li data-label="a01">Data2</li>
</ul>

 

Extraction mode: List,

Page CSS selector: ul#data > li
Extract element value > custom attribute: data-label

 

Result:
1st value: blank (* this is wrong, must be able to get the value "256".)
2nd value: a01 (this is correct.)

 

Would it be possible to get the values only numbers?

 

FYI, Attributes as 'id' and 'class' could be obtained without problems even if the values only numbers.

I use latest versions of Power Automate for desktop.


I would appreciate any help or idea.

Thanks,

I have the same question (0)
  • Verified answer
    OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Interesting,

     

    Looks like PAD can't handle custom attributes that well? The Reason why it does get attributes like ID and Class correct is because there are standardized HTML/CSS formats, PAD knows how to work with these in contrary to the Custom Attribute.

     

    I guess you can try:

    1. Execute a javascript snippet that scrapes the values.

    2. Instead of attribute data-label, use the attributes Data1 and Data2. If there are more attributes you can use a loop to iterate thru these.

    3. Scrape all values of u1 id="data"> and then parse this string to get your values. Im guessing you will get 1 long string and then you can edit this string to get all values within <=""> for example. 

     

    Furthermore still interested in why it doesn;t scrape the numerical values in first place with custom attributes.

     

    Good luck.

     

     

     

  • hisumi Profile Picture
    6 on at

    @OkanAT,

    I tried another way and succeeded:

    Use the run JavaScript function on web page action.

     

    > Furthermore still interested in why it doesn;t scrape the numerical values in first place with custom attributes.

    Me too. Is this a bug??

     

    Thanks so much for your response and good ideas!

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on at

    Hi,

     

    Yes i believe this is a Bug, and you should open a ticket to Microsoft Support about it. They can tell is more about it but fyoi: this has probably to do with the back-end of PAD and how it is scraping Custom Attributes, where it can't process only numeric values or that kind. 

     

    If my First answer helped you, please accept it as Solution for others to see :).

     

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 238 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 225

#3
Haque Profile Picture

Haque 181

Last 30 days Overall leaderboard