First, download and install our Python bindings and example scripts on your Capistrano server. Once you've done that, you'll use the zulip-send utility to notify you when certain events happen.

Here's some example code for sending a Zulip notification after a deployment has completed:

after 'deploy', 'notify:humbug'

namespace :notify do
  desc "Post a message to Zulip that we've deployed"
  task :humbug do
    # this will post to Zulip as the user defined in
    # ~/.zuliprc if you omit --user and --api-key
    run_locally "echo ':beers: I just deployed to #{stage}! :beers:' | zulip-send \
    --user capistrano-bot@example.com --api-key a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5 \
    --site={{ external_api_uri_subdomain }} \
    --stream commits --subject deployments || true"
  end
end

Some notes:

Congratulations! You're done!
Whenever you do a deployment, you'll get an automated notification that looks like this:

Thanks to Wes of TurboVote for submitting this integration!