Β 

Changelog

The latest releases and improvements to Knock.

Limit the number of executions of a workflow over a window of time with the throttle function

Today we're launching our new throttle function. With the throttle function, you can limit the number of times a workflow is executed for a recipient within a given window of time, making it trivial to build sophisticated notification alerting workflows that don't spam your users.

Previously if you wanted to throttle the execution of a workflow for a recipient, you would need to keep the logic in your application and control the number of times that your Knock workflow trigger is executed. This means keeping track of the sent notification state and potentially adding additional infrastructure to support this complexity. Now, with the throttle function, you can safely invoke your Knock workflow and know that Knock will apply the throttle controls for you to limit the execution of a workflow for a recipient over the window of time that you specify.

For example, with the throttle function, you can say "execute this workflow at most once per day for each recipient" and safely trigger the Knock workflow any number of times in that window, knowing that if it has already been executed in the window that Knock will terminate the workflow run for you.

Our throttle function is available today across all of our plans. You can read more in the documentation or contact our sales team to see a demo.

Sync your notifications analytics to your data warehouse

Today we're launching our new analytics data warehouse integration. With this integration you can bring the clean, normalized data Knock produces for your cross-channel notifications into your data warehouse to analyze alongside the rest of your product data. With this connector we support data exports to Snowflake, BigQuery, Redshift, and a number of other destinations.

Previously we had offered a Segment integration to stream the normalized notification analytics data into downstream destinations, including a data warehouse. Now with our new data warehouse analytics sync you can configure a data warehouse connection in Knock and we'll start streaming our normalized cross-channel notifications analytics data directly into your data warehouse, so you can analyze it alongside the rest of your data.

Our data warehouse sync is available today on our enterprise plan. You can read more in the documentation or contact our sales team to see a demo.

Fixes and improvements

  • πŸ› We fixed an edge case where unsetting channel data could end up marking a recipient's updated_at timestamp as null.
  • πŸ› We fixed an issue where sending a malformed recipient's list to our workflow trigger endpoint would not surface a useable error.

Condition debugging in workflow run logs

Today we're launching a step change in your workflow run debugging experience with our new enhanced conditions debugger that surfaces the conditions we evaluated across step, channel, and preference conditions for each step in your workflow.

Previously, we showed a single log line telling you conditions were not met on step and channel evaluation, leading to a confusing user experience in understanding exactly what caused the condition to not pass. Now, with our new conditions debugger, you can get a clear picture of all of the conditions we evaluated when executing your workflow, including exactly what the variables you're referencing in the conditions evaluated to.

You can read more about the debugging conditions in the documentation.

Sliding batch window support

We've added support for sliding windows in our batch function. Previously, when a batch was opened the window for which the batch was open was static, meaning that there was no way to extend the window to accumulate more items inside of the batch. Today, we've added a new "sliding" feature on our batch windows so that any new activities that are added to the batch will extend the window that the batch is open by recomputing the batch window.

You can read more about sliding batch windows in the documentation.

Fixes and improvements

  • πŸ‘€ We added a new contains_all operator to complement our existing contains conditions operator.
  • πŸ› We fixed an edge case with our user and object upsert API where overriding a null property with an object would cause an API 500.
  • πŸ› We fixed an issue where \n characters could cause an issue with push templates.
  • πŸ› We fixed a regression where syntax highlighting was broken in our code editor.

Swift SDK

Today we're launching our Knock Swift SDK, which you can use to build in-app notification experiences in iOS, macOS, and watchOS. Our Swift SDK makes it easy to interface with the Knock in-app feed, wrapping up all of the real-time socket and API querying behavior for you into an easy-to-use package.

The Swift SDK also supports:

  • Getting and setting push token information via channel data.
  • Working with user preferences to build in-app preference centers.
  • Updating message engagement statuses to track push notification opens and taps.
  • ... And much more!

You can install the SDK from Swift Package Manager, Cocoapods, or Carthage. There's also comprehensive documentation and an example iOS app to get you started.

Date filtering for logs views

We added support for date filtering for all log views in the dashboard, making it easy to find logs that happened on or around a particular date. Finding particular logs is now trivial, which is especially useful when debugging in high-log volume environments.

The new date filter is available now in all log views and across all plans. Please note: you will only be able to retrieve logs in congruence with your plan's retention policy.

Fixes and improvements

  • πŸ‘€ When a workflow is triggered from a subscription, we now include the subscription properties under the recipient.subscription namespace in the workflow run scope (docs).
  • πŸ‘€ We added support for the pap-AW locale.

Run workflows from the CLI

You can now test run your workflows as you're building them, all from the Knock CLI. As you make and push changes, you can use the new workflow run command to trigger a workflow for to up to 5 recipients at a time, enabling quick iterations of your notifications. See how to make these calls in our CLI docs.

Add a signing key to fetch steps and webhooks

We’re improving the security of our fetch step and HTTP webhooks by introducing request signing. Request signing allows a secret to be shared between Knock and your service so that you can verify that a request has come from Knock. Learn more about enabling this for your workflows.

