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.
Create a player action
Section titled “Create a player action”-
In Automations, click New automation; the editor opens with an empty module. Set
labelin the headertrigger: it is the text admins see in the Actions menu. -
Write
trigger: { kind: 'button', on: 'player', label: '...' }. Withon: 'player'the run carries a subject player, soctx.playeris filled in andctx.banandctx.notehave someone to act on; withon: 'server'there is no subject player. -
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 itsoptions).required: truemakes the input required.
runreads a value asctx.input.<name>; the name is case-sensitive. -
Write
run(ctx). Player values are read fromctx.player, for examplectx.player.nameandctx.player.steamID, andctx.atis the moment the run started. See Automation SDK reference. -
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.
-
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.
How the run flow works
Section titled “How the run flow works”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.
Grant access to a player action
Section titled “Grant access to a player action”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:
- 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.
- 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.
Where actions appear
Section titled “Where actions appear”| Automation | Where it shows up |
|---|---|
| Player-targeted | Actions dropdown on the player’s page |
| Server-targeted | Actions dropdown on the server on the Dashboard |