Pawan Jain
Pawan Jain
NNovu
Created by Mark Garcia on 5/14/2025 in #💬│support
Headless using Novu/JS
@Mark Garcia Did not get chance to check with wrapping this in hooks What is your usecase with wrapping it over a hook?
25 replies
NNovu
Created by Mark Garcia on 5/14/2025 in #💬│support
Headless using Novu/JS
@Mark Garcia Checkout this code 👇🏻
"use client";

import { Novu } from "@novu/js";
import { useMemo, useState, useEffect } from "react";
import { env } from "@/env.mjs";

export const HeadlessNotification = () => {
const [list, setList] = useState<any[]>([]);
const applicationId = env.NEXT_PUBLIC_NOVU_APPLICATION_IDENTIFIER;
const memberId = env.NEXT_PUBLIC_SUBSCRIBER_ID;

const novu = useMemo(() => {
console.log("applicationId", applicationId);
return new Novu({
applicationIdentifier: applicationId,
subscriberId: memberId,
});
}, [applicationId, memberId]);

const getNovuNotifications = async () => {
try {
const { data } = await novu.notifications.list({
limit: 30,
useCache: false,
});

setList(data?.notifications || []);
console.log("NOVU-list", data?.notifications);
} catch (error) {
console.error("Error fetching notifications:", error);
}
};

useEffect(() => {
const handleNewNotification = (data: any) => {
console.log("new notification =>", data);
getNovuNotifications();
};

// Set up event listener
novu.on("notifications.notification_received", handleNewNotification);

// Initial fetch
getNovuNotifications();
}, [novu]);

return (
<div>
{list.length > 0 ? (
list.map((item) => (
<div key={item.id} dangerouslySetInnerHTML={{ __html: item.body }} />
))
) : (
<div>No notifications</div>
)}
</div>
);
};
"use client";

import { Novu } from "@novu/js";
import { useMemo, useState, useEffect } from "react";
import { env } from "@/env.mjs";

export const HeadlessNotification = () => {
const [list, setList] = useState<any[]>([]);
const applicationId = env.NEXT_PUBLIC_NOVU_APPLICATION_IDENTIFIER;
const memberId = env.NEXT_PUBLIC_SUBSCRIBER_ID;

const novu = useMemo(() => {
console.log("applicationId", applicationId);
return new Novu({
applicationIdentifier: applicationId,
subscriberId: memberId,
});
}, [applicationId, memberId]);

const getNovuNotifications = async () => {
try {
const { data } = await novu.notifications.list({
limit: 30,
useCache: false,
});

setList(data?.notifications || []);
console.log("NOVU-list", data?.notifications);
} catch (error) {
console.error("Error fetching notifications:", error);
}
};

useEffect(() => {
const handleNewNotification = (data: any) => {
console.log("new notification =>", data);
getNovuNotifications();
};

// Set up event listener
novu.on("notifications.notification_received", handleNewNotification);

// Initial fetch
getNovuNotifications();
}, [novu]);

return (
<div>
{list.length > 0 ? (
list.map((item) => (
<div key={item.id} dangerouslySetInnerHTML={{ __html: item.body }} />
))
) : (
<div>No notifications</div>
)}
</div>
);
};
25 replies
NNovu
Created by akash on 5/14/2025 in #💬│support
Need information about <Inobx /> component
DMing you 🙂
12 replies
NNovu
Created by QuocThinh on 5/6/2025 in #💬│support
Get all topic
We just released topic management from UI. Checkout the new dashboard and feel free to share the feedback 🙂
15 replies
NNovu
Created by QuocThinh on 5/6/2025 in #💬│support
Get all topic
@QuocThinh
15 replies
NNovu
Created by akash on 5/14/2025 in #💬│support
Need information about <Inobx /> component
Small update on default unread toggle: Currently, we don't support this. Buy default we show read + unread. I want to check, if this is a blocker for your team to start using Novu in production?
12 replies
NNovu
Created by akash on 5/14/2025 in #💬│support
Need information about <Inobx /> component
12 replies
NNovu
Created by akash on 5/14/2025 in #💬│support
Need information about <Inobx /> component
@akash I think there is some confusion. In the pro tier, we have 7 days of retention for activity feed data. For inbox, we have 90 days retention, means inbox message will be deleted after 90 days
12 replies
NNovu
Created by akash on 5/14/2025 in #💬│support
Need information about <Inobx /> component
@akash I will keep you updated. I have relayed the feedback with our team
12 replies
NNovu
Created by bledar on 5/14/2025 in #💬│support
Bridge execution failed
@bledar
How can I filter push notification step if user has no device tokens registered yet?
Currently, we don't have this filter supported. Sharing feedback with team
6 replies
NNovu
Created by akash on 5/14/2025 in #💬│support
Need information about <Inobx /> component
@akash - We don't have an option to control on user level. We have pricing tier based Inbox feed retention period. Pro tier has 90 days duration https://novu.co/pricing - I will check if this is possible - There is no limit. We have infinite scrol
12 replies
NNovu
Created by bledar on 5/14/2025 in #💬│support
Bridge execution failed
Could you please copy the transactionId and paste it here?
6 replies
NNovu
Created by bledar on 5/14/2025 in #💬│support
Bridge execution failed
@bledar by any chance you are using same step id with both email steps?
6 replies
NNovu
Created by Mark Garcia on 5/14/2025 in #💬│support
Headless using Novu/JS
Thanks. I will take a look
25 replies
NNovu
Created by Mark Garcia on 5/14/2025 in #💬│support
Headless using Novu/JS
@Mark Garcia Could you please share complete code?
25 replies
NNovu
Created by Vino on 5/12/2025 in #💬│support
Support for voice calls
@Vino Did you get chance to share feedback into our roadmap?
3 replies
NNovu
Created by MG on 5/13/2025 in #💬│support
How to select Push Providers in workflows?
This is applicable for chat and push providers only
3 replies
NNovu
Created by MG on 5/13/2025 in #💬│support
How to select Push Providers in workflows?
@MG We show one provider in workflow but all active push providers are used to send notifiications. Subscriber should also have credentials for both
3 replies
NNovu
Created by Michelle on 5/13/2025 in #💬│support
Search function for Pages (especially for Workflow Page & Subscribers)
You must see the workflow search functionality on this version
8 replies