Rocket.chat: Demonstrate bot integrations

Created on 20 Mar 2018  路  18Comments  路  Source: RocketChat/Rocket.Chat

I have found a number of issues related to requests for either integrating existing bots or suggestions for new bot scripts that could be used in Hubot or webhook integrations.

These are all outside the scope of either bug or feature requests for Rocket.Chat, but I don't want to just carpet bomb the enthusiasm for bots on the platform, so I've created this issue to house the meta discussion for what kind of bots and interactions people want to be able to use in Rocket.Chat.

I'll post each suggestion as a comment and the community can vote on each with thumbs and hearts. If we get an idea of the really popular use cases, we could develop these bots as a tutorial piece for our docs and website content around bots.

There is potential for such a collection to evolve into an integration directory or marketplace.

Bots discussion

Most helpful comment

From @arkayz

It would be pretty neat if there was a polling system in place where users/moderators can post poll questions and get feedback.

It would also be useful to have a way to post "official" questions where the replies would be displayed as a subthread to the question post, all in the chat.

and @rasos

Anybody tried with a bot like in Telegram? https://telegram-store.com/blog/telegram-polls/

All 18 comments

From @maxpen

Integrate this slack security bot its an FREE alternative to metacert

DBOT - Demisto Security Bot
https://github.com/demisto/alfred

From @nickolasdeluca

can we write something that warns the user in case of unread messages after 5 minutes or something like that?

From @arkayz

It would be pretty neat if there was a polling system in place where users/moderators can post poll questions and get feedback.

It would also be useful to have a way to post "official" questions where the replies would be displayed as a subthread to the question post, all in the chat.

and @rasos

Anybody tried with a bot like in Telegram? https://telegram-store.com/blog/telegram-polls/

From @teamfighter

Could you implement some kind of email bot?

I.e. I am sending email to address [email protected], and this message is showing in specific channel.

From @IQ2022

Is there a way to add a command or a feature that when someone types a message can automatically sent to another channel for records?

From @Molle500

There should be a button (preferably in the gear wheel menu) where users can report a post.

I麓m not 100% sure how the solution should work but my idea is: a new channel which only Moderators and Admins can access. There a bot (cat bot?) should post a text something like this.

From @IQ2022

I see we have SMS in live chat, can this be setup for a room to post alerts to mobile numbers - users need to subscribe with numbers

and @designgurudotorg

Working SMS into the chat experience across the app would be amazing, and open up RC to a whole world of dumb phones (plus enable us to code bots to interact with SMS within chatrooms)...

From @bott0r

It would be really fantastic to be able to create a bot that could first connected to spotify, lastfm, or something, and would reroute the audio signal from these services into a given channel, via webrtc, all other clients would not have the permission to speak(voice) in this channel, so connected people could listen to the generated audio signal, i.e. music

After that, the possibilities are endless, e.g. playlists and queues where people can add to the queue with a simple chat command such as @radiobot: add Michael Jackson Smooth Criminal or similar features.

From @Sing-Li

Allow system bot user to create users from alien systems

For federation via matrix.org, XMPP integration, and better Slack integration compatibility...

From @Sing-Li

Capture a "Message Flow" and send to Knowledge Base

In the DEMO room, knowledge is often shared by members that can be useful for others.

But once the message flow scrolls off screen - it is unlikely to be ever found again.

Implement a way to capture and send a message flow to - a knowledge-base, forum, or FAQ

From @graywolf336

I use the /remind me command quite often. Maybe this is a command for Hubot but would be neat to have built into the core.

From @dennis-f

i'd love to see Atlassin Jira integration

The proposed Telegram bot integration https://rocket.chat/docs/administrator-guides/integrations/telegram/ needs some improvement, it has a problem with emoji or sticker handling, see our notes: https://git.fairkom.net/chat/fairchat/issues/61 . And it does not support attachments yet.

@rasos
Hey Roland, i wrote the terrible telegram bot/script, with 0 prior knowledge, which hasn't changed. however i made some updates to deal with some stuff.

Incoming:

class Script {
    process_incoming_request({ request }) {
        // UNCOMMENT THE BELOW LINE TO DEBUG IF NEEDED.
        console.log(request.content);
        if ('edited_message' in request.content) {
            request.content.message = request.content.edited_message;
        }
        let who = request.content.message.from.username
        let icon_url = '/avatar/' + request.content.message.from.username + '.jpg'
        if(!who)  {
          who = `${request.content.message.from.first_name} ${request.content.message.from.last_name}`
          icon_url = `/avatar/${request.content.message.from.first_name}.jpg`
        }
        let body = request.content.message.text
        //let photo = request.content.message.attachments.image_url

        //if(!body) {
        //  if(request.content.message.sticker.emoji) {
        //    // It's a sticker
        //    body = request.content.message.sticker.emoji
        //} else {
        //   return {}
        //  }
        //}

        if(request.content.message.sticker) {
          if(request.content.message.sticker.emoji) {
            // It's a sticker
            body = request.content.message.sticker.emoji
        } else {
           return {}
          }
        }
        if(request.content.message.document) {
          if(request.content.message.document) {
            // It's a gif
            body = 'I send a gif :)' 
        } else {
           return {}
          }
        }
        if(request.content.message.photo) {
          console.log(request.content.message.photo);
          if(request.content.message.photo[0]) {
            // It's a picture
            //// 'https://api.telegram.org/bot123/getFile?file_id=${request.content.message.photo[0].file_path}'
            //body = 'i uploaded a pic ' + ' ![photo]('+`https://api.telegram.org/file/bot123/${request.content.message.photo[0].file_path}`+')'
            body = 'i uploaded a pic'
            //body = 'https://api.telegram.org/file/bot123/'+`${request.content.message.photo[0].file_path}`
            //request.content.message.attachments.image_url = `https://api.telegram.org/file/bot4123/${request.content.message.photo[0].file_path}`
        } else {
           return {}
          }
        }
        if(request.content.message.video) {
          if(request.content.message.video.file_id) {
            // It's a video
            // works body = `https://api.telegram.org/file/bot123/${request.content.message.photo[0].file_path}`
            body = 'video upload'
            //request.content.message.attachments.image_url = `https://api.telegram.org/file/bot123/` + ${request.content.message.photo[0].file_path}
        } else {
           return {}
          }
        }
        return {
            content: {
                username: who,
                icon_url: icon_url,
                text: body
            }
        };
    }
}

it fixes stickies and similes and posts messages when someone uploads a video or picture like so.
I tried to update the wiki but wasn't allowed. I am also sure if someone of the RC crew would look at this we'd have a kick ass telegram integration.

@bott0r You probably tried before the docs were moved to GitHub, now I think you should be able to edit that directly here: https://github.com/RocketChat/docs/blob/master/administrator-guides/integrations/telegram/README.md

Just hit the 鉁忥笍 and paste in that code, commit changes and it will submit a pull request so you'll be credited with the contribution.

This is a strange one. @timkinnane asked for ideas to demonstrate BOT but we received tons of Apps ideas. Have captured all App ideals in the feature-request repository as new issues.

Will be closing the base issue.

Can you link the feature request repository

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mddvul22 picture mddvul22  路  3Comments

zeigerpuppy picture zeigerpuppy  路  3Comments

marceloschmidt picture marceloschmidt  路  3Comments

mattlin picture mattlin  路  3Comments

neha1deshmukh picture neha1deshmukh  路  3Comments