Trigger workflows to lists of recipients with Object Subscriptions
We're happy to announce that we've added support for object subscriptions to Knock. Object subscriptions make it easy for you to create and manage lists of recipients and trigger notification workflows to all recipients who are subscribed to that list, all from a single API call.
You can use object subscriptions to build pub/sub or alerting features on top of Knock, without the need to manage who should be notified and let Knock handle the efficient fan out of sending notifications to thousands of users simultaneously.
// Create an object to subscribe recipients to
await knock.objects.set("project_alerts", project.id, {
name: project.name,
});
// Subscribe one or more users to the alerts
await knock.objects.addSubscriptions("project_alerts", project.id, {
recipients: ["esattler", "dnedry"],
});
// Trigger a workflow to all recipients subscribed
await knock.workflows.trigger("alerts", {
recipients: [{ collection: "project_alerts", id: project.id }],
});
For more details, visit the Object subscriptions docs.
Analyze your notification event data in downstream tools with our Segment extension (beta)
We're excited to announce that our new Segment extension is now in beta. In just a few clicks you can start sending all of the events associated with the notifications being sent through Knock – clicks, opens, and delivery events – to over 350 destinations available in Segment.
For more details, visit the Segment extension docs. The Segment extension is available on the Growth and Enterprise plans. You can receive beta access by contacting us at support@knock.app.
Fixes and improvements
- 👀 We've changed our preferences API so default preferences will always be merged into the preferences shown in the dashboard and via the API for both users and objects
- 👀 We've extended our support role to include viewing read-only workflows, logs, and workflow runs across all environments
- 👀 You can now press "cmd + k" to access the search bar on our docs
- 🐛 We fixed an issue where our user typeahead wouldn't allow you to select a user where there multiple users with the same emails
- 🐛 We fixed a bug where specifying a sort order on a batch step would not sort the activities in the same order on the
/v1/messages/:id/activities
API - 🐛 We fixed an issue where a malformed piece of JSON in a preview variable could cause the app to crash
- 🐛 We fixed a small bug where creating a new email layout would not show up under the "Manage template settings" when selecting a custom layout