Skip to content

Commit e677f3a

Browse files
Aviatorscode2coderabbitai[bot]DianaHackmambadjabarovgeorge
authored
Content for email activity tracking (#978)
* Content for inbound webhooks page * Update content/docs/platform/developer/webhooks/inbound-webhooks.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Docs for Sendgrid maual configuration * Add docs for the Mailgun guide * Docs for Resend page * docs for amazon ses * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update developer section and removed the inbound webhook page * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update content/docs/platform/integrations/email/activity-tracking/index.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/mailgun.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/mailgun.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/mailgun.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update based on feedback * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: George Djabarov <[email protected]> * feedbacks * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: DianaHackmamba <[email protected]> * Update content/docs/platform/integrations/email/activity-tracking/manual-configuration/ses.mdx Co-authored-by: DianaHackmamba <[email protected]> * Fix issue with logical order * Fixed ses page * Update based on George's feedback * Update docs based on feedback * update icon for webhook page --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: DianaHackmamba <[email protected]> Co-authored-by: George Djabarov <[email protected]>
1 parent b11727e commit e677f3a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+441
-4
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"pages": ["webhooks"]
3+
}

content/docs/platform/concepts/webhooks.mdx renamed to content/docs/platform/developer/webhooks.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: 'Outbound Webhooks'
3-
pageTitle: 'Outbound Webhooks'
2+
title: 'Webhooks'
3+
pageTitle: 'Webhooks'
44
description: 'Receive notifications when events occur in your Novu account'
55
icon: 'Webhook'
66
---
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
---
2+
pageTitle: 'Activity Tracking'
3+
title: 'Activity Tracking'
4+
description: 'Learn how to enable activity tracking to get real-time delivery and engagement events like delivered, opened, and clicked from your email providers.'
5+
---
6+
7+
Activity tracking gives you visibility into what happens to notifications after they are sent to the subscriber. With it, Novu receive and process real-time events from third-party providers, so that you know when the notification is delivered, opened, clicked, or bounced.
8+
9+
## How activity tracking works
10+
11+
When your provider emits an event (for example, an email delivered or bounced), Novu:
12+
- Receives the event via inbound webhooks.
13+
- Create step-run trace, so the event is visible in the activity feed.
14+
- Forwards supported events to outbound webhooks if they are enabled in your project.
15+
- Enriches the workflow-run lifecycle with engagement and delivery data, which empowers analytics and workflow variables.
16+
17+
With activity tracking enabled, you get a full picture of the workflow-run lifecycle, not just that a message was “sent,” but whether it reached the recipient, was opened, or engaged with. This closes the feedback loop and allows you to build more reliable notification experiences.
18+
19+
## How to enable activity tracking
20+
21+
First [create the integration](/platform/integrations/email/adding-email). After that, you can enable activity tracking by following these steps:
22+
1. Log in to the Novu dashboard
23+
2. Navigate to the **Integrations Store** page from the sidebar of your Novu dashboard.
24+
3. Click **Connect Provider** and select the email provider you want to configure.
25+
4. Scroll down to find the **Email Activity Tracking** section and click the toggle to enable it.
26+
![Enable the inbound webhook](/images/developer-tools/enable-inbound.png)
27+
When enabled, Novu will auto-configure delivery webhooks using your existing API key.
28+
![Inbound webhook enabled](/images/developer-tools/inbound-enabled.png)
29+
30+
## Manual configuration
31+
32+
If auto-configuration fails or isn’t supported for your provider, you will need to set it up manually. You can do that by following these provider specific guides:
33+
34+
<Cards>
35+
<Card title="Email" href="/platform/integrations/email">
36+
Amazon SES
37+
</Card>
38+
<Card title="SMS" href="/platform/integrations/sms">
39+
Mailgun
40+
</Card>
41+
<Card title="SendGrid" href="/platform/integrations/email/activity-tracking/manual-configuration/sendgrid">
42+
SendGrid manual configuration
43+
</Card>
44+
<Card title="Chat" href="/platform/integrations/chat">
45+
Resend
46+
</Card>
47+
</Cards>
48+
49+
## Event semantics in Novu
50+
51+
Inbound webhook events are normalized into a consistent set of Novu event statuses. These statuses let you track the full lifecycle of a notification across providers in a unified way.
52+
53+
| Novu status | Meaning |
54+
| -------------- | ------------------------------------------------------------------------------------- |
55+
| `bounced` | The message was rejected by the recipient’s server (hard or soft bounce). |
56+
| `clicked` | The recipient clicked a link inside the message. |
57+
| `complaint` | The recipient marked the message as spam or filed a complaint. |
58+
| `delayed` | The provider delayed the message delivery (for example, due to throttling). |
59+
| `delivered` | The provider confirmed that the message was delivered to the recipient’s server. |
60+
| `dropped` | The provider dropped the message before attempting delivery. |
61+
| `opened` | The recipient opened the message (tracked via the provider’s open logic). |
62+
| `rejected` | The provider could not send the message (for example, invalid address, failed policy check). |
63+
| `sent` | The provider has accepted the message for delivery. |
64+
| `unsubscribed` | The recipient unsubscribed from further messages. |
65+
66+
## Supported providers and events
67+
68+
Novu currently supports inbound webhooks for several email providers. Each provider sends events in its own format, which Novu normalizes into a consistent set of internal statuses. These normalized statuses are used in the activity feed, step-run traces, and outbound webhook forwarding.
69+
70+
Events not listed in the tables below are ignored.
71+
72+
### SendGrid
73+
74+
| Provider event (`<native_status>`) | Novu event (`<novu_event_status>`) |
75+
| ---------------------------------- | ---------------------------------- |
76+
| `bounce` | `bounced` |
77+
| `click` | `clicked` |
78+
| `delivered` | `delivered` |
79+
| `dropped` | `dropped` |
80+
| `open` | `opened` |
81+
82+
### Mailgun
83+
84+
| Provider event (`<native_status>`) | Novu event (`<novu_event_status>`) |
85+
| ---------------------------------- | ---------------------------------- |
86+
| `clicked` | `clicked` |
87+
| `complained` | `complaint` |
88+
| `delivered` | `delivered` |
89+
| `opened` | `opened` |
90+
| `permanent_fail`, `failed` | `rejected` |
91+
| `unsubscribed` | `unsubscribed` |
92+
93+
### Resend
94+
95+
| Provider event (`<native_status>`) | Novu event (`<novu_event_status>`) |
96+
| ---------------------------------- | ---------------------------------- |
97+
| `email.bounced` | `bounced` |
98+
| `email.clicked` | `clicked` |
99+
| `email.complained` | `complaint` |
100+
| `email.delivered` | `delivered` |
101+
| `email.delivery_delayed` | `delayed` |
102+
| `email.failed` | `rejected` |
103+
| `email.opened` | `opened` |
104+
| `email.sent` | `sent` |
105+
106+
### Amazon SES
107+
108+
| Provider event (`<native_status>`) | Novu event (`<novu_event_status>`) |
109+
| ---------------------------------- | ---------------------------------- |
110+
| `Bounce` | `bounced` |
111+
| `Complaint` | `complaint` |
112+
| `Click` | `clicked` |
113+
| `Delivery` | `delivered` |
114+
| `DeliveryDelay` | `delayed` |
115+
| `Open` | `opened` |
116+
| `Reject` | `rejected` |
117+
| `Send` | `sent` |
118+
119+
## Viewing event data
120+
121+
Once your inbound webhooks are configured, Novu will start processing events from your provider. You can see this new data in two key places within the platform.
122+
123+
### Activity feed
124+
125+
The Activity Feed provides the most direct view of the notification lifecycle. After a notification is sent, you will see new status updates such as Delivered, Opened, and Clicked appear in the timeline as they are received from your provider. This gives you a complete, real-time picture of subscriber engagement for each notification.
126+
127+
### Outbound webhooks integration
128+
129+
Inbound webhooks don’t just update Novu internally, they can also trigger outbound webhooks, allowing you to send normalized events to your own systems in real time. This makes it possible to extend Novu’s notification lifecycle into your existing infrastructure.
130+
131+
How it works:
132+
133+
1. A provider emits an event (for example, delivered).
134+
2. Novu receives and normalizes the event (for example, → delivered).
135+
3. Novu updates its internal message entity and step-run trace.
136+
4. If outbound webhooks are enabled, Novu forwards the normalized event to your configured outbound webhook endpoint.
137+
138+
This is useful in a number of use cases including:
139+
- Internal logging: Forward all events into your organization’s centralized logging pipeline.
140+
- Custom analytics: Combine Novu’s lifecycle data with your own metrics to measure engagement and delivery performance.
141+
- Workflow triggers: Kick off custom business logic when specific events occur (for example, flagging accounts with high bounce rates).
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
pageTitle: 'Mailgun manual configuration'
3+
title: 'Mailgun'
4+
description: 'A step-by-step guide to manually add specific event webhooks in Mailgun for Novu activity tracking.'
5+
---
6+
7+
By default, Mailgun API keys have the required permissions for Novu to auto-configure webhooks when email activity tracking is enabled in the Novu dashboard. In most cases, you won’t need to do any manual setup. However, you might want to track specific Mailgun events the Novu supports.
8+
9+
This guide explains how to manually add new webhooks for specific events directly from your Mailgun dashboard.
10+
11+
## Step 1: Get your webhook URL from Novu
12+
13+
First, you need the unique webhook URL from your Novu dashboard that will receive events from Mailgun.
14+
15+
1. Log in to the Novu dashboard.
16+
2. Navigate to the **Integration Store** page in Novu and then select your **Mailgun** integration.
17+
3. Enable the **Email Activity Tracking** toggle.
18+
This generates an Inbound Webhook URL unique to your integration.
19+
20+
4. Copy the URL, you’ll use it in the Mailgun dashboard if you want to add specific events manually.
21+
![Mailgun Inbound Webhook URL](/images/channels-and-providers/email/activity-tracking/mailgun.png)
22+
23+
## Step 2: Add an event webhook in Mailgun
24+
25+
Next, log in to your Mailgun account to create a new webhook for the specific event you want to track.
26+
27+
1. Log in to your Mailgun account.
28+
2. Navigate to **Send** section in the left sidebar, and then select **Webhooks**.
29+
2. Click **Add webhook**.
30+
![Add Mailgun webhook](/images/channels-and-providers/email/activity-tracking/add-mailgun-webhook.png)
31+
3. A menu will appear. Configure the webhook with the following settings:
32+
- **Event type:** Select the event you want to track from the dropdown menu.
33+
- **URL:** Paste the **Inbound Webhook URL** you copied from Novu.
34+
4. Click **Create Webhook**.
35+
![Create Mailgun Webhook](/images/channels-and-providers/email/activity-tracking/create-mailgun-webhook.png)
36+
37+
## Step 3: Add additional events (Optional)
38+
39+
Your new webhook for the selected event is now active. To track other events, you must repeat the process in **Step 2** for each one. We recommend adding webhooks for all events that Novu supports:
40+
41+
- Delivered messages
42+
- Opens
43+
- Clicks
44+
- Unsubscribes
45+
- Spam complaints
46+
- Permanent failures
47+
48+
Once configured, Mailgun will begin sending real-time data for these events to Novu, which you can monitor in your **Activity Feed**.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"pages": ["ses", "mailgun", "resend", "sendgrid"]
3+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
pageTitle: 'Resend manual configuration'
3+
title: 'Resend'
4+
description: 'A step-by-step guide to manually configure Resend event webhooks for Novu activity tracking.'
5+
---
6+
7+
Resend does not currently support auto-configuration of webhooks through their API. To track events in Novu, you’ll need to set up the webhook manually in your Resend dashboard.
8+
9+
## Step 1: Get your webhook URL from Novu
10+
11+
First, you need the unique webhook URL from your Novu dashboard that will receive events from Resend.
12+
13+
1. Navigate to the **Integration Store** page in Novu and select your **Resend** integration.
14+
2. Enable the **Email Activity Tracking** toggle.
15+
3. A unique Inbound Webhook URL will be displayed. Click the **copy** icon to copy it.
16+
![Copy Webhook URL from Novu](/images/channels-and-providers/email/activity-tracking/inbound-webhook-resend.png)
17+
18+
## Step 2: Create the webhook in Resend
19+
20+
Next, log in to your Resend dashboard to create the webhook.
21+
22+
1. From the sidebar menu of your Resend dashboard, click on **Webhooks**.
23+
2. On the webhooks page, click **Add webhook**.
24+
![Add webhook](/images/channels-and-providers/email/activity-tracking/resend-webhook.png)
25+
3. In the menu that appears, configure the following:
26+
- **Endpoint URL:** Paste the **Inbound Webhook URL** you copied from Novu.
27+
- **Events to send:** Select **Email** to subscribe to all email events.
28+
![Add webhook](/images/channels-and-providers/email/activity-tracking/add-webhook-resend.png)
29+
4. Click **Add** to create the webhook.
30+
31+
Your Resend account will now forward email events to Novu, where they will appear in the Activity Feed and the execution details in the event logs.
32+
33+
## Step 3: Add the signing secret (Recommended)
34+
35+
For a more secure and authenticated connection, you should add the webhook's signing secret back into Novu. This step is optional but highly recommended.
36+
37+
1. After creating the webhook in Resend, you will get **Signing Secret**. Copy this secret.
38+
![Signing secret](/images/channels-and-providers/email/activity-tracking/signing-secret-resend.png)
39+
2. Return to your Resend integration settings in Novu.
40+
3. Under the **Email Activity Tracking** section, paste the secret into the **Inbound Webhook Signing Key** field.
41+
![Inbound Signing Key](/images/channels-and-providers/email/activity-tracking/inbound-signing-key-resend.png)
42+
4. Click **Save Changes**.
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
pageTitle: 'SendGrid Manual Configuration'
3+
title: 'SendGrid'
4+
description: 'A step-by-step guide to manually configure SendGrid event webhooks for Novu activity tracking.'
5+
---
6+
7+
If the API key used in your Novu SendGrid integration does not have the required permissions, the automatic setup will fail with an `access forbidden` error. This indicates that Novu lacks the permissions needed to configure the webhook on your behalf.
8+
9+
This guide will walk you through resolving this issue.
10+
11+
## Step 1: Update SendGrid API key permissions
12+
13+
First, you need to update your API key in your SendGrid account to grant the necessary permissions.
14+
15+
1. Log in to your SendGrid account.
16+
2. Under **Settings**, click **API Keys**.
17+
3. Choose whether to edit an existing key or create a new one:
18+
- To create a new API key, click **Create API Key**.
19+
- To update an existing key, click the settings icon next to it and select **Edit API Key**.
20+
![Edit existing key or creating a new one](/images/channels-and-providers/email/activity-tracking/sendgrid-api.png)
21+
4. Set the key permissions to either:
22+
- **Full Access**, or
23+
- Custom Access with at least the following enabled:
24+
- **Mail Send**
25+
- **Mail Settings**
26+
![Custom access](/images/channels-and-providers/email/activity-tracking/custom-access.png)
27+
5. If you created a new key, return to the Novu dashboard and update your SendGrid integration settings with the new API key.
28+
29+
## Step 2: Enable activity tracking in Novu
30+
Once your API key has the correct permissions, return to your Novu dashboard to complete the setup.
31+
32+
1. Navigate to the **Integrations** page and select your **SendGrid** integration.
33+
2. Click the **Email Activity Tracking** toggle to enable it.
34+
35+
With the updated permissions, Novu should now successfully auto-configure the webhook for you. You should see a green checkmark indicating that the webhook is active. If you see this, your setup is complete.
36+
37+
![Enable activity tracking in Novu](/images/channels-and-providers/email/activity-tracking/enable-activity-tracking.gif)
38+
39+
## Step 3: Manual configuration (only if auto-configuration fails)
40+
41+
If the automatic configuration fails for any reason, or if you prefer to set it up manually, follow these steps.
42+
43+
### Part 1: Configure the webhook in SendGrid
44+
45+
1. In your Novu SendGrid integration settings, enable the **Email Activity Tracking** toggle to reveal the **Inbound Webhook URL**
46+
2. Copy the this Inbound Webhook URL.
47+
3. Log in to the SendGrid dashboard.
48+
4. Go to the Settings page, and click **Mail Settings**.
49+
5. Click on **Event Webhook**.
50+
6. Click **Create new webhook**
51+
![Create new SendGrid webhook](/images/channels-and-providers/email/activity-tracking/sendgrid-webhook.png)
52+
7. Give the webhook a friendly name.
53+
8. Paste the Inbound Webhook URL copied from Novu into the **Post URL** field.
54+
9. Under **Actions to be posted**, select the events Novu supports that you want to track
55+
![Add new event webhook](/images/channels-and-providers/email/activity-tracking/add-new-event-webhook.png)
56+
10. Under Singnature Verification, enable **Enable Signed Event Webhook**
57+
11. Click **Save**
58+
59+
60+
### Part 2: Add the signing key to Novu (Recommended)
61+
62+
For enhanced security, you should add a signing key to verify that webhooks are coming from SendGrid.
63+
64+
1. Log in to the SendGrid dashboard.
65+
2. Go to the Settings page, and click **Mail Settings**.
66+
3. Click the settings icon next to the webhhok a menu will appear.
67+
4. Click **Edit**.
68+
![Add new event webhook](/images/channels-and-providers/email/activity-tracking/edit-sendgrid-webhook.png)
69+
5. Enable **Signed Webhook Verification** if is hasn't been enabled. A **Verification Key** will be displayed.
70+
6. Copy the verification key.
71+
![Add new event webhook](/images/channels-and-providers/email/activity-tracking/sendgrid-verification-key.png)
72+
3. Return to your Novu SendGrid integration settings.
73+
4. Paste the key you just copied from SendGrid into the **Inbound Webhook Signing Key** field.
74+
![Add new event webhook](/images/channels-and-providers/email/activity-tracking/inbound-signing-key-sendgrid.png)
75+
5. Click **Save**.
76+
77+
Your SendGrid integration is now manually configured to send activity data to Novu.

0 commit comments

Comments
 (0)