Adding a Slack webhook

You can register the bitrise-webhooks URL as an outgoing webhook.

Once the URL is registered, check the usage section for all the accepted and required parameters you can define in the message, and for a couple of examples.

Getting the webhook URL for Slack

  1. Go to your app’s page on Bitrise.

  2. Go to the Code tab.

  3. Scroll down to the INCOMING WEBHOOKS section.

  4. Click SETUP MANUALLY.

    Adding a Slack webhook
  5. Choose Slack from the dropdown menu.

  6. Copy and paste the URL from the Webhook URL for the selected service field.

  7. Register the URL to your Slack app.

Usage: the message format

Your message has to be in the format: key:value|key:value|..., where the supported keys are:

At least one of these two parameters are required:

  • b or branch - example: branch: master

  • w or workflow - example: workflow: primary

Other, optional parameters:

  • t or tag - example: branch: master|tag: v1.0

  • c or commit - example: workflow: primary|commit: eee55509f16e7715bdb43308bb55e8736da4e21e

  • m or message - example: branch: master|message: ship it!!

Parameter requirements

At least either branch or workflow has to be specified, and you can specify both if you want to. You’re free to specify any number of optional parameters.

You can also send environment variables that will be available in your workflow with the format: env[KEY1]:value1|ENV[KEY2]:value2

An example with all parameters included:

workflow: primary|b: master|tag: v1.0|commit:eee55509f16e7715bdb43308bb55e8736da4e21e|m: start my build!|ENV[DEVICE_NAME]:iPhone 6S|ENV[DEVICE_UDID]:82667b4079914d4aabed9c216620da5dedab630a