NOTE

This product is in Private Beta and is under active development. Please email support@courier.com for access.

This avoids overwhelming users with messages pertaining to the same event. With throttling, any events that exceed a predefined limit will be dropped for a specific duration of time and will not pass to the next node.

Because Throttle is a part of Automations, it can apply across channels (eg. email, SMS, chat, in-app inbox, push) and providers (eg. Twilio, Sendgrid, email SMTP, Slack, MS Teams, WeChat).

Throttle Node Example Use Cases

Alert Notifications

When sending alert notifications, you may want to limit the number of notifications sent to a user in a given period to avoid bombarding them with too many alerts.

Email Campaigns

If you are running an email campaign, you may want to limit the number of emails sent to a customer within a specific timeframe to avoid overwhelming them with too many messages.

In general, a Throttle step can be useful in any situation where you need to control the flow of data or limit the frequency of an action.

Courier will allow you to specify what next steps should be taken when the throttle is triggered, and what steps should be taken when the throttle is not triggered.

Creating A Throttle Step

To create a Throttle, use the “Throttle” action, then fill out details in the step node.

Specify maximum number of events to allow through the throttle, and the time period to throttle by.

You have the options to throttle by:

ScopeUsage
user_idApply throttling by using user_id coming from data
GLOBALLet Courier decide the throttle parameter.
DynamicYou can use arbitrary value available in your run_context by referencing it like refs.data.throttle_key

Note: This is a beta feature, and we are working on adding more options for throttling.

Below is an example of a throttle step that will allow 2 event to pass through for a given user in a 24 hour period before throttling.

In this example, the throttle is set to be applied by user_id. You have to supply user_id in the following manner to throttle the user.

curl --request POST \
  --url https://api.courier.com/automations/<automation_template_id>/invoke \
  --header 'Authorization: Bearer <replace_with_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "data": {
		"user_id": "<user_id>"
  }
}

Creating Throttle Step