Hi guys , can any one help on to create new custom slash command in rocket chat in the rocketchat application in the admin account
Here you have a good, simple example on how to create a Rocket.Chat App that will provide a slash command:
hi thank you for your response, is there any steps to create or register slash command in the rocket chat without coding
Not for slash commands.
You can create an integrations, so when you type a trigger word on specific channels, it will send a webhook to a configurable endpoint where you can do whatever you want and then get the content back.
However, coding an App inside Rocket.Chat will give you the ability to open modals, create forms, store data inside Rocket.Chat, etc.
Thank you very much for your response
Here are the steps to create a new custom slash command in Rocket Chat:
- Log in to your Rocket Chat account as an administrator.
- Click on the three dots in the top left corner of the screen and select “Administration” from the dropdown menu.
- In the left sidebar, click on “Custom Commands.”
- Click on the “New” button in the top right corner of the screen.
- In the “Command” field, enter the command you want to create (e.g., /customcommand).
- In the “Description” field, enter a brief description of what the command does.
- In the “URL” field, enter the URL of the script or API endpoint that will handle the command. This script should return the output that you want the command to display in the chat.
- In the “Method” field, select the HTTP method (GET or POST) that the script uses.
- In the “Token” field, enter a secret token that will be sent with the command to authenticate it.
- Click on the “Save” button.
Your custom slash command is now created and ready to use in your Rocket Chat instance. You can test the command by typing it into the chat and seeing the output that your script returns.