> For the complete documentation index, see [llms.txt](https://documents.cxgenie.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documents.cxgenie.ai/integrations-and-connections/platform-integration/facebook/connect-with-previous-chat-history-for-the-bot-to-learn.md).

# Connect with previous chat history for the bot to learn

## Connect with Facebook Message to learn 50 conversations

* To access this feature: Platform Integration -> Facebook.
* You will see a list of which pages have been added to your bot.

<figure><img src="/files/Hu13aqJ9RHjm2DDc7CqQ" alt=""><figcaption></figcaption></figure>

* By clicking "Add page" button on the top-left screen. You can add the chatbot to your Facebook Page.
* There will be a tab pop-up&#x20;

<figure><img src="/files/Bp2olnUjJCMoPun828vg" alt=""><figcaption></figcaption></figure>

* You can select which Facebook page you need to add your chatbot. Then click "Next" button to go the step 2.

<figure><img src="/files/YT2PECYSvfxK09kxfXbw" alt=""><figcaption></figcaption></figure>

* You have to accept all permissions for your chatbot to work properly. Click "Done" button to complete add your Facebook page to your Workspace.

<figure><img src="/files/kYTJnpZxEb1rkSOcEjY8" alt=""><figcaption></figcaption></figure>

* After successfully adding to your WorkSpace, the next step is to add your bot to the Facebook page. You can choose which bot you want to add to your Facebook page from a list containing all the chatbots you have in the WorkSpace.

<figure><img src="/files/7N7ygYIdPafOWJKOMpaE" alt=""><figcaption><p>A list contains all chatbot you have.</p></figcaption></figure>

* After adding the bot, it will start to extract and learn data from the first 50 conversations on the page.

<figure><img src="/files/Gyag3UrQELd0XZbh0Fze" alt=""><figcaption></figcaption></figure>

* A notification will appear in the top-left corner of the screen to show you the progress of this process, which may take up to 5 minutes to complete depending on your conversations.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://documents.cxgenie.ai/integrations-and-connections/platform-integration/facebook/connect-with-previous-chat-history-for-the-bot-to-learn.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
