Skip to content

Templating tokens

Wherever Round Robin lets you write a custom text — duty messages or channel topics, for example — you can insert replacement tokens. Round Robin replaces each token with live rotation data when it sends the message or updates the topic.

Templates are edited in the web dashboard:

  1. Open app.roundrobinbot.eu and select your rotation.
  2. Click Configure and choose Templates to customize duty messages, or Topic to customize the channel topic.
  3. Type your template using the tokens below, check the live preview under the text box, and save.

The rotation Templates page in the dashboard, with a message template editor and live preview

See Message management and Topic management for the full details of each page.

A few rules apply everywhere:

  • Where Slack markdown is supported, you can format your text freely. See the Slack formatting guidelines. Slack markdown does not work in channel topics.
  • Where Slack markdown is not supported (again: topics), use the TEXTONLY variant of a token where available. It renders the handle as plain text instead of a clickable mention.
  • To write a multiline message, press Return and keep typing. Do not type a literal \n.
  • If a token has no value in the current context, Round Robin replaces it with N/A.
Token Description
%NAME% The rotation name (for example “Standup”).
%DESCRIPTION% The rotation description, if set.
%DUTY_SIZE% The number of people on duty at the same time (usually 1).
%ROTATION_NOTES% The rotation notes. Replaced with empty text if there are no notes.
Token Description
%USER% The real name of the user on duty (for example “Robert Redford”).
%USERHANDLE% The handle of the user on duty (for example “@robert”) as a clickable Slack mention.
%USERHANDLE_TEXTONLY% The handle of the user on duty as plain text.
%USERID% The Slack ID of the user on duty.

If more than one user is on duty, the tokens above expand to the whole group: %USER% becomes “A and B”.

To target a single user, append their position (1-based) to the token name. For example, with users A and B on duty, %USER1% produces “A”. If the position exceeds the number of users on duty, the token produces N/A.

Numbered forms work for all the on-duty and next-on-duty user tokens, for example %USERHANDLE1%, %USERID2%, or %NEXT_USERHANDLE_TEXTONLY3%.

Token Description
%NEXT_USER% The real name of the user who will be on duty after the current one.
%NEXT_USERHANDLE% The handle of the next user on duty as a clickable Slack mention.
%NEXT_USERHANDLE_TEXTONLY% The handle of the next user on duty as plain text.
%NEXT_USERID% The Slack ID of the next user on duty.
Token Description
%UNTIL% When the current duty ends, in the rotation’s local time (for example “Monday, 24 April 2023 14:00:00”).
%UNTIL_UTC% When the current duty ends, in UTC (for example “Mon, 24 Apr 2023 12:00:00 GMT”).
%NEXT_UNTIL% When the next duty ends, in the rotation’s local time.
%NEXT_UNTIL_UTC% When the next duty ends, in UTC.
%TIMEZONE% The rotation schedule’s timezone identifier (for example “Europe/Amsterdam”; see the tz database list).
%TZ_OFFSET% The rotation schedule’s base offset from UTC, not counting daylight saving time (for example “+01:00” for Europe/Amsterdam).
Token Description
%DUTYHANDLE% If the rotation uses an on-duty user group, the group’s handle (for example “@standup-operator”) as a clickable Slack mention.
%DUTYHANDLE_TEXTONLY% If the rotation uses an on-duty user group, the group’s handle as plain text.

These tokens refer to the person performing a manual action, so they only have a value during manual actions. For example, if you (user Y) manually set user X on duty, the ME tokens point to you, not to user X.

Token Description
%ME% The real name of the acting user.
%MY_HANDLE% The handle of the acting user as a clickable Slack mention.
%MY_HANDLE_TEXTONLY% The handle of the acting user as plain text.
%MY_ID% The Slack ID of the acting user.

Template editing itself lives in the dashboard, but the results show up in Slack: your tokens are replaced in the messages Round Robin posts and in the channel topics it sets. In Slack’s create/edit rotation window you can turn topic management on and pick topic channels; until you write a custom topic template in the dashboard, the default topic applies.