Automatically Post on Telegram  Step by Step Guide ▷ 2021

In addition to sending and receiving instant messages, making voice calls, sharing and obtaining multimedia files, Telegram is an application that provides numerous functionalities for optimize user experience. Which has helped her gain popularity.

Many of these functions, They are useful to promote a certain company, business or personal brand. Well, through groups or channels, it allows spread the content of social networks or websites in order to attract a larger audience.

Thus, the fact of automatically publishing in a Telegram channel or group is effective for improve productivity regarding this marketing strategy. Following, you will learn how to do it.

What are the benefits of creating a channel or group that updates automatically?

In view of the Telegram groups allow to add up to 200,000 people and the channels do not have a limit number of subscribersIt is advantageous to create these spaces to publish the contents of your social networks or website, especially if it is done automatically. In that way it will be more feasible to attract the attention of your target audience.

Therefore, the benefits of automatically updating said groups or channels of the platform lie in:

  • Spread content quickly.
  • Boost conversational marketing in order to produce active communication with the participants.
  • Keep informed a large number of users about the actions of your social networks or website.
  • Encourage the interest towards your brand on the part of your target audience.
  • Get greater productivity when it comes to nurturing your activity on Telegram.
  • Loyalty to your subscribers through the current and suggestive content that you create on other sites, in real time.

Learn step by step how to automatically publish content from your social networks or website on your Telegram channel

A form of link Telegram with your other social media profiles and website, consists of making the required configuration for publish content automatically, without having to worry about doing it manually.

Therefore, here we show you the steps to follow to carry it out:

From WordPress

From WordPress

There are numerous people, brands and companies that manage this content management system focused on the creation of any type of web page such as the main tool to centralize your Internet traffic.

Therefore, we begin by explaining the steps to follow to instinctively publish content uploaded from WordPress on Telegram:

Create a bot in Telegram

  • Find the named bot “BotFather” on Telegram directly.
  • When you display the chat window, select the “Start” button on the bottom.
  • In the text field, type “/ newbot” (without the quotes) and this will return a message asking for the name of your bot.
  • Add whatever name you want. It is relevant that this ends in “bot”, for example: WordBot.
  • Proceed to complete the profile of your bot, editing your profile. You can use the following commands to do this:
  • / setname: to change the name.
  • / setuserpic: to modify the profile picture.
  • / setabouttext: to improve the information that appears about it.
  • / setdescription: to put another description of the bot.

All of this will allow you have a token assigned which can be used in external applications.

Make a plugin in WordPress

Although there are different methods, one of the simplest is to use the file known as “Functions.php” that it is a generic action that can be called every time a certain post changes state. However, to avoid losing all the changes made, it is recommended to put a name to the plugin (such as intewo) and it can be composed in two files that are: “Intewo.php” and “Inc / integration.php”. With this, it will be much more organized.


The content of “intewo.php” could be:

<?php

 

/*

Plugin Name: intewo

Plugin URI: https://www.atareao.es/

Description: A plugin to integrate Telegram with WordPess.

Version: 1.0

Author: Lorenzo Carbonell

*/

 

define ('__PLUGIN_DIR_PATH__', plugin_dir_path(__FILE__));

require_once(__PLUGIN_DIR_PATH__ . '/inc/integracion.php');

The content of “inc / integration.php” is the most interesting because it has several functions, one of the most relevant is “http_post” which is used to send content:

function http_post($url, $json)

{

$ans = null;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

try

{

$data_string = json_encode($json);

// Disable SSL verification

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");

curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

// Will return the response, if false it print the response

curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(

'Content-Type: application/json',

'Content-Length: ' . strlen($data_string))

);

$ans = json_decode(curl_exec($ch));

if($ans->ok !== TRUE)

{

$ans = null;

}

}

catch(Exception $e)

{

echo "Error: ", $e->getMessage(), "n";

}

curl_close($ch);

return $ans;

}

In addition, in order to send text to Telegram, it is suggested to create two functions starting from a basic one that will be “sendMessage” and it looks like this:

function sendMessage($chat_id, $text)

{

global $URL;

$json = ['chat_id'       => $chat_id,

'text'          => $text,

'parse_mode'    => 'HTML'];

return http_post($URL.'/sendMessage', $json);

}

Integrate Telegram with WordPress

With all the necessary tools, it is time to make use of a hook known as “transition_post_status” which allows both platforms to be easily integrated and occurs every time a post changes its status.

