CloudDM 4.8.0 adds GreptimeDB as a DataSource
Skip to main content

Feishu approvals

The provider screenshots in this guide show its Chinese interface.

Configure the approval engine​

  1. Sign in to CloudDM with permission to manage integrations.
  2. Prepare the credentials in Feishu app setup.
  3. Open Integrations > Approval Engines.
  4. Click Add and select Feishu Approval.
  5. Enter App ID, App Secret, and API Timeout (seconds). Turn on Enable Immediately if needed.
  6. Click Add.

Feishu app setup​

info

You can use the same Feishu app for single sign-on and ticket approvals, or configure them separately.

Before you begin

  1. Sign in to the Feishu developer console and select your organization.
  2. If using an existing app, add your account under Custom App > Member Management. Otherwise, create an app below.

Configure the app

  1. Open App Development > Feishu Apps > Create App. Create a Feishu app (Chinese interface)
  2. Enter the app details and click Save. Icons are available under Resource downloads. Enter Feishu app details (Chinese interface)
  3. Under Credentials and Basic Information, copy App ID and App Secret. Find the Feishu app credentials (Chinese interface)
  4. Under Permission Management > Add Permissions > App Permissions, grant the following permissions.
    • Approvals: access the approval app and read, create, update, and delete approval app information, native approval definitions, and native approval instances.
    • Directory: read basic directory information, read basic user information and user IDs, and look up user IDs by mobile number or email. Configure Feishu app permissions (Chinese interface)
  5. Add the CloudDM server's public outbound IP address in Security Settings > IP Allowlist. Configure the IP allowlist (Chinese interface)
  6. Under Version Management and Release, publish the app and set availability to All Employees. Publish the Feishu app (Chinese interface)

Configure approval forms​

  1. Open the Feishu approvals admin console. Under Approval Management > Create Approval, select Create Custom Approval. Open Feishu approval management (Chinese interface) Create a custom approval (Chinese interface)
  2. Under Form Design, add the appropriate fields without marking them required. Configure Feishu form fields (Chinese interface)
  3. Under Workflow Design, set the approvers and approval method for each step. CloudDM does not support letting the requester select approvers. Configure Feishu workflow steps (Chinese interface)
  4. Click Publish. Publish the Feishu approval template (Chinese interface)

SQL tickets​

  • Title (single-line text)
  • Target DataSource (single-line text)
  • Request description (multiline text)
  • SQL to execute (multiline text)
  • Rollback SQL (multiline text)
  • Estimated affected rows (number)

Feishu SQL ticket form (Chinese interface)

info

The approval form truncates values that exceed its limits. View the full values in the CloudDM Console. The limit is 400 characters for single-line fields and 4,000 for multiline fields.

Permission tickets​

  • Title (single-line text)
  • Request description (multiline text)
  • Requested permissions (details/table, use horizontal layout)
    • DataSource description (single-line text)
    • Resource path (single-line text)
    • Effective time (single-line text)
    • Permission list (multiline text)

Feishu permission ticket form (Chinese interface)

Change tickets​

  • Title (single-line text)
  • Request description (multiline text)
  • Target DataSource (single-line text)
  • Change flow (single-line text)
  • Change (single-line text)
  • Branch (single-line text)
  • SQL to execute (multiline text)

Configure event delivery​

  1. Confirm that Feishu approvals are enabled in CloudDM.
  2. In the Feishu developer console, open Events and Callbacks > Event Configuration > Subscription Method, choose to receive events over a persistent connection, and save. Configure a persistent event connection (Chinese interface)
  3. Click Add Event and add the approval instance status change and approval task status change events. Add approval events (Chinese interface)
  4. Under Version Management and Release, publish the app again with availability set to All Employees. Publish the updated Feishu app (Chinese interface)

Use Feishu approvals​

  1. In CloudDM, open Query Settings > Environments and enable tickets for the target environment.
  2. Select Feishu Workflow as the engine and click Add Template.
  3. In Feishu's Approval Management, open the template and copy the URL from the browser's address bar. Paste it into CloudDM and click Add Template. Find the Feishu approval template URL (Chinese interface)
  4. Select the new template and click OK.

Paid API usage​

  • Calls per completed approval consist of four fixed calls, the calls for each approval, periodic checks over the approval duration, and each manual refresh of the ticket details.
  • The four fixed calls retrieve the approval steps, create the workflow instance, and retrieve status at the start and end of the approval.