Tutorial to write a complete Slack integration from scratch.
This guide will show you how to build an integration in GitBook that can authenticate the user with OAuth and handle events from GitBook to trigger actions on the external service (Slack).
gitbook new ./my-slack
The CLI will prompt you to enter a title and to select scopes, choose the scopes
space:contentto ensure the integration can listen to the
Now that our integration can be edited locally, it's time to implement a flow to let the user authenticate themselve.
To do so, we are going to make 2 changes:
- Create a configuration in our
gitbook-manifest.yamlfile to indicate how the Slack credentials should be stored.
- Implement an OAuth HTTP flow
gitbook-manifest.yamlfile to define the following configuration:
description: Authorization between Slack and GitBook.