Extract Chat

Hi everyone!
I wanted to know how to extract chats from a website (for example Messenger".
I know how to extract search result. It would be great if someone can teach me how to extract messages (from 1st ever sent message to the latest message sent).

@Kaynat I would imagine there is a web element that contains the text of the chatbox. Use the Get Text activity with that element in the selector. Use as desired.

can you show me an example? i am new with all this.

@Kaynat Can you share what you have so far?

I’d also recommend checking this out if you are unfamiliar

Hi I really have not done anything yet. I just cannot understand how to scrap the chat just the way it is in our messenger app. Scraping google search is very easy, but cannot understand how to scrap the whole chat. A small example would have been great.

Hi @Kaynat,

Try screen scraper wizard then use the scraping method FullText. It should give you all the selected text.
Let me know if this worked or not for you thanks.

correct me if i am wrong
If i try to screen scrape then all other data apart from the messages will get extracted. Other than that i want to to first scroll to the first message that was sent and then start extracted each message. Once i came across a chrome extension which extracted the chat within the date range the user gives. Since it is a chat extraction , a simple screen extraction might not work well.

Yes and no. If you just select de message you should get a selector with an idx (index). Use a loop to go through all messages. I recommend using internet explorer for this and all messages should probably be loading for this method to work.

Hi there @Kaynat

Data scraping might not be easy with messengers like facebok messenger or the whatsappp web-versions as they load when you scroll.

If you are talking about something fixed (not cascading continuously loading content) then it should be fairly easy with some selector manipulation (and might require some meta-data editing also)

Hope this helps, get back if you have more queries. (If you haven’t seen the academy.uipath.com do check it out as it has great training videos and basics :slightly_smiling_face: )


thanks, Will try to do so.

previously i have done a simple data scrapping script, just getting the search results and writing in a csv file, it was very easy. But extracting messages is not that simple i see. Will try to take up all the suggestion and try come up with something that works.

I would personally go for my custom loop whenever some complexity is involved in how the data is being loaded.

Data scraping is for fixed structured data where the text/numbers are changing inside the fields and mostly when table element is involved.

For example you have your organization messaging app (like skype, uChat or slack) you can make use of API’s for better results (if they have exposed them) or else using an assistive tech. like UiPath for the same would seem a bit counter intuitive when so many factors are in play.

Have you loaded messengers and tried scraping?