[SHARE] Sending your message log from Mikrotik to Discord

Hello, first of all sorry for my bad english, i'm just want to share my script that might be usefull for all of you !

Mikrotik To Discord

As the name, this scripts can send message from your Mikrotik such as Hotspot login, Netwatch and some others who supported Mikrotik Scripts. I made this script because i have to know the user and some my devices are managed by my mikrotik to send the log into my discord server, before that i'm using TelegramBot to send it but i'm not very active using telegram, so i decided to make this script.

This script are very simple, mostly using curl for fetching by method GET the Discord API Webhook.
All you need to know i'm just providing the tutorial, you can use my scripts who already hosted by Heroku or you can host the script wherever you want

Source Code

GitHub - troke12/MikrotikToDiscord: Monitoring your mikrotik from your discord (sorry it's full Indonesian, you can easily click Heroku button if you wanna deploy by your own)

Requirements

Tutorial

  1. Copy these code into your mikrotik
/tool fetch url="https://trokewebhook.herokuapp.com/form.php?text=INPUT_YOUR_TEXT&id=INPUT_ID_WEBHOOK&token=INPUT_TOKEN_WEBHOOK" keep-result=no;

Note :

  • URL - This is my script that already hosted by Heroku, you can change this if you hosted somewhere else
  • INPUT_YOUR_TEXT - You can put anything in here for example "MY+DEVICE+ARE+DOWN"
  • INPUT_ID_WEBHOOK - Copy your webhook id here
  • INPUT_TOKEN_WEBHOOK - Copy your token here

Webhook URL Explaination :
After you creating the webhook discord you will have the url for the webhook, please note that do not share your webhook url to anyone

https://discord.com/api/webhooks/{{ID_WEBHOOK}}/{{TOKEN_WEBHOOK}}

Example :
*My Webhook url already deleted

  1. Results

I hope you like it guys! thanks!

Cool, thanks for sharing.