# Extract Chat

**URL:** <https://forum.uipath.com/t/extract-chat/156344>\
**Category:** Help\
**Tags:** uiautomation, activities\
**Created:** [3. Oktober 2019 um 17:12 UTC](https://forum.uipath.com/t/extract-chat/156344 "2019-10-03T17:12:40Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kaynat](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kaynat/32/100501_2.png) [@Kaynat](https://forum.uipath.com/u/Kaynat)\
**Post date:** [3. Oktober 2019 um 17:12 UTC](https://forum.uipath.com/t/extract-chat/156344/1 "2019-10-03T17:12:40Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Jarzzz](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jarzzz/32/63669_2.png) [@Jarzzz](https://forum.uipath.com/u/Jarzzz)\
**Post date:** [3. Oktober 2019 um 17:15 UTC](https://forum.uipath.com/t/extract-chat/156344/2 "2019-10-03T17:15:33Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Kaynat](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kaynat/32/100501_2.png) [@Kaynat](https://forum.uipath.com/u/Kaynat)\
**Post date:** [3. Oktober 2019 um 17:20 UTC](https://forum.uipath.com/t/extract-chat/156344/3 "2019-10-03T17:20:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Jarzzz](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/jarzzz/32/63669_2.png) [@Jarzzz](https://forum.uipath.com/u/Jarzzz)\
**Post date:** [3. Oktober 2019 um 17:46 UTC](https://forum.uipath.com/t/extract-chat/156344/4 "2019-10-03T17:46:44Z")

</div>

@Kaynat Can you share what you have so far?

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

> **[UiPath Essesntial Training - 4 3 Selectors](https://www.uipath.com/learning/video-tutorials/selectors)**
>
> Reliable selectors represent an essential part of UiPath Studio and UI automation, especially in dynamically changing environments.

---

<div class="post-metadata">

**Author:** ![Kaynat](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kaynat/32/100501_2.png) [@Kaynat](https://forum.uipath.com/u/Kaynat)\
**Post date:** [3. Oktober 2019 um 19:24 UTC](https://forum.uipath.com/t/extract-chat/156344/5 "2019-10-03T19:24:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rmunro](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rmunro/32/108327_2.png) [@rmunro](https://forum.uipath.com/u/rmunro)\
**Post date:** [3. Oktober 2019 um 20:19 UTC](https://forum.uipath.com/t/extract-chat/156344/6 "2019-10-03T20:19:22Z")

</div>

Hi @Kaynat,

Try screen scraper wizard then use the scraping method FullText. It should give you all the selected text.  
 ![image](https://global.discourse-cdn.com/uipath/original/3X/9/7/97ff2b538a6d852b4993f00be390d6275df3154b.png)  
Let me know if this worked or not for you thanks.

---

<div class="post-metadata">

**Author:** ![Kaynat](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kaynat/32/100501_2.png) [@Kaynat](https://forum.uipath.com/u/Kaynat)\
**Post date:** [4. Oktober 2019 um 19:18 UTC](https://forum.uipath.com/t/extract-chat/156344/7 "2019-10-04T19:18:54Z")

</div>

_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.

---

<div class="post-metadata">

**Author:** ![rmunro](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rmunro/32/108327_2.png) [@rmunro](https://forum.uipath.com/u/rmunro)\
**Post date:** [5. Oktober 2019 um 03:02 UTC](https://forum.uipath.com/t/extract-chat/156344/8 "2019-10-05T03:02:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Raghavendraprasad](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/raghavendraprasad/32/66936_2.png) [@Raghavendraprasad](https://forum.uipath.com/u/Raghavendraprasad)\
**Post date:** [5. Oktober 2019 um 04:22 UTC](https://forum.uipath.com/t/extract-chat/156344/9 "2019-10-05T04:22:44Z")

</div>

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](http://academy.uipath.com) do check it out as it has great training videos and basics 🙂 )

Regards

---

<div class="post-metadata">

**Author:** ![Kaynat](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kaynat/32/100501_2.png) [@Kaynat](https://forum.uipath.com/u/Kaynat)\
**Post date:** [7. Oktober 2019 um 13:32 UTC](https://forum.uipath.com/t/extract-chat/156344/10 "2019-10-07T13:32:59Z")

</div>

thanks, Will try to do so.

---

<div class="post-metadata">

**Author:** ![Kaynat](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/kaynat/32/100501_2.png) [@Kaynat](https://forum.uipath.com/u/Kaynat)\
**Post date:** [7. Oktober 2019 um 13:34 UTC](https://forum.uipath.com/t/extract-chat/156344/11 "2019-10-07T13:34:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Raghavendraprasad](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/raghavendraprasad/32/66936_2.png) [@Raghavendraprasad](https://forum.uipath.com/u/Raghavendraprasad)\
**Post date:** [7. Oktober 2019 um 14:39 UTC](https://forum.uipath.com/t/extract-chat/156344/12 "2019-10-07T14:39:25Z")

</div>

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?
