> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# woltsu/telegram

Add custom Telegram notifications into your CircleCI projects. View this orb's source: https://github.com/woltsu/telegram-orb.


## Commands

### getchat

A method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.) Returns a Chat object on success.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |
| `telegram-chat-id` | env_var_name | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id
 |

### getme

A simple method for testing your bot's auth token. Returns basic information about the bot in form of a User object.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |

### greet

Sends a greeting message to the specified Telegram chat.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |
| `telegram-chat-id` | env_var_name | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id
 |

### notify

Sends a custom message to the specified Telegram chat.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `disable_notification` | boolean | false | Sends the message silently. Users will receive a notification with no sound. |
| `message` | string | Message from CircleCI. | Enter a custom message. |
| `parse_mode` | string | none | Use `Markdown` or `HTML`, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. |
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |
| `telegram-chat-id` | env_var_name | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id
 |

### sendgif

Sends an animated image to the specified Telegram chat.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `gif-url` | string |  | Enter the animated image's URL. |
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |
| `telegram-chat-id` | env_var_name | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id
 |

### sendphoto

Sends an image to the specified Telegram chat.


| Parameter | Type | Default | Description |
|---|---|---|---|
| `image-url` | string | null | Enter the image's URL. |
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |
| `telegram-chat-id` | env_var_name | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id
 |

### sendsticker

Sends a sticker to a given chat


| Parameter | Type | Default | Description |
|---|---|---|---|
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |
| `telegram-chat-id` | env_var_name | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id
 |
| `telegram-sticker` | string |  | Enter a sticker file_id to send a file that exists on the Telegram servers or an HTTP URL as a String for Telegram to get a .webp file from the Internet
 |

## Jobs

### notify

Notify Telegram

| Parameter | Type | Default | Description |
|---|---|---|---|
| `disable_notification` | boolean | false | Sends the message silently. Users will receive a notification with no sound. |
| `message` | string | Job Message from CircleCI! | Enter custom message. |
| `parse_mode` | string | none | Use `Markdown` or `HTML`, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bot's message. |
| `telegram-bot-token` | env_var_name | TELEGRAM_BOT_TOKEN | Name of environment variable storing your Telegram bot token
 |
| `telegram-chat-id` | env_var_name | TELEGRAM_CHAT_ID | Name of environment variable storing your Telegram chat id
 |

## Executors

### default

## Examples

### getchat

Get information about telegram channel.

```yaml
jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - telegram/getchat
orbs:
  telegram: woltsu/telegram@x.y.z
version: 2.1
workflows:
  your-workflow:
    jobs:
      - build
```

### getme

Get information about bot

```yaml
jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - telegram/getme
orbs:
  telegram: woltsu/telegram@x.y.z
version: 2.1
workflows:
  your-workflow:
    jobs:
      - build
```

### greet

Greet a telegram channel.

```yaml
jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - telegram/greet
orbs:
  telegram: woltsu/telegram@x.y.z
version: 2.1
workflows:
  your-workflow:
    jobs:
      - build
```

### notify

Send a notification to a telegram channel.

```yaml
jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - telegram/notify:
          message: Custom notification message.
orbs:
  telegram: woltsu/telegram@x.y.z
version: 2.1
workflows:
  your-workflow:
    jobs:
      - build
```

### sendgif

Send an animated image to a telegram channel.

```yaml
jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - telegram/sendgif:
          gif-url: https://www.example.com/img.gif
orbs:
  telegram: woltsu/telegram@x.y.z
version: 2.1
workflows:
  your-workflow:
    jobs:
      - build
```

### sendphoto

Send an image to a telegram channel.

```yaml
jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - telegram/sendphoto:
          image-url: https://www.example.com/img.jpg
orbs:
  telegram: woltsu/telegram@x.y.z
version: 2.1
workflows:
  your-workflow:
    jobs:
      - build
```

### sendsticker

Send a sticker to a telegram channel.

```yaml
jobs:
  build:
    docker:
      - image: <docker image>
    steps:
      - telegram/sendsticker:
          telegram-sticker: >-
            https://raw.githubusercontent.com/TelegramBots/book/master/src/docs/sticker-fred.webp
orbs:
  telegram: woltsu/telegram@x.y.z
version: 2.1
workflows:
  your-workflow:
    jobs:
      - build
```