Fixes and improvements

  • πŸ‘€ We improved the performance of loading event and action logs
  • πŸ‘€ We increased the granularity of error messages in the debugger
  • πŸ‘€ We added a dropdown to navigate between object collections in the dashboard
  • πŸ‘€ We now show workflow runs tab on users, objects and tenant pages
  • πŸ‘€ You can now filter tenants by name and ID, and we also show the tenant ID and name in workflow runs that include a tenant
  • πŸ‘€ When you create a workflow, it is now initially now set to active
  • πŸ‘€ We made performance and ergonomic improvements to all places that have a user searchbox
  • πŸ‘€ You can now edit your data payload as JSON in the workflow template builder
  • πŸ‘€ You can delete variables at the environment level
  • πŸ› We fixed a bug where owners of newly created accounts couldn't create new environments
  • πŸ› We fixed a bug in which were treating a batch step skip with a conditions_not_met code as an error in our instrumentation code when in fact it is valid
  • πŸ› We fixed an edge case where a recipient's timezone property doesn't contain a valid timezone
  • πŸ› We fixed an issue where batched workflows that used the same cancellation key weren't being fully canceled
  • πŸ› We now prevent tenant and current_message variables from being extracted from templates into the variable pane when editing a template
  • πŸ› We added better support for when using assign in liquid templates
  • πŸ› We fixed a bug where when switching environments on a translation page the translation wouldn't be found
  • πŸ› We fixed a bug that didn't properly use the scheduled_at date for creating and updating schedules
  • πŸ› We fixed a bug where long condition names would prevent seeing the "..." menu in the workflow builder
  • πŸ› We fixed race condition when scheduling a workflow's next occurrence
  • πŸ› We fixed an issue with cloning a workflow where adding variable properties would error during editing
  • πŸ› We fixed a bug where users couldn't edit Knock-managed environments
  • πŸ› We removed the ability to set a delivered condition on push steps since those aren't supported events for push
  • πŸ› We fixed a bug where the batch_key wouldn't be saved in the workflow builder

The last couple months have been quiet ones here on the Knock changelog. That's because we were heads down on our first ever launch week. Here's a recap of each of the 5 big changes we shipped.

HTTP Source

HTTP Source lets you trigger your multi-channel notifications from any source that can stream events into Knock. This includes dedicated streaming infrastructure, such as Kafka and Kinesis, as well as any product that can stream events and webhooks (think Supabase functions and Radar location-based events.)

This means you can power Knock with even more parts of your infrastructure to send notifications that are relevant for your customers.

Read the announcement β€”>

CLI and management API

Now developers can work with Knock resources in code, and automate pushing that code back into Knock to run on our platform. Read our docs to learn how you can scale notifications on Knock while managing our system from your CI/CD environment.

The Knock CLI and management API release is a big step forward for both Knock’s developer experience and for what you can build on top of our platform.

Read the announcement β€”>

Schedules API

Schedules API is a declarative, code-first way to build recurring notification schedules and to give your users the ability to control when they receive those notifications. We also introduce timezone aware sending with this release, making it even easier to send the right notification at the right time with Knock.

Read the announcement β€”>

Webhook channel

Webhook channels bring a new level of flexibility and extensibility to Knock’s output layer. You can use webhook channels to notify internal service within your application, or 3rd-party apps such as PagerDuty or Zapier.

The best part of webhook channels is they tie into Knock’s preferences model, so you can surface them to your customers.

Read the announcement β€”>

Subscriptions API

With subscriptions, you can model lists of users, then notify all users in that list with a single API call.

Subscriptions are a powerful way for you to offload to Knock the responsibility of who should be notified. You can use subscriptions to power alerting use cases and publish/subscribe models, or to model the concept of a set of dynamic followers of a resource.

Read the announcement β€”>

Idempotent API requests

Knock now supports idempotency so that requests can be retried safely without unintended side effects. This release of idempotency is limited to our workflow trigger endpoint. You can know set an idempotency key on your workflow triggers to ensure that Knock doesn't sent duplicate notifications when you retry requests. You can learn more about API idempotency in Knock in our API reference.

We're powering idempotency in Knock with our new open-source Elixir library for powering idempotency on any API. We're calling it One and Done. 😎 You can learn more about how our One and Done library in our announcement blog post.

Notification localization (i18n) support

In case you missed it last week, we just launched Knock Translations, our solution for teams that need to localize their notifications for a global audience. You can learn more in our announcement post.

Angular in-app feed component

One of our customers wrote a great Angular example of our React in-app feed component. You can find it here. If you're a team that uses Angular and wants to ship an in-app feed in a few minutes, this is a great way to do so. Shoutout to Knock customer and community member Chris Graves for this one!

Fixes and improvements

  • πŸ› We fixed a bug in our conditions builder where conditions with empty values could not be created.
  • πŸ› We fixed a bug in our fetch step where successful requests that resulted in an empty response would show an error status in the Knock dashboard.
  • πŸ› We fixed a bug where our rate limits were too specifically scoped.

New JSON editor for template preview data

