Skip to content

i1mik1i/bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple notification scripts for Manage Engine Service Desk - Telegram

Notifications from ManageEngine Service Desk tickets to telegram chats and personal notifications about replies with SOCKS proxy support

Examples

Sending messages to group chat with short info about new ticket:

Group Messages

Personal notifications of new replies:

Personal notifications

Preparations

Scripts is designed to work with Python 2.7 (sorry, no Python 3 support). You can check which version you have by running:

python -V
>Python 2.7.14

You also need install additional modules, this is required for operation.

pip install requests
pip install pysocks

Scripts uses Telegram's User IDs(UID) to send messages, not @-style username(but username is still used to tag technician in group chat). To get your (or chat) UID, send /start message to bot and check content of this page:

https://api.telegram.org/bot<bot token>/getUpdates

You will get something like this:

{"ok":true,"result":[{"update_id":XXXXXXXX,
"message":{"message_id":8,"from":{"id":YYYYYY,"first_name":"Kostya","last_name":"Belykh","username":"belykh_k"},"chat":{"id":YYYYYY,"first_name":"Kostya","last_name":"Belykh","username":"belykh_k","type":"private"},"date":1491057143,"text":"asd"}}]}

Part "id":YYYYYY is what you needed. Note that Chat ID will contain - at begining, do not discard it.

Installation & Configuraion

  • Clone repo to your local machine
git clone https://github.com/belykhk/sd-telegram-notify
  • Copy settings-example.py to settings.py and edit settings.py for youself

  • Put Posttotg.py, Posttotgpersonal.py and settings.py to

{ManageEngineSDInstallDir}/integration/custom_scripts/
  • Edit your settings in Service Desk in Custom scripts menu. Something like that:

Send message to group chat then ticket is created: Send to group chat Send personal message then reply from author received: Send personal notifications


You can find additional info here (Russian).

Contact me: Telegram, Mail

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages