Azure DevOps Pull Request Creation Event DingTalk Notification Automation

This workflow implements automatic notifications via a DingTalk group bot when a Pull Request is created in Azure DevOps, ensuring that relevant reviewers are promptly informed of code changes. It maintains user mapping relationships through a MySQL database, supports Markdown format for notification content, and offers a high degree of customization, enhancing team collaboration efficiency. This helps avoid delays or omissions in information transmission, ensuring the timeliness and transparency of code reviews. It is suitable for development teams that need to respond quickly to code merge requests.

Workflow Diagram
Azure DevOps Pull Request Creation Event DingTalk Notification Automation Workflow diagram

Workflow Name

Azure DevOps Pull Request Creation Event DingTalk Notification Automation

Key Features and Highlights

This workflow automates the notification process by sending messages via a DingTalk group bot whenever a new Pull Request (PR) is created in Azure DevOps. It maintains a mapping between Azure users and DingTalk users in a MySQL database to ensure accurate @mentions of relevant reviewers, thereby enhancing team collaboration efficiency. The notification messages support Markdown format and are customizable for clearer communication.

Core Problems Addressed

PR review is a critical step in ensuring code quality during software development. Traditional notification methods may cause delays or omissions in information delivery, negatively impacting review efficiency. This workflow automatically captures PR creation events and precisely notifies the corresponding reviewers, preventing missed notifications and improving response speed and collaboration transparency.

Use Cases

  • Software development teams needing rapid awareness and response to code merge requests in Azure DevOps
  • Enterprises or organizations that standardize team communication through DingTalk
  • Multi-person and cross-department code review scenarios
  • Development management teams aiming to reduce manual notification tasks through automation

Main Workflow Steps

  1. Event Reception: Listen for Azure DevOps PR creation event POST requests via a Webhook node.
  2. Load Mapping: Retrieve the mapping between Azure users and DingTalk phone numbers/usernames from the MySQL database.
  3. Construct Message: Generate a DingTalk Markdown message with @mentions of reviewers based on event data and the user mapping.
  4. Send Notification: Use the DingTalk group bot Webhook API to push the message to the designated DingTalk group for instant alerts.

Involved Systems or Services

  • Azure DevOps: Source of Pull Request creation event triggers.
  • MySQL: Stores the mapping table between Azure users and DingTalk users.
  • DingTalk: Facilitates message pushing and user @mentions via group bots.
  • n8n Automation Platform: Builds and executes the entire workflow.

Target Audience and Value

  • Software development team leads and project managers seeking to improve code review efficiency and communication timeliness.
  • DevOps engineers and automation operators responsible for establishing automated notification mechanisms.
  • Teams using Azure DevOps and DingTalk as their primary collaboration tools within enterprises.
  • Technical teams aiming to minimize manual notification errors and accelerate team response times.

By seamlessly integrating Azure DevOps with DingTalk, this workflow automates critical event notifications, helping to boost development collaboration efficiency and ensuring every code change receives timely attention and review.