WordPress Telegram Bot - Rules - Channel Messages


Channel Messages


What This Rule Does

Note: this feature was introduced in version 1.0.6 of the WordPress Telegram Bot plugin.

Sends a Telegram message to the public channel when the specified words/phrases are detected. You can configure a series of filters, explained below.

Channel message example

The first posted message contains words that trigger posting automatic message. The second posted message contains a stop word, so it doesn't trigger posting automatic message:

Front-end example of automatic posts in Telegram channel - WordPress Telegram Plugin
Front-end example of automatic posts in Telegram channel

Important

This feature works only with Public channels, and doesn't work with Private channels.

Telegram Channel Types - Telegram WordPress Widget
Telegram Channel Types

Setting Up a Rule

Creating a rule for automatic posting in Telegram channel - Telegram Plugin for WordPress
Creating a rule for automatic posting in Telegram channel
  • Restrict to channel ID - Include one or multiple public channels. The channel ID can be found in the Channel Info - it's a part of the link that goes right after "t.me/". In the example below it's "creativemindstest".

    How to find a Telegram channel ID - Telegram Group Bot Manager
    How to find a Telegram channel ID
  • Telegram channel message - The message to be sent to the channel.
  • Detect phrases - The rule will only run if it DOES include AT LEAST ONE of these words.
  • Status - Set the rule as active or paused.
  • Must not include - The rule will only run if it DOES NOT include ANY of these words.
  • Must include - The rule will only run if it DOES include ALL of these words.
  • Snooze for / Hours - Set a number in hours. After the rule is activated, it will "snooze" for x hours before being ready to activate again. Useful to avoid spamming.
  • Execute every / detection - Execute the rule after every x times the trigger is activated.  For example if detection is set to 3 the rule will be set on the following 1,4,7.
    • Reset Count - Click the button to set the count of "Execute every" to 0. Example: the rule is executed every 10 messages and 9 have been sent, so it will be executed again in the next message. Click on Reset Count and the rule will require 10 messages to be sent again.
  • Fire Shortcodes - You can place here one or multiple shortcodes which should be executed on the site running the bot once the message has been fired. The output of this shortcode will be printed to the telegram channel associated with this message. Have a note that not all shortcodes can be executed in order to print the output in Telegram channel. Learn more about how it works below.

Keyword Conditions Summary

Within this rule, you can set three conditions involving keywords. They all work in tandem.

For example, if you have these:

  • Detect phrase(s) - "Hello", "Hi", "Hey"
  • Must not include - "out"
  • Must include - "work"

The following will happen with each message:

  • "Hi, it's Monday and today is a good day to work" - Will trigger the rule, because it contains "Hi" and "work".
  • "Monday is a good day to work" - Will not trigger the rule, because it doesn't have "Hello", "Hi" or "Hey".
  • "Hello, I'm out of work today, will be available on Tuesday" - Will not trigger the rule, because it has "out"

Front-end Example

In the example below you can see 2 cases:

  1. First message contains words specified in options Detect phrases ("hi") and Must include ("work"). As a result, it triggers automatic message by the bot.
  2. Second message contains words specified in options Detect phrases ("hello") and Must include ("work"), but it also contains a word specified in the option Must not include ("out"). As a result, the bot doesn't post automatic message.
Front-end example of automatic posts in Telegram channel - Telegram Bot Plugin for WordPress
Front-end example of automatic posts in Telegram channel

More information about the WordPress Telegram Bot plugin

Other WordPress products can be found at CreativeMinds WordPress Store

Let us know how we can Improve this Product Documentation Page

To open a Support Ticket visit our support center
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.