Skip to content

Auto-Forward WhatsApp Messages to Telegram using WhatsApp Cloud API

In this post, we will learn how you can integrate WhatsApp with Telegram and auto-forward your WhatsApp messages to Telegram using WhatsApp Cloud API.
This automation requires a one-time setup, for which we will use Pabbly Connect.
We will first link WhatsApp with Pabbly Connect to capture the messages, then link Pabbly Connect with Telegram and forward the captured messages to Telegram.

Steps to Auto-Forward WhatsApp Messages to Telegram using WhatsApp Cloud API

1. Sign In / Sign Up to Pabbly Connect and Create a Workflow
2. Establish a Connection between WhatsApp and Pabbly Connect
3. Setup Telegram as the Action App to Share Messages

Step 1:- Sign In / Sign Up to Pabbly Connect and Create a Workflow

A. Sign In / Sign Up

To begin this process, visit Pabbly Connect and create your account by clicking on the ‘Sign Up Free’ button. You can also click on Sign In if you already have an account.

Click on the Pabbly Connect ‘Access Now’ button

B. Create Workflow

To create a new workflow, click the ‘Create Workflow’ button.

Name your workflow, and click on ‘Create’.

Step 2:- Establish a Connection between WhatsApp and Pabbly Connect

We will now look at the steps through which we will establish a link between WhatsApp and Pabbly Connect – this will help us capture new WhatsApp messages.
Trigger allows us to choose the application that will receive the data for Pabbly Connect. In our case, it would be WhatsApp Cloud API.
Note: Follow steps 1 to 3 of this blog to create a new Whatsapp Business Cloud API account if you don’t already have one.

A. Trigger App

Choose ‘WhatsApp Cloud API’ as the Trigger App, select ‘Message Notification’ as an Action Event, and click on ‘Connect’.

B. Webhook URL

A new Webhook URL will get generated. You will use this Webhook URL to create a connection with your WhatsApp account. Copy the Webhook URL.

As soon as you Copy the Webhook URL, Pabbly Connect will start looking to capture data from WhatsApp, as indicated by the rotating Waiting For Webhook Response button.

C. Establish Connection

Switch to your Facebook Developers dashboard, and click on WhatsApp > Configuration > Edit.

Paste the Webhook URL we copied earlier, enter ‘pabbly_fb_webhook_token’ as the Verify Token, and click on ‘Verify and save’.

Now, click on ‘Manage’ > ‘Subscribe’ messages, and your connection will be established.

D. Test Connection

To test the established connection, click on ‘Test’ and expand Response Received, under which the test message must be visible.

Step 3:- Setup Telegram as the Action App to Share Messages

Action allows us to choose the application that will get executed by the workflow trigger.
We essentially want to forward WhatsApp messages to the Telegram group. Therefore, Telegram Bot will be our Action App.

A. Action App

Choose ‘Telegram Bot’ as the Action App, select ‘Send a Text Message or a Reply (Markdown)’ as an Action Event, and click on ‘Connect’.

B. Connect Telegram Account

To connect with your Telegram account, select ‘Add New Connection’. You will be asked to enter your Token. Go to ‘https://telegram.me/BotFather’ and click on ‘Send Message’.

C. Create a New Bot

To capture files from Telegram, you are required to have a bot. Type ‘/newbot’ and send the message.

Give your new bot a Name and a Username, by entering both when asked.

Copy the API Token, paste it into its given field, and click on ‘Save’.

Add your bot to the group to which you want to forward the message.

Copy and paste the Chat ID from your telegram group URL.

Compose your Text Message by mapping the details from the above steps.

Disable the Notifications and Link Reviews if you want, and click on ‘Save & Send Test Request’.

The moment you click on Save & Send Test Request, your message will automatically be forwarded to the Telegram group.

Our automation is complete. We have successfully integrated WhatsApp with Telegram. Each time you receive a new message on WhatsApp, it will automatically be forwarded to the Telegram group of your choice.

Sign Up for a free Pabbly Connect account, and start automating your business
Subscribe to our Youtube Channel for more such automation
For any other queries, visit our forum