-
Notifications
You must be signed in to change notification settings - Fork 111
Docs for Email home page #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Aviatorscode2
wants to merge
21
commits into
channels-providers-integration
Choose a base branch
from
MRK-1106
base: channels-providers-integration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
683a317
Docs for Email home page
Aviatorscode2 82108ef
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 f343254
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 df59442
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 a30db20
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 fbff409
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 60c624a
Update based on feedback
Aviatorscode2 794c0a8
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 109c6d4
Add link
Aviatorscode2 99449d6
Merge branch 'MRK-1106' of https://github.com/novuhq/docs into MRK-1106
Aviatorscode2 e79e8fc
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 cae17e4
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 5ffe094
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 f02b774
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 8a42ca5
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 20db351
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 482f7f5
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 12400ff
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 7e4ddc1
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 8e1a02c
Update content/docs/platform/integrations/email/index.mdx
Aviatorscode2 5726e16
Update contet
Aviatorscode2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,78 +4,98 @@ title: 'E-mail' | |||||
| description: 'Learn how to configure the Email channel' | ||||||
| --- | ||||||
|
|
||||||
| import { Tab, Tabs } from 'fumadocs-ui/components/tabs'; | ||||||
| import { Step, Steps } from 'fumadocs-ui/components/steps'; | ||||||
|
|
||||||
| The Email Channel is a critical component for delivering notifications reliably. Whether it's a password reset, an onboarding email, or an alert about account activity, email remains a trusted medium for reaching users. | ||||||
| Novu simplifies this process, allowing you to focus on implementation rather than infrastructure. | ||||||
| Email providers are the services that deliver notifications to your subscribers’ email. Each provider must be set up individually in the Novu dashboard to enable delivery through the Email channel. | ||||||
|
|
||||||
| ## Key Features | ||||||
| Novu provides a unified integration layer that connects your workflows to these email providers. Once you’ve added your integrations, Novu handles routing and delivery automatically, sending each email through the correct provider without requiring additional setup. This makes it possible to manage multiple email integrations, and switch providers when needed. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| - **Multi-Provider Support**: Integrate any major provider like SendGrid, SES, or Mailgun | ||||||
| - **Failover Mechanisms**: Automatically retry with a backup provider to ensure reliability | ||||||
| - **Customizable Templates**: Leverage templates with dynamic placeholders to personalize messages | ||||||
| - **Delivery Insights (Coming Soon)**: Track delivery status, open rates, and more in the Novu dashboard | ||||||
| ## Key features | ||||||
|
|
||||||
| ## Common Use Cases | ||||||
| - **Multi-provider support**: Integrate any major provider like SendGrid, SES, or Mailgun | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| - **Failover mechanisms**: Automatically retry with a backup provider to ensure reliability | ||||||
| - **Activity tracking**: Track delivery status, open rates, and more in the Novu dashboard | ||||||
|
|
||||||
| - **Transactional Emails**: Password resets, account verification, purchase confirmations | ||||||
| - **System Alerts**: Security notifications, system updates | ||||||
| - **Engagement Emails**: Onboarding, reminders, promotional updates | ||||||
| ## How email works in Novu | ||||||
|
|
||||||
| Novu can be used to deliver email messages to your subscribers using a unified delivery API. You can easily integrate your favorite email provider using the built-in integration store. | ||||||
| Here’s the typical flow for sending an email notification through Novu: | ||||||
|
|
||||||
| <Steps> | ||||||
|
|
||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| <Step> | ||||||
|
|
||||||
| ### Add an email provider | ||||||
|
|
||||||
| Start by adding an email provider in the **Integration Store** on your Novu dashboard. You can connect one or more integrations for the different or the same providers. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| To learn [how to add an email provider](/platform/integrations/email#supported-providers), refer to the guide for the supported providers. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| </Step> | ||||||
| <Step> | ||||||
| ### Add the email channel to your workflow | ||||||
|
|
||||||
| Next, include an Email step in a workflow. This step defines when and how an email should be sent as part of your notification workflow. | ||||||
| </Step> | ||||||
| <Step> | ||||||
| ### Define the email content | ||||||
|
|
||||||
| Within the Email step, you can design your message using the built-in visual editor or code editor. Novu supports dynamic data from your payload, so each message can be personalized for the subscriber. | ||||||
| </Step> | ||||||
| <Step> | ||||||
| ### Store subscriber email addresses | ||||||
|
|
||||||
| Novu automatically sends the notification to the email address stored on the . You must ensure this field is set for any subscriber who needs to receive emails. You can store or subscribers’ email address using the Novu dashboard or API. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| </Step> | ||||||
| <Step> | ||||||
| ### Trigger the workflow | ||||||
|
|
||||||
| [Trigger the workflow](/api-reference/events/trigger-event) from your application code by sending an event to Novu. Novu automatically: | ||||||
| - Resolves the subscriber. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be a numbered list? |
||||||
| - Selects the correct provider. | ||||||
| - Renders the email template. | ||||||
| - Delivers the message through the configured email integration. | ||||||
| </Step> | ||||||
| </Steps> | ||||||
|
|
||||||
| <Callout type="info"> Looking to build your email template? Learn how to use the block editor, custom HTML, and dynamic variables in our guide.</Callout> | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ## Configuring email providers | ||||||
|
|
||||||
| When creating an email provider integration you will be asked to provide additional fields alongside the provider-specific credentials: | ||||||
| When you add an email provider in the **Integration Store**, you'll configure settings that are common to all email providers, as well as credentials specific to that provider. | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| - **Sender name** - Will be displayed as the sender of the message | ||||||
| - **From email address** - Emails sent using Novu will be sent using this address | ||||||
| ### Default sender settings | ||||||
|
|
||||||
| For some email providers including SendGrid you will have to authenticate the **From email address** to make sure you will send email messages using an authorized address. | ||||||
| Novu asks for two default settings for any email provider you connect: | ||||||
|
|
||||||
| ## Sending Email Overrides | ||||||
| * **Sender Name**: The name that will appear in the recipient's "From" field. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| * **From Email Address**: The email address the notification will be sent from. For some email providers, including SendGrid, you must authenticate the **From email address** to make sure you're sending an email from an authorized address. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| The overrides field supports an email property. The email overrides field have properties like `to`, `from`, `senderName` etc | ||||||
| These are the default values used for every email sent via this integration. You can override them at trigger time if needed. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| <Tabs items={['Node.js']}> | ||||||
| <Tab value="Node.js"> | ||||||
| ```javascript | ||||||
| import { Novu } from '@novu/api'; | ||||||
| ### Provider authentication | ||||||
|
|
||||||
| const novu = new Novu({ | ||||||
| secretKey: "<NOVU_SECRET_KEY>", | ||||||
| // Use serverURL for EU region | ||||||
| // serverURL: "https://eu.api.novu.co", | ||||||
| }); | ||||||
| You must provide credentials specific to your email provider, such as an API Key, Secret, or Region. Each provider has different requirements. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| await novu.trigger({ | ||||||
| workflowId: "workflowId", | ||||||
| to: { | ||||||
| subscriberId: "subscriberId", | ||||||
| }, | ||||||
| overrides: { | ||||||
| email: { | ||||||
| to: ['to@novu.co'], | ||||||
| from: 'from@novu.co', | ||||||
| senderName: 'Novu Team', | ||||||
| text: 'text version of email using overrides', | ||||||
| replyTo: 'no-reply@novu.co', | ||||||
| cc: ['1@novu.co'], | ||||||
| bcc: ['2@novu.co'], | ||||||
| }, | ||||||
| }, | ||||||
| }); | ||||||
| ``` | ||||||
| </Tab> | ||||||
| </Tabs> | ||||||
| <Callout type="info"> Refer to the [Supported Providers](/platform/integrations/email#supported-providers) list at the bottom of this page for detailed setup guides for each integration. </Callout> | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| <Callout type="info"> | ||||||
| It's very important to know that Novu merges the `to` field in the email overrides with the subscriber email. It DOES NOT REPLACE IT. | ||||||
| </Callout> | ||||||
| ### Setting up failover | ||||||
|
|
||||||
| ## Sending Email attachments | ||||||
| Novu ensures high deliverability with an automatic failover system. You can have multiple active email providers in the same environment. | ||||||
|
|
||||||
| You can easily send attachments with the Novu API by passing the attachments array when triggering an Email based workflow. Attachment file can either be in the `buffer` or `base64` format. There is total limit of 20 mb for all attachments included and email size. | ||||||
| * Primary integration: You must designate one of your active providers as the primary provider. Novu always attempts to send the email using this provider first. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| * Failover logic: If the primary provider fails to send the notification, then Novu will automatically retries sending the email through one of your other active providers. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| This built-in redundancy means you don't have to manage provider downtime yourself. | ||||||
|
|
||||||
| ## Advanced email features | ||||||
|
|
||||||
| You can control advanced email features at runtime by passing data in your trigger call. This lets you send attachments, override default settings, or target a specific provider for a single notification. | ||||||
|
|
||||||
| ### Sending attachments | ||||||
|
|
||||||
| You can send attachments by passing an `attachments` array in the `payload` of your trigger. The attachment file can be provided as a `buffer` or a `base64` encoded string. | ||||||
|
|
||||||
| There is a total limit of 20MB for all attachments included in an email. | ||||||
|
|
||||||
| <Tabs items={['Node.js', 'cURL']}> | ||||||
| <Tab value="Node.js"> | ||||||
|
|
@@ -93,7 +113,7 @@ await novu.trigger({ | |||||
| to: { | ||||||
| subscriberId: "subscriberId", | ||||||
| }, | ||||||
| payload: { | ||||||
| payload: { // [!code ++:16] | ||||||
| attachments: [ | ||||||
| { | ||||||
| // buffer format | ||||||
|
|
@@ -147,18 +167,49 @@ curl -L -X POST 'https://api.novu.co/v1/events/trigger' \ | |||||
| </Tab> | ||||||
| </Tabs> | ||||||
|
|
||||||
| ## Using different email integration | ||||||
| ### Sending email overrides | ||||||
|
|
||||||
| In Novu integration store, multiple email channel type provider integrations can be active at the same time. But only one provider integration can be primary at a time. This primary integration will be used as a provider to deliver the email by default. If you want to use a different active provider integration then you can use the `integrationIdentifier` email overrides field. | ||||||
| You can override the email settings for a single trigger by passing an `overrides` object. This lets you change the `to` address, `senderName`, `from` address, and more. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| If there are 4 active email integrations with these identifiers: | ||||||
| <Tabs items={['Node.js']}> | ||||||
| <Tab value="Node.js"> | ||||||
| ```javascript | ||||||
| import { Novu } from '@novu/api'; | ||||||
|
|
||||||
| 1. sendgrid-abcdef | ||||||
| 2. sendgrid-ghijkl | ||||||
| 3. brevo-abcdef | ||||||
| 4. mailersend-abcdef | ||||||
| const novu = new Novu({ | ||||||
| secretKey: "<NOVU_SECRET_KEY>", | ||||||
| // Use serverURL for EU region | ||||||
| // serverURL: "https://eu.api.novu.co", | ||||||
| }); | ||||||
|
|
||||||
| Here, if `sendgrid-abcdef` is primary integration and you want to use `brevo-abcdef` with this trigger then you can use `integrationIdentifier` email overrides field as below: | ||||||
| await novu.trigger({ | ||||||
| workflowId: "workflowId", | ||||||
| to: { | ||||||
| subscriberId: "subscriberId", | ||||||
| }, | ||||||
| overrides: { // [!code ++:11] | ||||||
| email: { | ||||||
| to: ['to@novu.co'], | ||||||
| from: 'from@novu.co', | ||||||
| senderName: 'Novu Team', | ||||||
| text: 'text version of email using overrides', | ||||||
| replyTo: 'no-reply@novu.co', | ||||||
| cc: ['1@novu.co'], | ||||||
| bcc: ['2@novu.co'], | ||||||
| }, | ||||||
| }, | ||||||
| }); | ||||||
| ``` | ||||||
| </Tab> | ||||||
| </Tabs> | ||||||
|
|
||||||
| <Callout type="info">It's very important to know that Novu merges the `to` field in the email overrides with the subscriber email. It does _not_ replace it.</Callout> | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| ### Targeting a specific provider | ||||||
|
|
||||||
| By default, Novu uses your primary email provider. However, if you want to bypass this and force a specific, active integration for a trigger, use the `integrationIdentifier`. | ||||||
|
|
||||||
| This is useful if you have multiple active integrations for different purposes. For example, you might have one integration for transactional emails and one for marketing emails. You can find the `integrationIdentifier` in the **Integration Store** page. | ||||||
Aviatorscode2 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
|
|
||||||
| <Tabs items={['Node.js']}> | ||||||
| <Tab value="Node.js"> | ||||||
|
|
@@ -178,18 +229,36 @@ await novu.trigger({ | |||||
| }, | ||||||
| overrides: { | ||||||
| email: { | ||||||
| integrationIdentifier: "brevo-abcdef" | ||||||
| integrationIdentifier: "brevo-abcdef" // [!code ++] | ||||||
| }, | ||||||
| }, | ||||||
| }); | ||||||
| ``` | ||||||
| </Tab> | ||||||
| </Tabs> | ||||||
|
|
||||||
| <Callout type="info"> | ||||||
| Integration identifier is similar to Provider identifier but it is different than Provider Id. It is unique for each integration. You can find the `integrationIdentifier` in the integration store page. | ||||||
| </Callout> | ||||||
|
|
||||||
| <Callout type="info"> | ||||||
| Looking to integrate an email provider? Check out our [provider integrations](/platform/integrations/email). | ||||||
| </Callout> | ||||||
| ## Supported providers | ||||||
|
|
||||||
| Here are the email providers that are currently supported by Novu. Select any provider to see its detailed setup guide. | ||||||
|
|
||||||
| <Cards> | ||||||
| <Card title="SendGrid" href="/platform/integrations/email/sendgrid"> Learn how to use the SendGrid provider to send emails using Novu.</Card> | ||||||
Aviatorscode2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| <Card title="Amazon SES" href="/platform/integrations/email/amazon-ses"> Learn how to use the Amazon SES provider to send emails using Novu.</Card> | ||||||
| <Card title="Postmark" href="/platform/integrations/email/postmark"> Learn how to use the Postmark provider to send emails using Novu.</Card> | ||||||
| <Card title="Resend" href="/platform/integrations/email/resend"> Learn how to use the Resend provider to send emails using Novu.</Card> | ||||||
| <Card title="Brevo" href="/platform/integrations/email/brevo"> Learn how to use the Brevo provider to send emails using Novu.</Card> | ||||||
| <Card title="Mailgun" href="/platform/integrations/email/mailgun"> Learn how to use the Mailgun provider to send emails using Novu.</Card> | ||||||
| <Card title="Mailjet" href="/platform/integrations/email/mailjet"> Learn how to use the Mailjet provider to send emails using Novu.</Card> | ||||||
| <Card title="Braze" href="/platform/integrations/email/braze"> Learn how to use the Braze provider to send emails using Novu.</Card> | ||||||
| <Card title="Infobip" href="/platform/integrations/email/infobip"> Learn how to use the Infobip provider to send emails using Novu.</Card> | ||||||
| <Card title="MailerSend" href="/platform/integrations/email/mailersend"> Learn how to use the MailerSend provider to send emails using Novu.</Card> | ||||||
| <Card title="Mailtrap" href="/platform/integrations/email/mailtrap"> Learn how to use the Mailtrap provider to send emails using Novu.</Card> | ||||||
| <Card title="Mandrill" href="/platform/integrations/email/mandrill"> Learn how to use the Mandrill provider to send emails using Novu.</Card> | ||||||
| <Card title="Maqsam" href="/platform/integrations/email/maqsam"> Learn how to use the Maqsam provider to send emails using Novu.</Card> | ||||||
| <Card title="Netcore" href="/platform/integrations/email/netcore"> Learn how to use the Netcore provider to send emails using Novu.</Card> | ||||||
| <Card title="Outlook 365" href="/platform/integrations/email/outlook-365"> Learn how to use the Outlook 365 provider to send emails using Novu.</Card> | ||||||
| <Card title="Plunk" href="/platform/integrations/email/plunk"> Learn how to use the Plunk provider to send emails using Novu.</Card> | ||||||
| <Card title="Sparkpost" href="/platform/integrations/email/sparkpost"> Learn how to use the Sparkpost provider to send emails using Novu.</Card> | ||||||
| <Card title="Email Webhook" href="/platform/integrations/email/email-webhook"> Learn how to use the Email Webhook provider to send emails using Novu.</Card> | ||||||
| <Card title="Custom SMTP" href="/platform/integrations/email/custom-smtp"> Learn how to use a Custom SMTP provider to send emails using Novu.</Card> | ||||||
| </Cards> | ||||||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| { | ||
| "icon": "Mail", | ||
| "pages": ["adding-email", "writing-email-template", "...", "activity-tracking"] | ||
| "pages": ["(providers)", "activity-tracking"] | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.