Skip to content

Player actions as automations

Button automations are modules an admin starts with a click. Depending on the header trigger, they appear in one of two places:

  • Player-targeted (on: 'player') — in the Actions dropdown on a player’s page. Use these for per-player actions: banning, warning, kicking, or a custom RCON command aimed at one player.
  • Server-targeted (on: 'server') — in the Actions dropdown on the server header on the Dashboard. Use these for server-wide actions: broadcasts, map changes, ending a match.

A new Squad organization starts with ten button automations, all Enabled, so they appear in the Actions menu from the first minute. Player-targeted: Ban player, Warn player, Kick player, Force team change and Remove from squad. Server-targeted: Force seed bots, Run RCON command, Broadcast, Change map and End match. There are no seeded event or scheduled automations.

This guide covers creating and granting access to player actions.

  1. In Automations, click New automation; the editor opens with an empty module. Set label in the header trigger: it is the text admins see in the Actions menu.

  2. Write trigger: { kind: 'button', on: 'player', label: '...' }. With on: 'player' the run carries a subject player, so ctx.player is filled in and ctx.ban and ctx.note have someone to act on; with on: 'server' there is no subject player.

  3. In inputs, define any values the admin fills in at run time. Each key is an input name — lowercase letters, digits and underscore — and its value sets the type:

    • kind: 'text', 'number' or 'option' (an option input also lists its options).
    • required: true makes the input required.

    run reads a value as ctx.input.<name>; the name is case-sensitive.

  4. Write run(ctx). Player values are read from ctx.player, for example ctx.player.name and ctx.player.steamID, and ctx.at is the moment the run started. See Automation SDK reference.

  5. Press Test run with the Inputs and, for a player action, a player ID in Test player (with more than one server, also pick the Test server), then Save.

  6. Under the editor, Servers says where the automation runs. It starts on All servers, and clearing the field returns it to All servers; to take the action out of the Actions menu everywhere, switch it to Disabled. See Create an event automation.

A complete button module, a warn with a reason chosen from a list, is the first of the examples.

Any admin who has permission to run it sees the action in a player’s Actions menu.

What clicking an automation in the Actions menu does depends on where you clicked it. On a player’s profile the dialog always opens: the profile carries no server, so the run has to be pointed at one even when the automation has no inputs. On the server on the Dashboard the server is already known, so the dialog opens only for an automation that has inputs — one without them runs straight away.

The Actions menu lists only the button automations the member may run (see below). When there are none, the Actions button doesn’t render on a player’s page.

The right to run one named button automation is not a permission key — a key is resource:action, and a key named after a single automation cannot exist in that set. It is a link between a role and that automation, a second axis alongside the permissions matrix.

A member sees the automation in their Actions menu for either of two reasons: their role holds automation:update, which opens every button automation in the organization, or their role is linked to that one automation.

Saving an automation creates no key. It adds a row for the automation to the Automation actions group of the roles matrix, and that row is where the link is checked on.

To grant access:

  1. In Settings → Roles, edit the roles matrix and scroll to the Automation actions group. Each button automation appears as a row labeled with the automation’s name.
  2. Check the box where a custom role’s column meets that automation’s row. System role columns (Owner, Admin) are locked and cannot be checked.

Owner and Admin hold automation:update, so they run every button automation without a link. The Automation actions group only appears once at least one button automation exists. Only a custom role can carry a link, and you assign it to a member from the role selector in the Members table or in the invite dialog — see Grant per-automation execution rights.

Automation Where it shows up
Player-targeted Actions dropdown on the player’s page
Server-targeted Actions dropdown on the server on the Dashboard