CloudDM 4.8.0 adds GreptimeDB as a DataSource
Skip to main content

DingTalk 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 DingTalk app setup.
  3. Open Integrations > Approval Engines.
  4. Click Add and select DingTalk Approval.
  5. Enter App ID, App Secret, and API Timeout (seconds). Turn on Enable Immediately if needed.
  6. Click Add.

DingTalk app setup​

info

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

Before you begin

  1. Sign in to the DingTalk developer console and select your organization.
  2. Obtain developer permissions if you do not already have them.

Configure the app

  1. Open App Development > DingTalk Apps > Create App. Create a DingTalk app (Chinese interface)
  2. Enter the app details and click Save. Icons are available under Resource downloads. Enter DingTalk app details (Chinese interface)
  3. Under Credentials and Basic Information, copy Client ID and Client Secret. Find the DingTalk app credentials (Chinese interface)
  4. In Permission Management, grant the following permissions.
    • Directory management: access to personal details such as email, read member information, look up members by mobile number, and read department members.
    • OA approvals: list approval forms visible to a user, manage workflow data, write workflow instances, and read workflow templates and instances. Configure approval and directory permissions (Chinese interface)
  5. Under Security Settings, add the public outbound IP address of your CloudDM environment. Configure the outbound IP address (Chinese interface)
  6. Under Version Management and Release, publish the app and set availability to All Employees. Publish the DingTalk app (Chinese interface)

Configure approval forms​

  1. Open the DingTalk OA approvals admin console in the client or browser. Open the DingTalk approvals console (Chinese interface)
  2. Click Create New Form and select Workflow Form. Create a workflow form (Chinese interface)
  3. Under Form Design, add the appropriate fields without marking them required. Configure DingTalk form fields (Chinese interface)
  4. Under Workflow Design, set the approvers and approval method for each step. CloudDM does not support letting the requester select approvers. Configure DingTalk approvers (Chinese interface)

SQL tickets​

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

DingTalk 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 input)
  • Request description (multiline input)
  • Requested permissions (details/table, select table input)
    • DataSource description (single-line input)
    • Resource path (single-line input)
    • Effective time (single-line input)
    • Permission list (multiline input)

DingTalk permission ticket form (Chinese interface)

Change tickets​

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

Configure event delivery​

  1. Confirm that DingTalk approvals are enabled in CloudDM.
  2. In the DingTalk Open Platform, open Event Subscriptions, verify the connection channel, and save. Verify the event subscription channel (Chinese interface)

Subscription settings​

  1. Open the event subscription settings. Open DingTalk subscription settings (Chinese interface) Filter DingTalk approval events (Chinese interface)

    warning

    DingTalk sends all ticket events by default. Each event consumes an API call and may incur charges. If your organization uses other approval forms, filter the subscriptions to avoid unnecessary calls.

  2. Enter the subscription paths.

    • Approval instance start and end: /v1.0/event/bpms_instance_change/processCode/{processCode}/type/*
    • Approval task start, end, and reassignment: /v1.0/event/bpms_task_change/processCode/{processCode}/type/*
  3. Replace {processCode} with the required form template code. In a copied value such as Salary Approval:PROC-88888888-8888-8888-8888-888888888888, use the part after the colon.

Use DingTalk approvals​

In CloudDM, open Query Settings > Environments and enable tickets for the target environment. In the dialog, select DingTalk Workflow as the engine and choose the template you created.

Paid API usage​

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