How to extract unread Gmail messages as collection in Blue Prism automation

I’m working on a Blue Prism automation project and running into some issues with Gmail integration.

My goal is to fetch all unread messages from my Gmail inbox and convert them into a data collection that I can loop through for processing. The main problem I’m facing is that I cannot locate or identify the proper table structure for the unread email list.

I’ve been trying different approaches to capture the inbox elements, but the unread messages don’t seem to be getting recognized as a structured table that Blue Prism can work with. This makes it impossible to iterate through each message in my process flow.

Has anyone successfully implemented Gmail unread message extraction in Blue Prism? What’s the best way to identify and capture these email elements so they can be processed in a collection format?

Any guidance would be really helpful!

I fought with this for weeks before figuring it out. Gmail’s virtual scrolling and lazy loading means Blue Prism can’t see the whole email list at once. Here’s what worked: I used browser automation to scroll down the inbox slowly first - this forces Gmail to load all unread messages. Then I spy on individual email rows instead of trying to grab the entire table. I built a loop that spots unread messages by their bold text and pulls data row by row. The trick is using dynamic selectors based on the unread status class, not fixed table positions. It’s slower than reading a normal table, but it’s reliable. Don’t forget to add wait stages between each email extraction - Gmail needs time to load.

Had the exact same problem with Gmail in Blue Prism last year. Gmail’s dynamic loading breaks traditional table identification - it’s a nightmare. I ditched web scraping entirely and switched to the Gmail API. Way better approach. You can use Blue Prism’s REST capabilities to hit Gmail’s API endpoints directly. Returns unread messages as clean JSON that’s super easy to parse into collections. Web scraping Gmail is just asking for trouble - emails load async and the DOM changes constantly. API gives you consistent data structure every time. You’ll need OAuth setup first, but after that it’s smooth sailing. JSON converts straight into Blue Prism collections without fighting web elements.

gmail’s web interface sucks for automation. use imap instead - it’s way more reliable than scraping. blue prism connects through .net code stages and pulls unread emails straight into collections. i use the system.net.mail library to grab messages with the unseen flag. works perfectly every time without dealing with dom issues or dynamic loading crap.