For example, if you want a scheduled post to be sent to a Telegram channel as soon as it is published, the function is as follows:

function post_published_notification( $new_status, $old_status, $post)

{

if($old_status != 'publish' && $new_status == 'publish')

{

global $CHANNEL;

// vars

$title = $post->post_title;

$ID = $post->ID;

$permalink = get_permalink($ID);

// msg

$msg = "Nuevo artículo publicado, <a href="https://internetpasoapaso.com/publicar-automaticamente-en-telegram/$permalink">Title</a>";

sendMessage($CHANNEL, $msg);

}

}

Adding the function to the hook, starting from the following line:

  • add_action( 'transition_post_status', 'post_published_notification', 10, 3);

From Instagram

From Instagram

In this case, it is indicated connect Telegram with IFTTT to be able to link the app account easily with Instagram. Being this, a web tool that facilitates the creation and programming of actions in order to automate different actions online. For this, it is essential create an account on IFTTT (it is done for free). Once you have said account, You have to access Telegram and look for the bot of this tool which is “@IFTTT”.

The procedure then consists of:

    • Select the button that says “Start” at the bottom of the chat.
    • Then you have to authorize Telegram connection with IFTTT, started by clicking on the link that appears along with the following message: “You will need an IFTTT account to use me. Please follow this link to get started: https://ifttt.com/telegram ”.
    • In the browser, when you enter the platform IFTTT, It’s time to click on “Connect”.
    • In the part of “Link your Telegram groups or channels to more than 360 additional services”, you have to click on “Send message” or “Send Message”.
    • Now, press the button “Authorize IFTTT” in the bot’s chat from Telegram.
    • On the website, look for the option “Send my Instagram Post URL to Telegram Group Chat” and choose it.
    • Press the button that indicates “Connect” and enter the data of your Instagram account to be able to link it with the tool.

From Instagram

From YouTube

From Youtube

With the same service that is used for connect Instagram with Telegram, it’s possible automate YouTube posts so that they appear in a certain group of the instant messaging app.

In this case, the process is based on:

  • As we explained in the previous part, open your IFTTT account and authorize its connection with Telegram.
  • Once you are redirected to the website, among the different options available, you must choose “When a user you subscribe to uploads a new YouTube video, share it with a Telegram chat”.
  • Later, it is time to connect YouTube channel with service, in the web browser.

Discover how to pin messages in a Telegram group so that it is fixed and everyone can see it

An advantageous method to optimize groups and / or channels of Telegram, it’s based on pin or pin some messages. Well, it consists of a strategy that allows the members of these spaces to be kept informed about certain specific things that are useful to them. Which is more effective than having to use the internal search engine to locate these elements.

Here we explain how it is done in each version of Telegram:

From PC

From PC

If you prefer to manage your Telegram account from its desktop version, you have to do the following when pinning a message at the top of the group or channel:

  • Log in into your account, through your computer.
  • Search and enter the group or channel that you want to enrich in this way.
  • Locate the message you want to pin and right click on it.
  • In the options menu, select “Set message”.
  • Determine if you want to notify this action to all members / subscribers or not, by checking or unchecking the corresponding box.
  • Finally, click on “Fix”.

On Android

On Android

In case you choose to do it through an Android device, you have to enter your Telegram account from the app compatible with said operating system and complete the following step by step:

  • Search and enter the group or channel in which you want to pin a message so that all users can see it.
  • Throughout the space, locate the message in question and press it.
  • It’s time to click on the “Set” option from the menu.
  • Select if you want to notify the other members of this action and click on “Fix”.

On iOS

On iOS

If you use your Telegram account through an iPhone or iPad, you must carry out the following procedure to post a message at the top of a channel or group:

  • From the iOS compatible app, search and access the group or channel in which you want to anchor the element.
  • Proceed to locate the message in question and press it.
  • Choose the option that says “Fix” within the menu.
  • Finally, set if you want to notify the other members of the group or channel about this action and click on “Fix”

If you have any questions, leave them in the comments, we will answer you as soon as possible, and it will surely be of great help to more members of the community. Thanks! 😉

Saharay Pérez

Author: Saharay Pérez

My passion is technology and social networks, I research and document the latest news and tricks from Facebook, Twitter, Instagram, WhatsApp and any social network.

You may be interested:

Rate this post

Leave a Comment