> For the complete documentation index, see [llms.txt](https://waba.docs.olchat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://waba.docs.olchat.io/roboty-i-aktiviti/roboty-i-aktiviti-biznes-processov/otpravit-shablonnoe-soobshenie-s-failom.md).

# Отправить шаблонное сообщение с файлом

{% hint style="info" %}
Данная статья в качестве примера рассматривает отправку роботом шаблонного сообщения с изображением, но принцип работы робота подходит также и под отправку шаблона с документом, аудио- или видеофайлом.
{% endhint %}

Для того, чтобы отправлять сообщения с файлом с помощью робота, выполните следующие действия:

{% stepper %}
{% step %}
Скопируйте шаблон с изображением из приложения Олчат WABA.

Вставьте ссылку на изображение: прямую или с помощью параметра DISK\_<mark style="color:red;">ID</mark>, где <mark style="color:red;">ID</mark> (идентификатор) — это ID файла на Битрикс.Диске, а затем нажмите кнопку «Скопировать шаблон».

{% hint style="success" %}
Воспользуйтесь [данной инструкцией](/roboty-i-aktiviti/nastroika-otpravki-faila-v-zavisimosti-ot-istochnika.md#ukazanie-id-otpravlyaemogo-faila), чтобы узнать, где взять ID файла на Битрикс.Диске.
{% endhint %}

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

В буфер обмена будет скопировано следующее:

> \[template=ru]<mark style="color:red;">kartinka</mark>\[/template]\[header=image]<mark style="color:green;">DISK\_3283</mark>\[/header]

В данном случае <mark style="color:red;">kartinka</mark> — название шаблона, а <mark style="color:green;">DISK\_3283</mark> — ссылка на изображение, хранящееся на Битрикс.Диске, которое будет отправлено вместе с сообщением.
{% endstep %}

{% step %}
В карточке лида перейдите на вкладку «Роботы».

<figure><img src="/files/6c1F60Fmd54YoSulR3sj" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Нажмите «+ Создать», затем выберите стадию, на которую необходимо добавить робота, далее в меню выберите «Другие роботы» → \[Олчат WABA] Отправить сообщение.

<figure><img src="/files/31GbPmKn3KPPmbw6NYJ1" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
В настройках робота укажите линию (1), через которую будут отправляться сообщения с изображением, вставьте переменную контакта (2), затем вставьте скопированный ранее шаблон в поле «Текст сообщения» (3).

При необходимости измените остальные настройки, выставленные по умолчанию, и нажмите кнопку «Сохранить».

<figure><img src="/files/yB1mm730VEeD92NHe9fM" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Сообщение, полученное клиентом в WhatsApp, имеет следующий вид:

<figure><img src="/files/y27HHyjiUcsrSniZ9A0O" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
Настройка робота завершена.
{% endstep %}
{% endstepper %}


---

# 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://waba.docs.olchat.io/roboty-i-aktiviti/roboty-i-aktiviti-biznes-processov/otpravit-shablonnoe-soobshenie-s-failom.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.
