# Attachment tab

This block supports the following attachment types:

* Link
* Video
* Image
* File
* Audio

<div data-with-frame="true"><figure><img src="/files/H26WZHLRG7sXm4Qmp8RC" alt=""><figcaption></figcaption></figure></div>

{% hint style="warning" %}
In a single block, you CANNOT combine different types of attachments!

Attachments uploaded to the builder must not exceed 20 MB.

Sending up to 10 attachments of the <mark style="color:red;">**same type**</mark> in one block is allowed.
{% endhint %}

You can also generate an image using the **"Generate image"** button and send it to your client.

<div data-with-frame="true"><figure><img src="/files/03lOKmCb7xbxwapCVg4p" alt="" width="375"><figcaption></figcaption></figure></div>

## How to send attachments

To send an attachment, create an empty block and open the block editor (right menu).

{% hint style="danger" %}
Important!&#x20;

1. The uploaded attachment must not exceed 20 MB. Sending up to 10 attachments of the <mark style="color:red;">**same type**</mark> in one block is allowed.
2. It is not recommended to <mark style="color:red;">**send a block with multiple attachments**</mark> in a broadcast to avoid hitting the API limits of different messengers.
3. <mark style="color:red;">**DO NOT**</mark> assign the <mark style="color:red;">**same name**</mark> to different attachments **within one project**!
4. If you upload a new attachment with the same name as an existing one, the system will deliver the original file. To prevent errors and ensure correct block operation, always assign unique names to your attachments.
   {% endhint %}

{% hint style="warning" %}
**Please note!**

**Telegram specifics:**

* Buttons <mark style="color:red;">**will NOT appear**</mark> when sending more than one attachment in a block.
* *Exception:* If the block’s text exceeds 1024 characters, the message will be split into two — buttons will appear with the text, and attachments will be sent in a separate message.
* Markdown and HTML text formatting do **not** work when sending more than one attachment in a block.
  {% endhint %}

All attachment settings are located within the block settings, accessible by clicking the **"Attachment"** button.

<div data-with-frame="true"><figure><img src="/files/QkKAUh4KXd6VSUkCZaIc" alt="" width="375"><figcaption></figcaption></figure></div>

&#x20;Let’s take a closer look at the newly appeared buttons for attachment types.

### Link

The first button is **Link**:

<div data-with-frame="true"><figure><img src="/files/adE5HtZdqEIw1wPUWMmP" alt="" width="563"><figcaption></figcaption></figure></div>

1. Click the button to reveal the attachment settings.
2. **Option A:** rnter a URL in the provided field to share a link.
3. **Option B:** upload a file; it will be presented to the client as a separate download link.

{% hint style="info" %}
The attached file will be sent as a link from the mavibot.ai server.
{% endhint %}

{% hint style="info" %}
An uploaded file takes priority over a link. If both are provided, the uploaded file will be sent.
{% endhint %}

There are three checkboxes below the URL field:

<div data-with-frame="true"><figure><img src="/files/wFBlad8jo1sy6HL0UhJg" alt="" width="245"><figcaption></figcaption></figure></div>

1. **Click notification:** When enabled, the bot will log a user's click by sending a message in the format `link_was_pressed [link1] [link2]`.

<div data-with-frame="true"><figure><img src="/files/Vji6hFhDlEank3AZNB6u" alt="" width="320"><figcaption></figcaption></figure></div>

What is this used for?

<div data-with-frame="true"><figure><img src="/files/BENCdKyGbNxI05jOilZD" alt="" width="375"><figcaption></figcaption></figure></div>

This event allows you to track which users clicked a link. When the checkbox is enabled, the system sends a callback to the dialog in the format:

`link_was_pressed {url}` &#x20;

In this callback, `link_was_pressed` is a fixed prefix, and `{url}` is a variable representing the specific URL you configured in the block.

<div data-with-frame="true"><figure><img src="/files/tAD4f0Eew41k2qn7o2ZE" alt="" width="563"><figcaption></figcaption></figure></div>

For instance, you can follow up by sending reminders to clients.

{% hint style="info" %}
To learn how to set up the bot's response to a link click callback, see the section below titled [Tracking Link Clicks.](#tracking-link-clicks)
{% endhint %}

You can set your own domain for generating links with click notifications.

To do this, go to your project settings:

<div data-with-frame="true"><figure><img src="/files/QhSEgWhTx0CXzHDex0Ir" alt=""><figcaption></figcaption></figure></div>

Click the “Set custom domain...” button and enter your domain in the modal window:

