How to create & use eWeLink Webhooks

You may want to keep an eye on your smart home and receive immediate notifications whenever the eWeLink devices/scenes are triggered. Or you want to achieve "when something happens, triggers eWeLink devices/scenes".
It's how YouTube can text in Telegram when your favorite YouTubers are updated, how to post Twitter from Discord. With the help of eWeLink Webhooks, you can combine the apps and make things work like that.
Today, we will show you how to create eWeLink Webhooks, and share a few insights on how to use them in real life.

How to create a webhooks scene?

The first step is to access the eWeLink Web.
Note: eWeLink Web is a feature currently available to eWeLink users on their advanced plan.

Click on the "Scene" option on the left menu. Then you need to enter the Add scene process. Name is required, now we come to the most important part of creating eWeLink Webhook scene: decide if this webhook scene is to send or receive data.

 

When eWeLink Webhooks scene is to send data

Firstly, set up "If" as usual. Next, choose webhook as the action. You have to fill in the information accurately including the URL, Method, Content-Type, Additional Headers, and Description if it has.
Finally, click on the "Save" button. Now you have just created a webhook scene. When the device is triggered, eWeLink will automatically access the URL.

 

When eWeLink Webhooks scene is to receive data

It’s relatively easy. Just need to choose webhook as the trigger, set up your action, and save it.

Now you have got the unique URL. You will be able to use that URL in third-party applications and achieve the effect of "If A, then trigger the eWeLink scene attached to that URL"

To manage your webhooks scene, just go to the scene table. Click on the "webhooks" icon and you will see the URLs as well for whenever you need to copy them.

How to use eWeLink Webhooks

Webhook is a useful way that can actually ease our life in terms of tedious jobs that we don't want to do.
We know there are lots of different combinations of eWeLink Webhooks and other apps out there and our users love it. For example, it can achieve:
  • When iPhone's battery is below 20%, the smart plug is on to charge.
  • Record the operating time of devices/scenes on Google Sheets.
  • Text me in Discord channels when device/scenes are triggered
Let's take eWeLink Webhooks X Telegram for example!
When a Telegram message will be sent to you when the device/scene is triggered.

 

Part 1: Configuring Telegram

You can find 'The Botfather' here or by searching for "BotFather" in the Telegram app.
In the chat with The Botfather, enter "/newbot". It will ask you for a name then a username for your bot.
Once you provide both, your bot will be created.
Then the Botfather will provide you with a link to your bot and an token that can access HTTP API.
Click the link and send a message to your bot.

Next, you need to create a public group in Telegram, open this group and add the bot as an admin.

It’s almost done. You need to modify this URL (Provided by Telegram) below according to your information.
https://api.telegram.org/bot{my_bot_token}/sendMessage?chat_id=&text=

*Replace {my_bot_token} with the token you got, replace it with @group_id (click on the group name and copy the group id), custom the text that the bot will send to you.

Once the modification finish, you will get your own URL which can be used at eWeLink Webhook scene.

Part 2: Create eWeLink Webhook scene

Access to eWeLink web, log in, and add a scene.
In this process, you need to:
  1. set webhook as action.
  2. Paste the URL you just got into the URL area.
  3. Choose the accurate method & content-type.
  4. Save.

Everything is set! Now a message will be sent to this group when the scene is triggered.

This example may help to keep you monitor your smart home, in case it can’t meet your need you can always combine other services yourself using eWeLink Webhooks to get what you need.