Send transactional email through API services and receive inbound email via webhooks.
Email integrations in DRAGOPS use the same nodes as every other integration. You send email by calling an email service's API with HTTP Request, and you receive inbound email through webhook forwarding with On Webhook. There are no email-specific connectors — you build email patterns from standard nodes and can inspect, modify, and extend them at any time.
Send email via an API service
Modern email services provide HTTP APIs for sending transactional email. Services like SendGrid, Mailgun, Resend, and Postmark all accept a POST request with the message details and handle delivery, tracking, and compliance for you.
The examples below use SendGrid's v3 API, but the approach is the same for any email service: build the request body, set the authentication headers, and send the request with HTTP Request.
SendGrid setup
- Create a SendGrid account and generate an API key under Settings > API Keys.
- Store the API key in a DRAGOPS connection or secret.
- Verify a sender identity (email address or domain) in SendGrid under Settings > Sender Authentication.
Send a plain text email
Build the SendGrid API request body:
{
"personalizations": [
{
"to": [{ "email": "[email protected]" }]
}
],
"from": { "email": "[email protected]", "name": "DRAGOPS Alerts" },
"subject": "Deployment completed",
"content": [
{
"type": "text/plain",
"value": "The deployment to production completed successfully at 2026-03-05 14:30 UTC."
}
]
}In your pattern:
- Build the message object using Set Property nodes or a Format node with the JSON template.
- Convert the object to a string with JSON Stringify.
- Set the authentication and content type headers.
- Send the request with HTTP Request.
A successful send returns a 202 Accepted status code with an empty body. Use a Branch node to check the status code and handle failures.
Send an HTML email
To send a formatted HTML email, change the type field to text/html and provide the HTML content:
{
"personalizations": [
{
"to": [{ "email": "[email protected]" }]
}
],
"from": { "email": "[email protected]", "name": "DRAGOPS Alerts" },
"subject": "Deployment report",
"content": [
{
"type": "text/html",
"value": "<h2>Deployment Report</h2><p>Service <strong>api-gateway</strong> deployed to <strong>production</strong> at 14:30 UTC.</p><p>Status: <span style=\"color: green;\">Succeeded</span></p>"
}
]
}Use a Format node to inject dynamic values into the HTML template:
[Format "<h2>Deployment Report</h2><p>Service <strong>{0}</strong> deployed to <strong>{1}</strong>.</p><p>Status: {2}</p>"]
─ Result ─→ used as the content value in the message objectDynamic recipients
To send email to a recipient determined at runtime (for example, from a webhook payload):
- Use Get Property to extract the recipient email from the incoming data.
- Wire it into the message object where the
toemail address goes.
Using other email services
The pattern is nearly identical for other services. The main differences are the API endpoint, authentication method, and request body format.
Mailgun:
POST https://api.mailgun.net/v3/yourdomain.com/messages
Authorization: Basic (base64-encoded "api:your-api-key")
Content-Type: application/x-www-form-urlencoded
[email protected]&[email protected]&subject=Deployment completed&html=<h2>Done</h2>Resend:
POST https://api.resend.com/emails
Authorization: Bearer re_xxxxxxxxxxxx
Content-Type: application/json
{
"from": "[email protected]",
"to": ["[email protected]"],
"subject": "Deployment completed",
"html": "<h2>Deployment Report</h2><p>Succeeded</p>"
}Postmark:
POST https://api.postmarkapp.com/email
X-Postmark-Server-Token: your-server-token
Content-Type: application/json
{
"From": "[email protected]",
"To": "[email protected]",
"Subject": "Deployment completed",
"HtmlBody": "<h2>Deployment Report</h2><p>Succeeded</p>"
}Each service uses a different authentication header and body format, but the DRAGOPS pattern structure is the same: build headers with Set Property, build the body with Set Property and JSON Stringify (or Format for form-encoded bodies), and send with HTTP Request.
Receive inbound email
Some email services can forward incoming email to a webhook URL. When someone sends an email to a designated address, the service parses the email and sends the content as a JSON payload to your DRAGOPS pattern's webhook URL.
How inbound email forwarding works
- Configure your email service to forward incoming email to a webhook URL. Services that support this include SendGrid (Inbound Parse), Mailgun (Routes), and Postmark (Inbound).
- Set the webhook URL to your DRAGOPS pattern's webhook URL.
- When an email arrives, the service sends a POST request with the parsed email data: sender, recipients, subject, body (plain text and HTML), and attachments metadata.
SendGrid Inbound Parse example
SendGrid's Inbound Parse sends email data as a JSON payload:
{
"from": "[email protected]",
"to": "[email protected]",
"subject": "Server alert: high CPU usage",
"text": "CPU usage on web-server-01 exceeded 90% for 5 minutes.",
"html": "<p>CPU usage on <strong>web-server-01</strong> exceeded 90% for 5 minutes.</p>"
}Parse the incoming email in your pattern:
Complete example: Send an HTML email notification
This pattern receives a webhook with alert data and sends a formatted HTML email notification through an email API.
Incoming webhook payload
{
"alert_name": "High CPU usage",
"server": "web-server-01",
"cpu_percent": 94,
"threshold": 90,
"timestamp": "2026-03-05T14:30:00Z",
"notify_email": "[email protected]"
}Pattern layout
Step-by-step
- On Webhook receives the alert data.
- Five Get Property nodes extract
alert_name,server,cpu_percent,notify_email, andtimestamp. - Format builds the HTML email body:
<h2>Alert: {0}</h2> <table> <tr><td><strong>Server:</strong></td><td>{1}</td></tr> <tr><td><strong>CPU Usage:</strong></td><td>{2}%</td></tr> <tr><td><strong>Threshold:</strong></td><td>90%</td></tr> <tr><td><strong>Time:</strong></td><td>{3}</td></tr> </table> <p>This alert was generated automatically by DRAGOPS.</p> - The pattern builds the SendGrid request body as a JSON object. The
toemail address uses thenotify_emailvalue from the webhook payload, and thecontentuses the formatted HTML. - Set Property nodes build the headers:
Authorization: Bearer <api-key>andContent-Type: application/json. - HTTP Request sends the
POSTtohttps://api.sendgrid.com/v3/mail/send. - Branch checks for a
202status code (SendGrid's success response). - Log records the outcome.
Test the pattern
- Select Run in the toolbar.
- Enter test event data:
{
"body": {
"alert_name": "High CPU usage",
"server": "web-server-01",
"cpu_percent": 94,
"threshold": 90,
"timestamp": "2026-03-05T14:30:00Z",
"notify_email": "[email protected]"
},
"headers": {
"content-type": "application/json"
},
"query": {},
"method": "POST"
}- Verify the execution log shows the Format node producing the expected HTML and the HTTP Request node sending the POST to SendGrid.
Test with curl
Once deployed, trigger the pattern with a live request:
curl -X POST https://your-dragops-webhook-url \
-H "Content-Type: application/json" \
-d '{
"alert_name": "High CPU usage",
"server": "web-server-01",
"cpu_percent": 94,
"threshold": 90,
"timestamp": "2026-03-05T14:30:00Z",
"notify_email": "[email protected]"
}'Tips
- Store API keys in connections or secrets. Email API keys are sensitive credentials. Store them in a DRAGOPS connection or secret rather than hardcoding them in your pattern.
- Check sender verification. Most email services require you to verify the sender address or domain before you can send email. Verify your sender identity in the email service's dashboard before testing your pattern.
- Handle rate limits. Email services enforce sending limits (for example, SendGrid's free tier allows 100 emails per day). Check the API response for rate limit errors and add appropriate logging.
- Use HTML templates for consistency. For recurring notifications, design a reusable HTML template with placeholders and use the Format node to inject dynamic values. This keeps your email layout consistent across different alert types.
- Monitor delivery. Email services provide delivery dashboards where you can track sends, opens, bounces, and spam reports. Check these regularly to ensure your notifications are reaching recipients.
- Wrap API calls in Try / Catch. Network failures, authentication errors, and rate limits can all cause the HTTP request to fail. Use Try / Catch to handle these gracefully and log the failure.
Related
- Make HTTP requests -- HTTP Request node reference with authentication patterns
- Webhooks -- webhook URLs and inbound request handling
- Work with JSON -- build email API request bodies with Set Property and JSON Stringify
- Handle errors -- wrap email API calls in Try / Catch for reliability
- Connect external services -- store email API keys securely with connections