<div data-with-frame="true"><figure><img src="/files/4BP5aQsxVwa164M5Q2W9" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %}
[The process of creating and setting up a custom domain is explained here.](/websites/sites/builder.md#domain)
{% endhint %}

When click notification is enabled, the link sent to the user will be formatted as follows:

`https://{your_domain}/{proxy_id}/s`

<div data-with-frame="true"><figure><img src="/files/9D0UDsl0zdHvXa1dJ9Aq" alt="" width="375"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/tKm8VKluuPJ2hcFxm1M6" alt="" width="375"><figcaption></figcaption></figure></div>

2. **"Show link preview"** checkbox

<div data-with-frame="true"><figure><img src="/files/Tm2pbuxVlhkAhkObQoYz" alt="" width="344"><figcaption></figcaption></figure></div>

This generates a rich link preview in the messenger, allowing the user to see a snippet of the file's content (like a title, image, or description) before opening it.

3. **"Image below text"** checkbox

<div data-with-frame="true"><figure><img src="/files/sPWNLQUs7NpTPwN8nNuj" alt="" width="375"><figcaption></figcaption></figure></div>

### Video attachment

Video attachment button

<div data-with-frame="true"><figure><img src="/files/c6wPC1FkGzHL4nJiv1uu" alt="" width="375"><figcaption></figcaption></figure></div>

Use this option when sending videos. By default, WhatsApp only displays videos as links.

**To display YouTube videos as links in&#x20;*****all*****&#x20;messengers:**

* Shorten the URL using any URL shortener, or
* Send it as an attachment with **click notification** enabled.

{% hint style="info" %}
Note!&#x20;

Telegram automatically converts small video attachments (under \~2 MB) into GIFs.
{% endhint %}

For large videos stored in external storage, it's better to attach them as links. The block has a direct upload limit of 20 MB for video files.

{% hint style="warning" %}
Please note!&#x20;

The video is attached in MP4 format.
{% endhint %}

<div data-with-frame="true"><figure><img src="/files/SP3Qe6odzCuFy6RTsucV" alt="" width="375"><figcaption></figcaption></figure></div>

### Image

**"Image" button** — use it to send the necessary images in the bot.

<div data-with-frame="true"><figure><img src="/files/BURNkHqyBdZKaT14S0FC" alt="" width="563"><figcaption></figcaption></figure></div>

Like any other attachment, an image can be uploaded directly from your computer or by specifying its URL.

### File

**File** icon — use it to send documents and any other files.

<div data-with-frame="true"><figure><img src="/files/OfVgisN7a6a43a6cLKXB" alt="" width="563"><figcaption></figcaption></figure></div>

### **Audio**

**Audio Icon:** use this icon when attaching or sending a file in an audio format (e.g., MP3, WAV).

<div data-with-frame="true"><figure><img src="/files/RMncZLl8ue0yu0idYUmw" alt="" width="563"><figcaption></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="/files/tYbnVgGw0WJ3La7rKMLK" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="warning" %}
For Instagram, the file format should be .m4a.
{% endhint %}

## Sending multiple files

To send multiple attachments (videos, files, images, or audio):

1. Navigate to the **"Attachment"** section in the block editor.
2. Select the desired attachment type.
3. Upload the required files one by one.

<div data-with-frame="true"><figure><img src="/files/GI0SUJRna5gM0BWSb0l6" alt="" width="563"><figcaption></figcaption></figure></div>

{% hint style="info" %} <mark style="color:red;">**Please be aware of the following constraints when sending multiple attachments:**</mark>

**General limits:**

* **Quantity:** you can add up to 10 files of the same type simultaneously.
* **Size:** each individual file must not exceed 20 MB.

**Telegram-specific behavior:**

* **Text formatting:** markdown or HTML formatting is disabled in messages containing multiple files.
* **Buttons:** interactive buttons are not delivered with multiple file attachments.
  {% endhint %}

**In Telegram:**&#x20;

* Buttons are disabled when a block contains more than one attachment.

*<mark style="color:blue;">Exception:</mark>* If the block text exceeds 1024 characters, the message is split. The buttons will be sent with the text, while the attachments are delivered in a separate message.

* <mark style="color:red;">**Markdown and HTML text formatting do not work**</mark> when sending more than one attachment in a block.

### Sending attachments: examples

Let's proceed with practical examples. We will configure the bot to send messages automatically at 2-second intervals.

In each example block, we will include a different type of attachment to demonstrate how they are displayed in Telegram.

<div data-with-frame="true"><figure><img src="/files/fTC9ZW87VTKlRQy4HBhz" alt=""><figcaption></figcaption></figure></div>

The example flow demonstrates different attachment types—file, link, video, image, and audio—sent sequentially with a 2-second delay.

<div data-with-frame="true"><figure><img src="/files/HBFrDLmjy4zkqVqc4Q1a" alt="" width="375"><figcaption></figcaption></figure></div>


---

# 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.mavibot.ai/chatbot/builder/attachments/tab.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.
