Create an Application in the external service
Add a link template script in your integration definition
config
type with a linkTemplateScript
field. This field is a path to a .vrl
script relative to your integration’s directory. The script generates the OAuth URL that users will be redirected to when clicking the OAuth button in the integration UI.For Slack, the link looks something like this:state
parameter must contain the webhook ID — it’s used by Botpress to identify which bot and which integration initiated the flow.
redirect_uri
must be:
Handle the `/oauth` path in your integration
/oauth
path.Your code should:Add an `identifier` with an `extractScript`
identifier
field with an extractScript
:linkTemplateScript
, this is a path to a .vrl
script relative to your integration’s directory. The script is executed when Botpress receives incoming requests on the global webhook. It should extract an external user or workspace ID from the request and return it in the format expected by Botpress. It is called with the following variables: