To send inbox notification programmatically for a user we can do as below.
ResourceResolver resourceResolver = resolverFactory.getResourceResolver(null);
InboxNotification inboxNotification = inboxNotificationSender.buildInboxNotification();
inboxNotification.setMessage("The page has been Published");
Is there any way we can send inbox notification to a group programmatically? I tried sendInboxNotifications but it is not happening.
sendInboxNotifications uses Task API to send inbox notification and Task Class contains method to send notification only owner
void setCurrentAssignee(String ownerId)
You can develop your own Class and implements sendInboxNotifications to override in order to pass group and get All user within group and loop through to send notification to all.