# Set up Telegram account masking

This article will show you how to use three pre-made flows to set up Account Masking in Telegram.

&#x20;

### Requirements

* A [MessageBird account](https://dashboard.messagebird.com/en/sign-up)
* [Telegram account and bot](https://developers.messagebird.com/docs/conversations/install-channel-telegram/)
* [Flow Builder](https://dashboard.messagebird.com/en/flow-builder)

&#x20;

### Step one: Set up MessageBird and your Telegram bot

Before you can set up the pre-made flows, you'll need to make sure you have a MessageBird account and a Telegram bot Follow these steps to get set up:

1. Sign up for a [MessageBird account](https://dashboard.messagebird.com/en/sign-up)
2. Create a [Telegram bot](https://developers.messagebird.com/docs/conversations/install-channel-telegram/) and [install it as a channel](https://www.youtube.com/watch?v=nymZB_6iKUc) in your MessageBird Dashboard

&#x20;

### Step two: Set up the customer-to-business flow

1. Download the pre-made [TGAM - C2B flow](https://drive.google.com/file/d/1uPzYaFtf3S76GtSTaMmavGbqZhCwa-mV/view)
2. Log in to your [MessageBird Dashboard](https://dashboard.messagebird.com/)
3. Navigate to [Flow Builder](https://dashboard.messagebird.com/en/flow-builder)
4. Click on **Import flow** and import your TGAM - C2B flow
5. Go to the Webhook step and **copy** the Webhook URL (make a note of it)<br>

   <figure><img src="/files/Jf8ilVK1BVliNcuU5Tm2" alt=""><figcaption></figcaption></figure>
6. Go to the step called **Your TGAM 1 of 3** and select your Telegram channel from the menu<br>

   <figure><img src="/files/8epyN7N0huRf7BXIvLZD" alt=""><figcaption></figcaption></figure>
7. **Save** the step
8. **Publish** your flow

&#x20;

### Step three: Set up the business-to-business flow

1. Download the pre-made [TGAM - B2B flow](https://drive.google.com/file/d/1zzIavsY7vCUT1qSbi3_otEzOb96VNFxM/view?usp=sharing)
2. Navigate to [Flow Builder](https://dashboard.messagebird.com/en/flow-builder)
3. Click on **Import flow** and import your TGAM - B2B flow
4. Go to the Webhook step and **copy** the Webhook URL (make a note of it)<br>

   <figure><img src="/files/Jf8ilVK1BVliNcuU5Tm2" alt=""><figcaption></figcaption></figure>
5. Go to the step called **Your TGAM 1 of 3** and select your Telegram channel from the menu
6. **Save** the step
7. **Publish** your flow

&#x20;

### Step four: Set up the engage flow

1. Download the pre-made [TGAM - Engage flow](https://drive.google.com/file/d/1e1sz0u2nmc09V3bvWwCM-PJndPATqKa0/view?usp=sharing)
2. Navigate to [Flow Builder](https://dashboard.messagebird.com/en/flow-builder)
3. Click on **Import flow** and import your TGAM - Engage flow
4. Go to the **Omni-channel step** and select your Telegram channel from the menu<br>

   <figure><img src="/files/G5wFOiaeEHT3M1Nzga4H" alt=""><figcaption></figcaption></figure>
5. Go to the **Webhook URL of TGAM - B2C** step and replace the URL with the TGAM B2C URL you copied in step one. **Save** the step<br>

   <figure><img src="/files/4Ax9J5rr29S73X0bGb15" alt=""><figcaption></figcaption></figure>
6. Go to the **Webhook URL of TGAM - B2B** step and replace the URL with the TGAM B2B URL you copied in step two. **Save** the step
7. Because the customer will start the conversation, the customer Telegram ID can be retrieved via our conversation API. Go to the **Fetch customer telegram ID** step and add your MessageBird access key in the Authorization header<br>

   <figure><img src="/files/oMWiV3L7DliLJUdNwjXE" alt=""><figcaption></figcaption></figure>
8. Go to the **Set variables** step. This flow is set up to fetch the driver **TelegramID**, which it is assumed you have collected and stored at a previous stage, such as during the driver onboarding. For demonstration purposes, just add your **TelegramID**, which you can fetch using our conversation API. **Save** the step
9. **Publish** your flow

&#x20;

### Step five: Test your Telegram Account Masking bot

1. Add your Telegram bot username to the following deep link<br>

   <pre><code><strong>https://t.me/&#x3C;bot username>
   </strong></code></pre>
2. Send the link to your **conversation buddy** (someone who can help you test the flow)
3. Your buddy must reply with the following, which will trigger the Telegram Account Masking bot&#x20;

   ```
   #tgam
   ```
4. You will receive their message. Respond to start the masked conversation!


---

# 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.bird.com/connectivity-platform/how-to-guides/set-up-telegram-account-masking.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.