Our customers use the variable preview pane to understand which variables a workflow uses in its templates, and to update the values of those variables for use in template previews. Previously, this was managed through a point and click interface, which made it difficult to work with structured data such as lists and objects.

Our new and improved preview data editor lets you work with JSON directly. This means you can copy-paste a sample event payload into the editor and immediately see how it will render in your template. We also handle nested data structures to make it easier to navigate through the lists and objects you're working with in your workflow trigger payloads.

Improved layout management

You can now rename, duplicate, and archive the layouts you create in Knock. This enables teams to clean legacy layouts out of Knock and makes it easier to understand which layouts are in active use within the account.

Configure email providers with JSON overrides

You can now configure your email channels in Knock to always pass through JSON data in the requests Knock makes to that channel. As an example, if you're using SendGrid as your email provider and you want to pass through an email_category to SendGrid, you can configure a JSON override on your channel config. These channel overrides support liquid so you can dynamically set this value based on workflow run state if you prefer. See the example below.

{
  "custom_args": {
    "email_category": "{{ notificationType | default: "TRANSACTIONAL" }}"
  }
}

You can learn more about configuring channels and JSON provider overrides in our docs.

Secret account and environment variables

You can now set your account and environment variables as secrets within Knock. A secret variable is one that will be obfuscated within the Knock dashboard once created. This is helpful for cases where you want to use secret keys as Knock environment variables, e.g. to make calls to downstream systems using the Knock fetch step.

When you're creating a variable, just enable "Set as secret variable".

Fixes and improvements

  • πŸ‘€ You can now pass a comma-separated list of email addresses to the cc and bcc fields on your email channel configurations.
  • πŸ› We fixed an issue where events coming from sources such as Segment or Rudderstack that had properties with empty lists ([]) may fail to sync.
  • πŸ› We fixed a bug in our preferences set code that would prevent certain nested preferences from overriding previously set preferences for workflows and categories.
  • πŸ› We fixed an issue where creating a new environment could lead to some channel configuration not being set for in-app feeds.

An overhaul for message status conditions

This week we've shipped a major update to message status conditions in the workflow editor. While we have long supported workflow step conditions that evaluate against the status of a preceding notification message, we only ever provided a small set of condition cases.

With this update, we've expanded the set of condition cases available to cover all possible message delivery and engagement statuses. Also included are some validation helpers that will warn you if we detect you've designed a condition that will never evaluate successfully.

This is a fully backwards compatible updateβ€”all of your existing message status conditions will continue working as you've come to expect. We're excited about how this update will unlock more powerful, composable control flow for your workflows, especially in combination with Knock open and link tracking.

For more details, visit our message status conditions docs or our general guide on Knock conditions.

Enhanced security mode configuration and user token signing helpers

We're excited to share a couple of developer experience improvements to API security at Knock.

Since the beginning, Knock has required that you include a signed user token in requests to your production environment that use a public API key. Now, you can configure this requirement on a per environment basis. We call this "enhanced security mode", and when enabled we will require those signed user tokens. Existing production environments still have enhanced security mode enabled by default.

We've also made it easier to work with those signed user tokens. When you generate a shared signing key in the Knock Dashboard, we now present the key in base-64 format by default. This can be easier to use within single-line environment variables. The PEM-encoded format is also still available.

The Knock Node SDK now includes a convenience method, Knock.signUserToken(), that will automatically use the KNOCK_SIGNING_KEY environment variable in either base-64 or PEM format to securely sign user IDs for use in your client applications.

Lastly, we've updated our security and authentication guide with more helpful notes on how to work with enhanced security mode.

Head over to the "Developers > API keys" page in the Knock Dashboard to take a look.

Fixes and improvements

  • πŸ‘€ From the workflows list, you can now open a workflow in a new browser tab by cmd + <click>-ing it.
  • πŸ‘€ We shipped a small redesign to the "Integrations > Extensions" management page.
  • πŸ‘€ Users with the support role can now access the Knock analytics page.
  • πŸ‘€ We added some truncation for lengthy ID and key values across the Knock dashboard.
  • πŸ‘€ When setting channel data for a user or object, we now validate that the shape of the channel data you send us is valid for the target channel type.
  • πŸ‘€ Within the workflow builder, you can override channel-level Knock tracking config defaults for specific workflow steps. Now, we've added a button that lets you reset your overrides so that your step once again inherits from channel-level defaults.
  • πŸ› We fixed a bug that prevented you from creating a workflow with more than 10 channel steps. You can now create workflows with any number of channel steps.
  • πŸ› We fixed a bug where we wouldn't display environment default preferences in the Knock dashboard after first creating them.
  • πŸ› We fixed some bugs with user invites where duplicate users would exist after a new user accepted an invite and signed up to join a Knock account.
  • πŸ› We fixed a bug where non-visible Liquid statements (e.g. {% if %}) would result in extra, empty <p> tags when rendering a Markdown template into HTML.
  • πŸ› We fixed a bug where you couldn't set an empty connections list for the channel data for a chat channel for a user or object.