Support Email Provider Configurations via API with multi-providers and async/sync sending modes #1933
UdeshAthukorala
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Description
Currently, Thunder supports SMS provider configuration through a well-designed API (
/notification-senders/message) with full CRUD operations and support for multiple providers (Twilio, Vonage, Custom). However, email provider configuration does not have the same level of support. The current email implementation has the following limitations:1. No API support
Email is configured exclusively through the
email.smtpsection ofdeployment.yaml. There is no REST API to create, update, list, or delete email providers at runtime. This means any change to email configuration requires modifying the config file and restarting the server.2. Only support SMTP based Email Providers (No HTTP-based email provider support)
The current implementation only supports the SMTP transport (
backend/internal/system/email/smtp_client.go). Many modern email services expose HTTP APIs (SendGrid, Amazon SES API, Mailgun, Postmark, Azure Communication Services) that are often preferred for cloud-native deployments. Thunder has no way to integrate with these.3. Only supports Synchronous delivery
The current
emailExecutorsends emails synchronously within the flow execution pipeline. There is no option for asynchronous dispatch. This creates two problems:4. Only support a single provider instance - (Low Priority)
Only one email configuration is supported at a time, and there is no way to configure multiple email providers. If there is a service degradation in the configured email provider, there is no ability to easily switch over to a secondary email provider. There is also no concept of a "default" provider that can be seamlessly overridden when needed.
Proposed Solution
1. Email Provider Management API
Introduce a new set of endpoints under
/notification-senders/email, following the same pattern as the existing/notification-senders/messageAPI:GET/notification-senders/emailPOST/notification-senders/emailGET/notification-senders/email/{id}PUT/notification-senders/email/{id}DELETE/notification-senders/email/{id}PATCH/notification-senders/email/{id}/defaultThese endpoints should be secured with OAuth2 system scope, consistent with the existing notification sender API.
2. Multiple Provider Types: SMTP and HTTP
The email provider model should support two provider types, mirroring how SMS already supports Twilio, Vonage, and Custom:
smtphost,port,username,password,from_address,enable_start_tls,enable_authenticationhttpurl,http_method,http_headers,content_type,payload_template3. Synchronous and Asynchronous Email Delivery
Different customers require different delivery semantics. The system should support both modes:
Synchronous (blocking):
Asynchronous (non-blocking):
The delivery mode should be configurable per-provider.
4. Multiple Email Providers with Default Selection
The system should support configuring multiple email providers simultaneously, with one designated as the default. A hard limit can be defined for the maximum number of email providers that can be configured per organization.
Beta Was this translation helpful? Give feedback.
All reactions