docs
Administration
External approval

External Approval Flow

In case your organization has already deployed an OA system and all requests are approved there, you can configure an external approval flow as an approval node in the Custom Approval.

IM Integration

Frabit will approve the whole stage of tasks instead of a single task if it is approved on the IM side.

Users can configure Frabit to send approval request to IM and to be approved directly from there. Frabit currently supports:

  • Feishu (Lark)

The IM approval is sent when either of the following happens:

  • Issue arrives at a new stage.
  • Issue assignee has changed.
  • Task SQL statement has changed.
  • The issue creator clicks on the bell button

issue detail page with the bell icon near the assignee highlighted

Feishu Setup

Users should create a custom App, granting it necessary permissions, enabling it and obtaining the Application ID and Secret.

Step 1 - Create a custom app

Create a Custom App at Feishu Open Community (opens in a new tab).

Fill in App Name and Description such as Bytebase Approval.

feishu app creation page

Step 2 - Upload icon

In the General info section of Credentials & Basic Info page, add the above Frabit icon.

Step 3 - Enable bot

In the Bot page of Features, click "Enable bot".

feishu app features bot page, with "Enable bot" highlighted

Step 4 - Grant permissions

In the Manage scopes section of Permissions & Scopes page, add the following scopes.

  • approval:approval (View, create, update, and delete info of Approval app).
  • approval:approval:readonly (Access Approval).
  • contact:user.id:readonly (Obtain user ID via email or mobile number).

feishu app permission page

Make sure that you have added all three scopes before moving on. In particular, you must add both "approval:approval" and "approval:approval:readonly".

Step 5 - Enable app

In the Version Management & Release page of App Release, create a Version.

feishu app release page

You can use 1.0.0 for App version and set availability to members who use Bytebase.

feishu app release page version details

Set the availability and select those who use Bytebase.

set availability on feishu app release page

Submit for release.

feishu app release submission page

Step 6 - Wait for approval

Ask your organization administrator to approve the custom application in Workspace / App review (opens in a new tab).

Move to the next step when you see the app status is "Enabled". In feishu app page, you can see that the app is activated

Step 7 - Obtain credentials

Get the App ID and App Secret in the General info section of Credentials & Basic Info page.

feishu app credential page

Step 8 - Set up Bytebase

Frabit uses account emails to find users at Feishu.

Specifically, the issue assignee must have an identical email at Feishu to receive Approval requests. In Feishu Approvals, Bytebase bot will represent the issue creator if she can't be found at Feishu.

  1. Go to Frabit Settings, click on IM Integration.
  2. Fill in Application ID and Secret from the previous section. Click on Enable and Create button.