Green API
Отправка WhatsApp-сообщений, файлов и интерактивных кнопок через Green API (российский WhatsApp BSP)
Green API — это русское решение WhatsApp Business Business Solution Provider offering a REST API для sending messages, files, и interactive buttons. It supports individual WhatsApp number instances и — это widely used in Russian e-commerce и customer service automation.
С помощью Green API интеграции в AACFlow можно:
- Отправить messages: Deliver text messages to any WhatsApp number
- Отправить files: Share documents, images, и other files с recipients
- Отправить buttons: Отправить interactive button messages для guided conversations
- Получить notifications: Poll incoming webhook notifications from the instance
- Проверить instance state: Verify the authorization и connection status of your WhatsApp instance
Эта интеграция позволяет automated WhatsApp messaging workflows для customer communications и notifications.
Инструкции по использованию
Интегрируйте Green API в рабочий процесс. Требуетсяn Instance ID и API Token Instance from your Green API account at app.green-api.com.
Инструменты
green_api_send_message
Отправить a text message via WhatsApp
Входные параметры
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
idInstance | string | Да | Green API instance ID |
apiTokenInstance | string | Да | Green API instance token |
chatId | string | Да | Recipient chat ID (e.g. 79001234567@c.us) |
message | string | Да | Text message to send |
Выходные данные
| Параметр | Тип | Описание |
|---|---|---|
idMessage | string | ID of the sent message |
success | boolean | Произошла ли message was sent |
green_api_send_file
Отправить a file via WhatsApp
Входные параметры
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
idInstance | string | Да | Green API instance ID |
apiTokenInstance | string | Да | Green API instance token |
chatId | string | Да | Recipient chat ID |
urlFile | string | Да | URL of the file to send |
fileName | string | Да | File name including extension |
caption | string | Нет | File caption |
Выходные данные
| Параметр | Тип | Описание |
|---|---|---|
idMessage | string | ID of the sent message |
success | boolean | Произошла ли file was sent |
green_api_send_buttons
Отправить an interactive buttons message
Входные параметры
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
idInstance | string | Да | Green API instance ID |
apiTokenInstance | string | Да | Green API instance token |
chatId | string | Да | Recipient chat ID |
message | string | Да | Button message text |
footer | string | Нет | Footer text |
buttons | array | Да | Массив button objects |
Выходные данные
| Параметр | Тип | Описание |
|---|---|---|
idMessage | string | ID of the sent message |
success | boolean | Произошла ли message was sent |
green_api_get_notifications
Poll incoming notifications from the instance
Входные параметры
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
idInstance | string | Да | Green API instance ID |
apiTokenInstance | string | Да | Green API instance token |
receiveTimeout | number | Нет | Long poll timeout in seconds |
Выходные данные
| Параметр | Тип | Описание |
|---|---|---|
notifications | array | Массив notification objects |
receiptId | number | Receipt ID for deletion |
green_api_get_state_instance
Проверить состояние авторизации of the instance
Входные параметры
| Параметр | Тип | Обязательный | Описание |
|---|---|---|---|
idInstance | string | Да | Green API instance ID |
apiTokenInstance | string | Да | Green API instance token |
Выходные данные
| Параметр | Тип | Описание |
|---|---|---|
stateInstance | string | Instance state (authorized, notAuthorized, blocked, etc.) |
Ссылки
- Official API: https://green-api.com/docs/api/
- AACFlow block source: apps/aacflow/blocks/blocks/green-api.ts

