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.