Skip to content

Attaching, Run now and webhooks

Point a flow at clients, run it on demand, run any of its triggers by hand, or trigger it from outside.

A flow needs to be pointed at clients before it does anything, and there are three ways it can start: an in-game event, you pressing a button, or an HTTP call.

Attaching a flow to clients

Open the flow and use Choose clients, next to Runs on under the header or in the ⋯ menu, then tick the clients it should run on. Each tick applies straight away. One flow can drive many clients, and one client can run several flows at once. Their triggers are merged into the single document the client runs.

How many flows one client can run is set by your plan. A client with no slot left shows No free flow slots in the list and cannot be ticked until you detach another flow from it.

Attaching alone is not enough: the flow also has to be enabled, using the Enabled switch in the editor's header. Attached clients only run the flow while it is on. A flow that is attached but off reads disabled in the flows list and does nothing.

The flows list tells you the state of each one at a glance:

  • 3 clients: how many clients it is pointed at.
  • Not attached to any client: pointed at nothing, so it cannot run.
  • disabled: switched off.
  • 128 runs, Last run 4 minutes ago: what it did in the last 24 hours (see is my flow actually working?).

Saving pushes the change to clients that are already running the flow. No restart needed.

Run now on clients

Run now on clients, in the editor's ⋯ menu, fires the flow's when-run-manually trigger immediately, on every client the flow is attached to.

Three things to know:

  • It runs the saved flow. With unsaved edits the entry reads Save and run on clients, which saves first.
  • Clients that are offline do nothing. There is no queue waiting for them to come back.
  • The flow needs a when run manually or by webhook hat, with the steps under it. Without one there is nothing to fire: the menu entry is greyed out and says what is missing. It is also greyed out while the flow is disabled or attached to no client.

To check what a flow does without any client, use Try it: it runs the canvas, unsaved edits included, against a pretend client in the editor.

when run manually or by webhook
command /sell all
notify owner: sold up

Run any trigger now

You do not have to wait for a trigger's event to happen. A flow that starts on a chat line, a player joining or a timer can be started by hand, on one client, from anywhere:

  • On a client's page, press Run a flow at the top, next to the start and stop buttons. Pick a trigger from the list, grouped by flow.
  • In the flow editor, press Run on server in the footer, next to Try it. Pick the client to run it on, then the trigger. If you opened Try this trigger first, that trigger is already picked.

The form that opens is filled in from the trigger itself: a chat trigger's text becomes the message and its first allowed player becomes the sender. Change anything you like, then press Run now. The values fill the trigger's variables for that run ({{var:player}}, {{var:message}}, the filter's {{var:m1}} and so on), exactly as if the event had just happened. When Try it is open, the editor uses the values you typed there.

Things to know:

  • It is a real run. The client does what the blocks say, on the server it is connected to.
  • The trigger's own filters are skipped: the sender list, the chat filter, the threshold. The blocks under it run with the values you gave.
  • The client has to be online. Run a flow is greyed out on a client that is not.
  • It runs the saved flow. With unsaved edits the editor says so and offers to save first.
  • A trigger that is still running is not started a second time, and the same trigger can be started again only after a few seconds.
  • before the client stops hats cannot be run this way, and neither can a trigger with no blocks under it. Routines can: they run like any other trigger.
  • You need Control on the client. Flows bought in the Flow library can be run too; their steps stay hidden, as always.

Quick commands

Quick commands are chat lines or /commands you send often, saved once for your account. Add, edit, reorder and remove them under Quick commands in the Flows section of Clients.

Every client you can control shows them as buttons, on its page next to the console and in its side panel. One tap sends the line to that client's chat.

  • The buttons work while the client is online, and are greyed out otherwise.
  • Sign-in commands such as /login or /register cannot be saved here. Keep passwords in secret variables.
  • Each plan keeps a set number of quick commands. If you move to a plan that keeps fewer, nothing is deleted: the ones past the limit stay in the list, marked Needs a plan, and cannot be sent until you remove some or upgrade.

Webhooks

The same manual trigger can be fired from outside CubeMind. Open the ⋯ menu in the editor's header and choose Webhook URL, then create one; a POST to that URL runs the flow with no login and no session.

Treat the URL like a password. Anyone who holds it can run the flow on your clients. Open Webhook URL again any time to copy it, replace it or delete it:

  • Replace URL: the old one stops working immediately, so anything calling it has to be updated.
  • Delete webhook: the URL stops working immediately. You can create a new one later.

Useful for hanging a flow off something else you already run: a cron job, a Discord client, a home-automation trigger, a deployment script.

Imported flows are read-only

A flow imported from the Flow library is marked Installed and cannot be edited. That is what lets it be updated later when the author improves it. To change one, Duplicate it; the copy is yours to edit.

When the original gets a new version, the flows list shows Update available, and the flow's side panel has an Update flow button that pulls the new version in.

Attaching, Run now and webhooks · CubeMind docs