feat(integrations/email-notifier): add email-notifier Integration#14876
Draft
Horisofine wants to merge 21 commits intomasterfrom
Draft
feat(integrations/email-notifier): add email-notifier Integration#14876Horisofine wants to merge 21 commits intomasterfrom
Horisofine wants to merge 21 commits intomasterfrom
Conversation
Contributor
Horisofine
commented
Jan 26, 2026
- Sending capabilities using AWS SES
- Introduced a new Email Notifier integration allowing bots to send emails.
- Implemented actions for sending emails, including HTML formatting and error handling.
- Added necessary configuration files, constants, and utility functions for AWS SES integration.
- Included a README file detailing usage and setup instructions.
- Sending capabilities using AWS SES - Introduced a new Email Notifier integration allowing bots to send emails. - Implemented actions for sending emails, including HTML formatting and error handling. - Added necessary configuration files, constants, and utility functions for AWS SES integration. - Included a README file detailing usage and setup instructions.
Horisofine
commented
Jan 26, 2026
Contributor
Author
Horisofine
left a comment
There was a problem hiding this comment.
Here is a checklist before merging into botpress:
- Update the Hub.md if needed
- Remove "plus" from the integration name (in integration.definition.ts)
- Does the integration still support old createConversation and createUser callbacks? If yes, we should either migrate to the proactive interfaces or remove the feature
- Remove Markdown message type.
- Does the integration still use the legacy transformer? If yes, we should migrate to the new one.
- Is a channel named channel? If yes, is it the proper name in the external service or should use a better name?
- Is there a bp lint disable comment? If yes, we should remove it and fix linting issue.
Replace the fully inlined tsconfig.json with one that extends the shared root ../../tsconfig.json, matching the convention used by all other integrations. This also fixes the es2017 target drift (root uses es2022).
…ss/sdk Replace pinned dependency versions with workspace:* protocol to stay in sync with the monorepo, matching all other integrations.
…v dep Add standard build, check:bplint, and test scripts to match repo conventions. Add @botpress/cli and @botpress/sdk as devDependencies.
The monorepo uses a single root-level lockfile managed by the pnpm workspace. No other integration has a local pnpm-lock.yaml.
Add standard eslint and vitest configuration files that extend the shared root configs, matching all other integrations.
Add 'Marketing & Email' category so the integration appears correctly in hub category filters, matching sendgrid and resend.
Replace 'src/definitions/index' with './src/definitions/index' for a more explicit and standard relative import.
Remove deep import from '.botpress/implementation/typings/...' and use inline type annotations instead. The return type is already constrained by the bp.IntegrationProps type on the function signature.
Remove the unused empty states object from definitions and the integration definition. Other integrations simply omit states when they have none.
The MessageId is already narrowed by the guard on line 65 (if (!result.MessageId) throw ...), making the ! assertion unnecessary.
…eturn type
Instead of throwing a raw object literal (anti-pattern that breaks stack
traces and instanceof checks), refactor sendEmailToRecipient to return
a discriminated union { success: true, ... } | { success: false, ... }.
Replace Promise.allSettled with Promise.all since the inner function
no longer throws.
… console.log - Remove the mutable module-level `let _ses` singleton pattern from client.ts; create a fresh SESv2Client on each call instead. - Remove top-level `getSesClient()` call in utils.ts that ran at import time before secrets were available. - Replace console.log with logger.forBot().warn() in addContactToList, passing the SES client and logger as explicit parameters.
The outer try/catch was unreachable since sendEmailToRecipient never
throws (all errors are returned as { success: false } results). Remove
it along with the unused @botpress/sdk import, and rename SESClient to
sesClient for consistent casing.
Add escapeHtml utility to prevent HTML/script injection when plain-text user input is interpolated into email templates. In the isHtml=true path, body is trusted as raw HTML (user intent), but the header is still escaped. In the plain-text path, body is fully escaped before \n-to-<br> conversion.
23 tests covering: - escapeHtml: all 5 HTML entities, XSS payloads, edge cases - getErrorMessage: all AWS SES exception types, generic Error, string, object with message, and fallback cases
Add a configuration schema with optional fromEmail and contactListName
fields that default to the previous hardcoded values ('noreply@bp-mailer.com'
and 'default'). This is non-breaking: existing users get the same
behavior, new users can override via configuration.
Replace fragile Google Drive link (drive.google.com/uc?export=view&...) with the standard Botpress shop CDN URL already used across the codebase (shop.botpress.com/cdn/shop/files/logo.png).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.