# Display custom metrics and text in Telegram

Imagine, instead of logging into a dashboard to look at your stats, you can just do this


![brandbird (5).png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637143489034/okZUr6Hoa.png)

This article will cover step by step tutorial on how to use **basic command editor** from NotifyXF to display custom information in Telegram.

If you are a visual learner, you can also watch it from our YouTube channel.

%[https://www.youtube.com/watch?v=rFiLgC3GqDY]

---

# Create an account
The first thing you have to do of course is to create an account.

So head over to https://notifyxf.com and insert your email to get started. It only takes 5 seconds or less. I'll wait.


![Screenshot 2021-11-17 at 6.11.49 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637143960489/e6LMisSe1.png)

# Connect with Telegram

After that, follow the instructions on the screen to connect your Telegram account with NotifyXF. Start by clicking on **Login with Telegram** button. The process is fairly straightforward so go ahead and do that. I'll get myself a coffee first.


![Screenshot 2021-11-17 at 6.18.21 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637144325628/ba3Vgf6pA.png)


![Screenshot 2021-11-17 at 6.17.17 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637144259314/NQcIgPXBs.png)


Once you are connected, you should receive a message from **Kayla** our bot in Telegram. Your browser screen will also redirect you to dashboard.

![Screenshot 2021-11-17 at 6.22.30 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637144605496/E5kDsP1n0.png)


![Screenshot 2021-11-17 at 6.25.08 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637144725544/jcdTPxTyJ.png)

The account creation is completed! See! Easy peasy!

The page you see in the dashboard allows you to get a token you could use to send notifications to yourself using a simple URL. 

But we won't be doing that in this article so read on!

---

Next up, we'll be using one of the features in NotifyXF to display custom information in Telegram. It's called **Command**

# Creating your first command

Click on the **Command** tab on the top or just visit https://notifyxf.com/commands to go to the Command page.

![Screenshot 2021-11-17 at 6.32.15 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637145153255/IlrG4uzy-.png)

Click on **Create Command**

![Screenshot 2021-11-17 at 6.32.58 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637145199270/DBHJ-xV9Q.png)

Insert the following information as seen below.

**What does this command do?** *Server Stats*

**Send message to** *Leave it as default*

**What is your endpoint?** *https://notifyxf.com/api/command*

![Screenshot 2021-11-17 at 6.34.49 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637145306875/Or3PLNJyt.png)

> Note that for this tutorial we will be using an example API endpoint provided by 
NotifyXF. More details about the endpoint will be explained at the bottom.

Press **Fetch** once you are done with the above.

You will see the following screen.

![Screenshot 2021-11-17 at 8.02.58 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637150629817/W4PoBRNmC.png)

What happened here is NotifyXF parsed the data from the API endpoint provided and showed you a preview of what you will see in Telegram.

Now click **Save**

![Screenshot 2021-11-17 at 8.02.58 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637150816301/N79hF0sdg.png)


... and you are done!

Head over to Telegram and in the chat with **Kayla**, just type `/list` and choose the command you've just created.

![Screenshot 2021-11-17 at 8.10.12 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637151028503/ozkcJ5Yi0.png)

You should see the above reply. Easy Peasy again!

# JSON API Endpoint

Finally, in this last part, let's talk about the endpoint.

Basically, you will have to provide a simple URL that could be accessed by our bot. The format of the URL is as shown:


![Screenshot 2021-11-17 at 8.13.57 PM.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1637151265332/HPoMabyFq.png)

```
{
  "message": "There are 1609 users in NotifyXF"
}
```
*Response from https://notifyxf.com/api/command*

The naming of the key `message` is not important as NotifyXF will use the first key found in the JSON response.

---

# Conclusion

As you can see, it's fairly easy to configure a custom response with NotifyXF. As long as you are able to provide an API endpoint.

If you would like to customize your message or handle nested JSON data, you can also use the **Advanced** mode, which I will cover in a separate article.

Hope you enjoyed following this simple tutorial and feel free to comment at the bottom if you have any questions!

Look forward to more articles on the various features provided by NotifyXF!

Have a nice day!
