CloudDM 4.8.0 adds GreptimeDB as a DataSource
Skip to main content

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

WeCom app setup​

info

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

Before you begin

  1. Sign in to the WeCom admin console.
  2. Prepare a domain through which the CloudDM Console can be reached from the public internet.

Configure the app

  1. Open App Management > Apps > Create App. Create a WeCom app (Chinese interface)
  2. Enter the app details. Set availability to the root department, which includes all employees, then click Create App. Icons are available under Resource downloads. Enter WeCom app details (Chinese interface)
  3. Copy AgentId and Secret in App Details. Find the WeCom app credentials (Chinese interface)
  4. Copy CorpId at the bottom of My Company. Find the WeCom company ID (Chinese interface)
  5. In App Details > Trusted Company IPs, add the CloudDM server's public outbound IP address. Configure trusted company IPs (Chinese interface)

Configure approval forms​

  1. In the WeCom admin console, open App Management > Approvals. Open the approvals app (Chinese interface)
  2. Set the app owner if prompted, then open Template Management > Add Template and choose Custom Template. Open template management (Chinese interface) Create a custom template (Chinese interface)
  3. Under Form Design, add the appropriate fields without marking them required. Configure WeCom 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 WeCom approval steps (Chinese interface) Configure approver selection (Chinese interface)
  5. Click Save at the bottom of the page. Save the WeCom approval template (Chinese interface)

SQL tickets​

Follow the field types and order below exactly. Otherwise CloudDM may send incorrect data or be unable to submit the approval.

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

WeCom 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 (text)
  • Request description (multiline text)
  • Requested permissions (details, set the print format to combine entries on one line)
    • DataSource description (text)
    • Resource path (text)
    • Effective time (text)
    • Permission list (multiline text)

WeCom permission ticket form (Chinese interface)

Change tickets​

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

Configure event delivery​

  1. Enable the message channel. Open message receiver settings (Chinese interface) Configure the message receiver (Chinese interface)
  2. Save the Token and EncodingAESKey in CloudDM's integration settings before you save the channel in WeCom.
  3. Set the message receiver URL to http://your.domain.com/callback/event?puid={ownerUid}&platform=WECHAT&eventType=APPROVAL. To find ownerUid, sign in to CloudDM as the primary account and open the avatar menu to copy its UID.
  4. In the WeCom Approvals app, select the templates for callback notifications and the apps allowed to call the API. Open WeCom approval callback settings (Chinese interface) Select templates for notifications (Chinese interface) Select apps allowed to call the API (Chinese interface)

Use WeCom approvals​

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