Constants
A Constant keeps a value in one place. Say your Discord invite link appears in six different Flows: a chat command, a follow-welcome message, a raid shoutout. When your server gets a new invite link, you change the Constant once, and every Flow using it picks up the new one. Click New constant and fill in a Name (e.g. Discord Invite), a Type and a Value. The types are Text, Number, Bool (true/false) and Datetime, the same four kinds used everywhere in the Flow Builder (see Flow Builder).
Good candidates beyond invite links:
- A welcome message you tweak seasonally.
- A Bits threshold that defines "big cheer" across several Flows.
- A cost you charge for the same redeem in more than one place.
- An Overlay ID (Text) that every giveaway Flow sends its Commands to. Moving them to a different overlay is then one edit: pick I will connect the ID in the Command.
- A
Maintenance Modeswitch (a true/false value) to pause a whole batch of Flows at once, without unpublishing them one by one. Wire it through a Not node into every Command's Condition, then flip it to true. See Flow ideas.
A Constant only changes when you edit it here: a Flow can't update it while running. For a number that needs to change itself, like a running counter, use Save value/Load value with Source: Variable instead. Or use a Counter overlay when your viewers should see it. Deleting a Constant unpublishes the Flows that use it.
Using a Constant in the Flow Builder
A Constant reaches a Flow through a Load value node. New to placing and connecting nodes? Flow Builder covers that. For this node:
- In the node bar, open Data loaders and drag in Load value.
- Leave Source on Constant (the default).
- Under Constant, pick yours from the list.
- Connect the node's output to whatever needs the value. Its connection point takes the kind of the Constant, so a text Constant gives a text output, ready for a message input.
Every field of the node is described in the Nodes reference.
Macros
The same idea, for logic. Say you've built an "is this viewer a VIP?" check, a few nodes wired together, and you want the same check in three different Flows. A Macro is that chain, saved once and dropped in wherever you need it.
Click New macro and name it, and it opens in the Macro builder (later, the hammer on its card opens it again). Editing a Macro works exactly like editing a Flow (same canvas, shortcuts and hints), so everything on the Flow Builder page applies. The only difference is which nodes you can use:
- Read event data is grayed out. A Macro isn't tied to any one triggering event, so there is no event to read from. Once a Macro is inserted into a Flow, its nodes are ordinary nodes there. So you can add a Read event data node next to them in that Flow.
- A Macro can't contain another Macro. Under the Other category you'll only find Comment.
- Everything else works as usual: the other Data loaders, all the Operations, the Actions and Comment.
Build the chain and save it (the Save button, or Ctrl+S). Then drag Macro (under Other in a Flow's node bar, next to Comment) onto any Flow's canvas and pick which Macro to insert.
Copy and paste works across Macros and Flows. Select several nodes with Shift + click, copy them with Ctrl+C, and paste them with Ctrl+V on any canvas. The connections between the copied nodes come along. A good way to start a Macro is to build the chain in a Flow first, then copy it over. The Copy to clipboard button on a Macro's card copies the whole Macro the same way.
Unlike a Constant, a Macro isn't a live link. Inserting one copies its nodes onto the canvas, so editing the Macro later doesn't change Flows it's already in. To change it everywhere, update each of those Flows, or delete the old nodes and insert the Macro again.
Good candidates: a viewer-tier check, a formatted-message builder, a cooldown check you want to behave identically everywhere it's used. See Flow ideas for a cooldown Macro worked out in full.
With your mods
Helpers you invited through Shared Access use your Constants and Macros the same way you do. What they can do depends on their role:
| What they can do | Analyst | Moderator | Supermod | Full access |
|---|---|---|---|---|
| See them | ||||
| Create, change and delete |
Good habits
- Give Constants a name that still makes sense later.
Discord Invitereads clearly in a Load value dropdown a month from now; "link 2" doesn't. - Reach for Save value/Load value with Source: Variable the moment a number needs to change itself.
- Build the Macro once you're rebuilding a check for the third time, not the first. Two Flows sharing a chain might be a coincidence; three is a pattern worth saving.
Constants vs. Macros
A Constant is one reusable value, kept live: edit it once and every Flow using it updates immediately. A Macro is a reusable chunk of logic you copy in. It's not a live link: to fix an already-inserted Macro, you update each Flow it was dropped into. Both still beat rebuilding from scratch: build it once, drop it in wherever you need it.