Schedule one-off workflow runs

Earlier this year we released the ability to run recurring workflows for your users via our Schedules API. Today, we're releasing an extension to our schedules API with the ability to schedule a single workflow run in the future for one or more recipients. One-off schedules are perfect to enqueue a workflow that should be run at some future point, without you needing to write your own cron jobs to do so.

Here's an example of creating a one-off schedule for a set of recipients:

await knock.workflows.createSchedules("park-alert", {
  recipients: ["jhammond", "esattler", "dnedry"],
  scheduled_at: "2023-12-25 12:00:00Z"
  data: { type: "dinosaurs-loose" },
  tenant: "jpark",
});

You can learn more about running one-off or recurring schedules in the documentation.

Customize the response of the in-app feed

Today, we’re launching additional privacy controls for our in-app feed API. Previously, when your recipient’s in-app feeds were requested, the response would include the full recipient object, which could lead to personal data about your recipient being returned unnecessarily.

With today's release, you can now use allow or deny lists to control which fields are returned from any entity in your feed request. Here's an example in-app feed response filter:

{
  "actor": {
    "only": ["id"]
  },
  "data": {
    "except": ["credit_card_last4"]
  }
}

Read more in the documentation.

Fixes and improvements

  • 🐛 We fixed an issue where clicking links in a message preview could crash the dashboard
  • 🐛 We fixed an issue where using tenants as a recipient in a workflow trigger would stop workflow runs from showing