Справочник Action
| Input | Required | Default | Description |
|---|---|---|---|
bot_token |
yes | — | Telegram bot token (use a repository secret). |
chat_id |
yes | — | Target chat: an integer id (possibly negative) or @channelusername. Exactly one chat — the comma-separated form accepted by v1.5 was removed in v2. To notify several chats, use a job matrix or repeat the step. |
status |
yes | — | Job status to report. Must be passed explicitly from the workflow, typically from the job.status or needs. |
parse_mode |
no | MarkdownV2 |
Telegram parse_mode: MarkdownV2 (default), HTML, Markdown, or none. |
notify_on |
no | success,failure,cancelled |
Comma-separated list of statuses that should trigger a notification. any or all means every status. |
message |
no | — | Verbatim message text. Overrides every template. No placeholder substitution and no escaping are applied. |
message_template |
no | — | Template string with {{.Field}} placeholders, used for all statuses not overridden by template_ |
template_success |
no | — | Template used when status=success. Overrides message_template. |
template_failure |
no | — | Template used when status=failure. Overrides message_template. |
template_cancelled |
no | — | Template used when status=cancelled. Overrides message_template. |
template_skipped |
no | — | Template used when status=skipped. Overrides message_template. |
disable_web_page_preview |
no | true |
Suppress link previews. Sent as link_preview_options.is_disabled; the flat field Telegram deprecated is no longer used. |
disable_notification |
no | false |
Send the message silently (no sound for recipients). |
message_thread_id |
no | — | Forum-chat thread (topic) ID. Integer. |
fail_on_error |
no | false |
If true, the action exits non-zero when the Telegram request ultimately fails. Default false keeps the job result intact. |
edit_message_id |
no | — | If set, the message is edited via editMessageText instead of sent fresh. One integer, typically wired from the message_id output of an earlier notiflow step. disable_notification and message_thread_id are dropped when editing, because Telegram rejects them there. |
version |
no | — | notiflow release to install. Empty pins to the version stamped in the Action tree; “latest” resolves the newest release at run time. |
verify_signature |
no | false |
Verify the release archive with cosign before installing. Requires sigstore/cosign-installer earlier in the job. |
github_token |
no | ${{ github.token }} |
Token used to call the GitHub Releases API when resolving “latest”. |
| Output | Description |
|---|---|
ok |
true when the message was delivered, false otherwise. |
message_id |
Telegram message_id on success, empty otherwise. A single value — v1 returned a comma-separated list for multi-chat sends. |
http_status |
HTTP status of the last attempt (0 when skipped or when no response arrived). |
error |
Failure reason — Telegram .description when available, otherwise a synthesized reason. Empty on success and on skip. |
Замечания по отдельным входам
Заголовок раздела «Замечания по отдельным входам»Обязателен, без дефолта. Манифест composite action вычисляет выражения ${{ }} при
загрузке, до появления контекста job, поэтому default: ${{ job.status }} уронил бы весь
workflow с Unrecognized named-value: 'job'. Передавай из вызывающего кода:
${{ job.status }} внутри job, ${{ needs.<job>.result }} из другого.
chat_id
Заголовок раздела «chat_id»Один чат. Целое (отрицательное для групп и супергрупп) либо @channelusername из 4–32
словных символов. Запятая отклоняется с кодом 11, см.
гайд по миграции.
parse_mode
Заголовок раздела «parse_mode»MarkdownV2 (по умолчанию), HTML или none. Markdown принимается как алиас
MarkdownV2 и печатает предупреждение: notiflow экранирует значения по правилам V2, и
отдавать такое легаси-парсеру Telegram — значит получить битое или отклонённое сообщение.
disable_web_page_preview
Заголовок раздела «disable_web_page_preview»Имя входа не изменилось с v1, но на проводе теперь
link_preview_options.is_disabled — плоское поле Telegram задепрекейтил.
edit_message_id
Заголовок раздела «edit_message_id»Превращает вызов в editMessageText. disable_notification и message_thread_id при
редактировании отбрасываются: Telegram их там не принимает, и передача превратила бы
рабочую конфигурацию в 400.
fail_on_error
Заголовок раздела «fail_on_error»По умолчанию false. Неудачное уведомление не затирает результат, который реально дал job;
ставь true, когда доставка — часть контракта.
Переменные окружения
Заголовок раздела «Переменные окружения»Обвязка отображает каждый вход в переменную NF_* и передаёт бинарю. Ещё две читаются
напрямую, и обе ограничены внутри workflow:
| Переменная | Смысл |
|---|---|
NF_API_BASE |
Базовый URL Bot API. Внутри Actions учитываются только https://api.telegram.org и loopback — всё остальное игнорируется с предупреждением, чтобы переменная, выставленная предыдущим шагом того же job, не увела токен. |
NF_BIN |
Путь к бинарю; нужен, чтобы гонять обвязку против локальной сборки. |
В CLI --api-base принимает любой http(s) URL: self-hosted Bot API — легитимный
сценарий, и там значение выбирает сам пользователь.