# Installation

There are several prerequisites to building a Messenger chatbot, which we will assume are already taken care of. Before we start, please make sure that you already have:

* an active Facebook account
* a Facebook page for your chatbot to be associated with that you are an admin of
* a CSML chatbot ready to go

## 1. Login with facebook

In CSML Studio, visit **Channels > Connect new channel > Messenger**. Click on **Continue with Facebook** to grant permissions to CSML Studio to connect bots to your chosen pages. This starts a standard Facebook login flow:

![Select any page you might want to associate with the bot](/files/-M938a4BPHIx4szgrVE7)

After this, simply select the page you want to link to the bot, and wait a few seconds.

Voilà! You can now search for your chatbot in Facebook Messenger (it will be listed under the page's name).

![Search for your chatbot in the search bar. It will appear under the Businesses section.](/files/-M7oAQvu4AdB9fE9Qabl)

![](/files/-M7oAQvvENzuN2EXt9n6)


---

# Agent Instructions: 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:

```
GET https://docs.csml.dev/studio/channels/messenger/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
