WordPress Telegram Bot - Use Case - How to Automatically Store Files from a Telegram Group or Channel in WordPress and Send via Email
Use Case - How to Automatically Store Files from a Telegram Group or Channel in WordPress and Send via Email
Note: This guide requires:
- WordPress Telegram Bot - This document uses version 1.1.7.
Introduction
WordPress Telegram Bot is a WordPress plugin that allows you to send automatic messages, emails and SMS based on Telegram conversations and much more. You can use the WordPress Telegram Bot plugin to automate business workflows involving the messenger app.
Main functionalities:
- Email Repeater - Send messages sent on a Telegram group to one or many emails. Mark words as “stop words” to prevent them from triggering the bot.
- Personal Messages - Mention a user after certain words or expressions are sent to the group together with a message to this user.
- Group Messages - Emit message to all users based on certain conditions in a specific group.
- SMS Repeater - Send a copy of Telegram group conversations to a mobile device.
- SMS Alerts - Send notifications to multiple phone devices whenever certain keywords are used.
- WordPress Repeater - Store all messages from a specific group or several groups in WordPress and output the content using a shortcode.
- Storing Files - Copy files that were posted in groups or channels to your WordPress site storage.
Use Case Front-End
Links to stored files in the back-end log:

Links to stored files in the front-end log:

Sending links to files via email:

Use Case Assumptions
In this example we will consider how to store files posted in Telegram groups and channels, and how to send links to files stored from groups via email.
Requirements
- The WordPress Telegram Bot plugin will only work on sites with installed SLL certificates (HTTPS).
- You cannot use the same access token (bot API) on different sites.
- The bot may not perform properly with supergroups.
It follows:
- Installing the plugin
- Enabling the file storage feature
- Log of stored files
- Stored files in WordPress repeater log
- Sending links to stored files via email
- End result
Installing the Plugin
The process is the same for all CM plugins and add-ons.

- Download the plugin from your customer dashboard.
- Log in to WordPress and navigate to the WordPress Admin → Plugins settings.
- Click on Add New.
- Activate it and add the license.
Learn more: Getting Started - Plugin Overview
Quick Recap
In this use case guide, we will consider only how to store files from your Telegram groups and channels. Learn more about the plugin configuration in these user guides:
- WordPress Telegram Bot - Telegram - Creating a Bot and Connecting it to Plugin
- WordPress Telegram Bot - Telegram - Adding Bot to Group or Channel as Admin
- WordPress Telegram Bot - Rules - Personal Messages / Group Messages
- WordPress Telegram Bot - Rules - Channel Messages
- WordPress Telegram Bot - Rules - WordPress Repeater
- WordPress Telegram Bot - Rules - Email Repeater
You can also check the following use case guides:
Enabling the File Storage Feature
First, navigate to Admin Dashboard → CM Telegram Bot → Settings → General Settings tab.

Scroll down and find the section Storing Files Settings. There you need to configure the following settings:

- Enable storing files - Turn on this option.
- Where to store files - Define the folder where the files should be saved. It will be created at the following path: /wp-content/uploads/
- Supported file extensions - Define the list of file types you want to store. Separate them with a comma.
Then click the button Save.
Once it's done, the supported file extensions posted in your Telegram groups or channels will be automatically saved to your WordPress site storage.
Now let's post a couple of messages with attached files.
We will post 1 file in the Telegram group:

And 3 files in the Telegram channel:

And then check where you can view these files.
Log of Stored Files
Navigate to Admin Dashboard → CM Telegram Bot → Log.

Here you can check the log of all messages posted in your Telegram groups and channels. Once some file or multiple files are posted in one of the groups, they will be shown in the log in the column Message. Each file has links to View or Download it.

And in the column Action you can see the source of the message.
Stored Files In WordPress Repeater Log
It works similarly with WordPress Repeater.
WordPress Repeater allows you to display the same log on the front-end. You can display either the whole log or only certain message categories. Learn more.
Once files are posted in a Telegram group or channel, users will be able to see them in the log on the front-end:

Sending Links to Stored Files via Email
The plugin also allows you to send links to stored from a Telegram group files to the specified email address.
To configure it, navigate to the Admin Dashboard → CM Telegram Bot → Settings → Email Repeater tab.

Here you can create and edit rules for replicating messages from Telegram groups to email. For each rule you can define the email template.
Learn more about setting up rules for Email Repeater.
To send file links in the email, you need to add a placeholder {file} to the email template, then save the settings:

Once it's done, each message posted in the specified group will be replicated to the email.
Let's post a message in a Telegram group with multiple files:

And here's an email example:

In the log, you can also see a record about if the email was sent successfully:

End Result
Following instructions found in the plugin and guides, you should be able to store files posted in Telegram groups and channels, and to send links to files stored from groups via email.
Use Case Front-End
Links to stored files in the back-end log:

Links to stored files in the front-end log:

Sending links to files via email:

![]() |
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 |