Skip to main content

Introduction

Automatically send transactional emails for payment confirmations, subscription updates, and important notifications using SendGrid. Trigger personalized emails based on payment events with dynamic content and professional templates.
This integration requires a SendGrid API Key with Mail Send permissions.

Getting Started

1

Open the Webhook Section

In your Dodo Payments dashboard, navigate to Webhooks → + Add Endpoint and expand the integrations dropdown.
Add Endpoint and integrations dropdown
2

Select SendGrid

Choose the SendGrid integration card.
3

Enter API Key

Provide your SendGrid API Key in the configuration.
4

Configure Transformation

Edit the transformation code to format emails for SendGrid’s Mail Send API.
5

Test & Create

Test with sample payloads and click Create to activate the email sending.
6

Done!

🎉 Payment events will now automatically trigger transactional emails via SendGrid.

Transformation Code Examples

Payment Confirmation Email

payment_confirmation.js

Subscription Welcome Email

subscription_welcome.js

Payment Failure Notification

payment_failure.js

Tips

  • Use SendGrid dynamic templates for personalized content
  • Include relevant payment data in template variables
  • Set proper from addresses and sender names
  • Use template IDs for consistent email formatting
  • Include unsubscribe links for compliance

Troubleshooting

  • Verify API Key has Mail Send permissions
  • Check that template IDs are valid and active
  • Ensure recipient email addresses are valid
  • Review SendGrid sending limits and quotas
  • Validate JSON structure matches SendGrid API format
  • Check that all required fields are present
  • Ensure template data variables are properly formatted
  • Verify from email addresses are verified in SendGrid
Last modified on April 8, 2026