templates/zerver/integrations/hubot.md
Use Hubot to execute scripts and commands within Zulip!
{start_tabs}
Follow the Getting Started with Hubot guide
to create your Hubot. You'll have a new directory from which bin/hubot
starts a vanilla Hubot instance with the shell backend.
In your Hubot's directory, install the Zulip adapter by running:
npm install --save hubot-zulip
{!create-a-generic-bot.md!}
Hubot uses the following environment variables, set them using the information of the bot you created, by running:
export HUBOT_ZULIP_SITE="{{ zulip_url }}"
export HUBOT_ZULIP_BOT="hubot-bot@{{ zulip_url }}"
export HUBOT_ZULIP_API_KEY="0123456789abcdef0123456789abcdef"
Run Hubot:
bin/hubot --adapter zulip --name "<bot username>"
!!! tip ""
Hubot automatically listens for commands on all public channels. Private
channels require an invitation. Hubot's access can be
[configured](#configuration-options).
{end_tabs}
To test your Hubot installation, send it an @-notification with a
basic command, e.g., @Hubot pug me, which should produce a
result like this:
To make Hubot listen only on the channels that it is subscribed to, run:
export HUBOT_ZULIP_ONLY_SUBSCRIBED_STREAMS