Send Emails from Azure DevOps Pipelines: Build a Custom SendGrid Extension
Introduction Ever wanted your Azure DevOps pipeline to send a beautifully formatted email the moment a build finishes, a release deploys, or a test run completes? While Azure DevOps has built-in notifications, they are limited in formatting and flexibility. In this post, we’ll build a custom Azure DevOps pipeline extension that sends emails via SendGrid — a task you can drop into any pipeline, share with your whole organization, and even publish to the Visual Studio Marketplace. By the end, you’ll have a reusable “Send Email via SendGrid” task with configurable recipients, subject, and HTML body — with the API key kept safely out of your code. What You'll Need SendGrid Account : Sign up at SendGrid and create an API key with Mail Send permission. It will look like SG.**************** — keep it secret; we’ll never hardcode it. Node.js : The task handler runs on Node. Install the latest LTS version. tfx-cli : The ...